storytold / craft-libs
git clone https://github.com/storytold/craft-libs.git
Rust libraries for the Craft Apps
+4
stars, 24h · #6,835
+~23
stars, 7 days · #7,276
+329
stars, 30 days · #2,510
329
★ total · +8% this week
629
forks · 163 open issues
Star history (as recorded here)
LanguageRust
LicenseApache-2.0
Created2026-10-09 (14d ago)
Last pushtoday
Watchers8
OwnerOrganization
Links
README excerpt
Craft App Libraries =================== This repo contains libraries used by the various Craft Apps. It's a Rust monorepo workspace, and the libraries can be included by any Craft Apps that need them. In the future this may grow to include non-Rust library code. If any libraries grow beyond Craft App usage, eg. RAW format support, they may be promoted out and into their own libraries for the broader ecosystem to take advantage of. ## Layout A Cargo workspace (edition 2024, resolver 3). Each library is a crate under `crates/ `, named `craft- `, with `version`, `edition`, `license` and `repository` inherited from the workspace (`license.workspace = true`, and so on) and `[lints] workspace = true`. Register each crate in `[workspace.dependencies]` in the root `Cargo.toml`. Apps depend on a crate by git: [code] ## Libraries - `craft-ai-core`: the data model and contract for AI in the Craft Apps (connections, models, tools, requests, jobs, consent, history, route spec). Pure, no I/O, wasm-safe. Contract in docs/ai-shared-layer.md. - `craft-pdf`: independently optional PDF parsing, interpretation, rasterization and guarded authoring. Apps retain layout, fonts, editing and export policy; writer-only consumers do not enable the shared reader. - `craft-atomic`: Crash-safe atomic file writing and replacement with same-directory staging, directory fsync, Apple `F_FULLFSYNC` fallback, transient lock backoff, and fault injection for the Craft suite. - `craft-cms`: pure-Rust ICC v2/v4 colour management: profile parsing and writing, transforms, rendering intents, black point compensation, soft proofing, gamut checks, 3D LUTs and built-in profiles (sRGB, Display P3, synthetic coated CMYK and others). - `craft-docpath`: decides whether a path or `file:` URL stored in a document may be opened. Paths stored in documents are followed only when they are local or on the document's own network share; other network paths, device paths and non-file URLs are refused. - `craft-i18n`: translations over the embedded craft-i18n catalogs: lookup with fallback (`pt-br` → `pt` → English), plurals, language names, the system locale and a pseudo locale. The catalogs stay a fully optional build input; apps keep `tl!` and their language setting. - `craft-media`: bit-level I/O (`bitstream`), clean-room MP4/MOV (`isobmff`) and Matroska/WebM (`matroska`) demuxers and muxers, from FilmCraft, and an ISO BMFF box reader. Containers only; codecs stay in each app. - `craft-print`: PDF submission to CUPS and Windows, printer discovery, duplex/copies/colour and driver preferences. PDF generation stays in each app. - `craft-quit`: native macOS quit, egui close handling and an optional app menu. Unsaved-document decisions and save prompts stay in each app. - `craft-settings`: `config.toml` settings storage for every app: platform folders, portable mode and overrides, atomic saves while running, backup, damaged-file recovery and schema migrations. Policy in docs/settings-storage.md.