Files
cbf6840b10 Add craft-ppt-binary: DeckCraft's PowerPoint 97-2003 reader on craft-cfb and craft-pptx (#2316)
* ppt-binary: open PowerPoint 97-2003 .ppt/.pot/.pps files

New crate deckcraft-ppt (L3), written from the public [MS-CFB], [MS-PPT]
and [MS-ODRAW] Open Specifications: a compound-file reader (ported from
FilmCraft's clean-room reader), the edit chain and persist directory, and
the OfficeArt drawings. Main masters become masters (colours, fonts, text
styles, background, decorations), title masters become layouts; slides
keep their shapes (presets, freeforms, groups, rotation, flips), fills,
lines, shadows, pictures (PNG, JPEG, DIB, TIFF, EMF, WMF), text with the
master styles resolved into it, fields, notes and hidden flags.

Import only: an opened .ppt has no save path, so Save asks for a new
name. A .pps from the system starts the slide show. File dialogs, drag
and drop, the web shell and the macOS, Windows and Linux file
associations offer the three extensions. Tests build .ppt files from
records and sweep hostile input.

From storytold/deckcraft@0aef89cb1a (storytold/deckcraft#1137).

* ppt-binary: address review: budget picture decoding, read each persist directory once, macOS .pot/.pps types

- Pictures decode lazily, when a shape first uses them, each at most once and all
  within a shared 4 GiB budget: many store entries pointing at one deflated blob
  can no longer ask for unbounded memory.
- A persist directory named by many edits is read once.
- Info.plist declares com.microsoft.powerpoint.pot and .pps alongside .ppt.

From storytold/deckcraft@9e575ccecc (storytold/deckcraft#1137).

* ppt-binary: address review: check the picture budget before copying bitmap data

From storytold/deckcraft@470a429392 (storytold/deckcraft#1137).

* ppt-binary: build against current main

- convert.rs: set `flip: None` on imported gradients. `Gradient` gained the field in
  ad97533a; None is what an unflipped gradient was before.
- tests.rs: split `imports_a_presentation` into one check per section (title, picture,
  group, text box, master) for the workspace `cognitive_complexity` lint (6ddd2fb8).
  The assertions are unchanged.
- Cargo.lock: deckcraft-ppt takes the workspace version, 0.15.0.

From storytold/deckcraft@a0ececefeb (storytold/deckcraft#1137).

* ppt-binary: keep the picture budget on 32-bit targets

`MAX_TOTAL` was `4 << 30` as a `usize`. On wasm32 that is 2^32, which wraps to 0
without any error, so the web build's picture budget was zero and every .ppt
picture was dropped. Use the address space as the limit there. A compile-time
assertion that the budget holds at least one picture keeps it from happening
again on any target: the CI wasm step (`cargo check`) now fails if it does.

From storytold/deckcraft@4fd930ce1a (storytold/deckcraft#1137).

* ppt-binary: read past the character fields PowerPoint 2002 and later add

A TextCFException can end with pp10runid (mask bit 20), newEAFontRef (24),
csFontRef (25) and pp11ext (26), after `position`. read_cf stopped at
`position`, so in a StyleTextPropAtom the next run's count and mask were read
from the leftover bytes, and every later run got garbage formatting or the
walk ended. Master text styles go through the same reader. The fields are
read past and not used. The test has a run carrying all four followed by a
bold 18 pt run, which now reads as written.

From storytold/deckcraft@773af639c9 (storytold/deckcraft#1137).

* ppt-binary: convert each listed object once and index notes pages

Nothing stopped a slide list from naming one persist object many times, and
each listing converted its whole drawing again: a 100k-shape slide listed
180k times fits in about 10 MB and makes 1.8e10 shapes. An object is now
listed once across the slide, master and notes lists (PowerPoint never lists
one twice), and a repeat is logged and skipped. Notes pages are looked up
through a map built once, instead of a scan per slide (slides x notes). The
first matching page still wins.

From storytold/deckcraft@b3aa0983bd (storytold/deckcraft#1137).

* ppt-binary: find formatting runs by binary search

paragraphs() found the run at a position (rposition) and the next run start
(find) by scanning the run starts for every run, break and field, so text
cost grew with chars x runs. The starts are a running sum and never
decrease, so both lookups are now partition_point. Measured in a debug
build, 640k one-character runs (about 6 MB of file): 75 s before, about 2 s
after. The test uses a 20 s bound, like render's pathgrad budget test.

From storytold/deckcraft@b70b022362 (storytold/deckcraft#1137).

* ppt-binary: cap decoded pictures at the .pptx package total

The picture budget was 4 GiB, so a few MB of small deflated metafiles, each
inflating to 64 MiB, could make the import hold 4 GiB. A .pptx package may
inflate to 2 GiB in total (deckcraft-pptx opc MAX_TOTAL), and pictures are
the only part of a .ppt this crate inflates, so use the same 2 GiB. That also
fits a 32-bit usize, which replaces the wasm32 special case. This is a limit
change, so there is no new test: the budget test
(the_store_decodes_lazily_within_a_budget) and the compile-time check that
the budget holds a picture still cover it.

From storytold/deckcraft@a9cefff8b8 (storytold/deckcraft#1137).

* ppt-binary: fall back to the first main master the same way every time

A slide naming a master that doesn't exist fell back to the lowest index in
the masters HashMap. A title master is stored with its main master's index,
so the two tied and the HashMap's random order picked one: the same file got
the "Title Master" layout on some opens and the main master's on others. The
fallback now considers main masters only. The test opens such a deck 30
times; before the fix it took the title master's layout within those opens.

From storytold/deckcraft@60942d5950 (storytold/deckcraft#1137).

* ppt-binary: try the edit scan before calling a file too old

Any Current User token other than the plain or encrypted one, including none
at all from a truncated record, returned TooOld at once. A PowerPoint 97 file
with a damaged Current User stream was reported as "made by PowerPoint 95 or
earlier", and the UserEditAtom scan meant for a missing stream never ran.
[MS-PPT] allows only those two tokens, so an unknown one can't tell a damaged
file from an older format. The scan now runs, and TooOld is returned only when
it finds no edit record behind an unknown token.

From storytold/deckcraft@3869c3dc51 (storytold/deckcraft#1137).

* ppt-binary: read persist directories within one stream's worth of words

dirs_seen only skips a directory named at the same offset again. Directories
nested inside one another, each named by its own UserEditAtom, were each read
to the end of the stream: MAX_EDITS x the stream. In a debug build, 4095 such
edits over a 64 MiB stream took about 48 s. All directories now share a budget
of stream.len() / 4 words. Real directories are separate records inside the
stream, so they always fit. The hostile case stops in milliseconds and is
reported as damaged.

From storytold/deckcraft@5799048d88 (storytold/deckcraft#1137).

* ppt-binary: check two additions on input-derived sizes

- cfb.rs: the mini sector end `at + MINI_SECTOR_SIZE` was unchecked. On a
  32-bit target (wasm32), a sector number near 0x03FF_FFFF puts `at` at the
  top of usize, so the add panics in a debug build and wraps in release.
- text.rs: the style-run total `chars.len() as u32 + 1` truncated and could
  overflow past u32::MAX characters. It now saturates.

Neither case can be reached in a native test (one needs a 32-bit target, the
other more than 4 GiB of text), so there is no new test. The `+ 1`s in
convert.rs paragraphs() that the review also named are bounded by the text
length and can't overflow, so they are unchanged.

From storytold/deckcraft@b58c354246 (storytold/deckcraft#1137).

* ppt-binary: a sector chain that revisits a sector is an error

read_chain stopped at the stream's size, so a FAT loop shorter than the stream returned the
looped sectors again as the stream's bytes. It now tracks visited sectors and fails on a revisit,
and reserves the stream's size (capped at the file length) up front.

a_looping_chain_stops expected the repeated bytes; it now expects the error (eliets2's review).

From storytold/deckcraft@2b0940bff5 (storytold/deckcraft#1137).

* ppt-binary: slide shapes inherit from their own master's shapes

Master shape properties were remembered by shape id alone, so a later master (a title master,
or a second main master) that reused a shape id replaced the first master's entry, and slides
inherited fill and line from the wrong master. They are now keyed by master slide id and shape id,
and a shape's hspMaster is looked up in its slide's master, then a title master's main master.
Notes pages have no imported master, so they inherit nothing.

PowerPoint gives shapes file-unique ids, so this takes a damaged or generated file (eliets2's
review).

From storytold/deckcraft@7ad2f5152b (storytold/deckcraft#1137).

* ppt-binary: drop the unused fBackground field

RawShape.background was set from the FSP flag but never read: the background shape is the
drawing container's own shape (OfficeArtDgContainer.shape, [MS-ODRAW] 2.2.13), which drawing()
already takes. The comment there now says so (eliets2's review).

From storytold/deckcraft@afd57f47e0 (storytold/deckcraft#1137).

* ppt-binary: shadowed text keeps its shadow

TextCFException's shadow bit was read and merged but never reached the run. A shadowed run now
gets a shadow in the colour scheme's shadow colour, at the distance and direction of the app's own
Text Shadow command, with no blur (the record has none). Emboss has no counterpart in the model,
so its field is gone and the loss is listed in the docs (eliets2's review).

From storytold/deckcraft@ab5cf618e1 (storytold/deckcraft#1137).

* ppt-binary: the .pps show-on-open test opens a real 97-2003 file

a_ppsx_from_the_system_starts_the_show saved a .pptx under the name "Old talk.pps", so it went
through the PPTX path and never reached the legacy importer. crates/ppt/tests/fixtures/old-talk.pps
is a one-slide .pps built from records by the ppt tests (rebuilt with DECKCRAFT_WRITE_PPT_FIXTURE=1,
checked on every run), attributed CC0 like the other generated fixtures, and the UI test opens it
(eliets2's review).

From storytold/deckcraft@f511a2a66b (storytold/deckcraft#1137).

* ppt-binary: test mini streams, 4096-byte sectors and the DIFAT chain

The compound-file test builder only made version-3 files with 512-byte sectors, no mini stream
and every FAT sector in the header, so read_mini_chain, 4096-byte sectors and the DIFAT chain never
ran. build_with takes the sector shift and the mini stream cutoff, and lists FAT sectors past the
header's 109 in DIFAT sectors; build is build_with(streams, 9, 0), so existing tests see the same
layout. Three tests read streams back through each path (eliets2's review).

From storytold/deckcraft@212788b693 (storytold/deckcraft#1137).

* ppt-binary: test every picture kind, two-UID blips and blips inside the FBSE

The blip tests covered PNG, deflated WMF and DIB only. New tests decode JPEG (RGB and CMYK), TIFF
and PNG with one and two UIDs, an uncompressed EMF with each UID count, a metafile over the budget
(compressed or not), and a blip held inside its FBSE rather than in the Pictures stream. All
passed as written (eliets2's review).

From storytold/deckcraft@fe8023b9c2 (storytold/deckcraft#1137).

* ppt-binary: placeholder text held only in the slide list is imported

A shape's client text box may hold just an OutlineTextRefAtom, with no TextHeaderAtom ([MS-PPT]
OfficeArtClientTextbox): the text lives in the slide list, and that is the usual form for slide
placeholders. read_block returned None without a header, so text_block never reached its
outline fallback and the placeholder came in empty. A block with a reference and no header is
now returned for the caller to follow.

placeholder_text_can_come_from_the_slide_list covers the reference alone (it failed before this
change) and a header with a reference; the test document builder can put outline blocks in the
slide list (streams_with_outline). Found writing the test eliets2's review asked for.

From storytold/deckcraft@bf8ec603f3 (storytold/deckcraft#1137).

* ppt-binary: test newer edits and the two other encryption signs

doc::read had tests for one edit and the Current User token only. a_later_edit_replaces_a_slide
adds an edit whose persist directory gives the slide a new object; the newer slide is imported and
the master from the older directory is kept. encryption_is_found_in_the_edit_and_the_persist_directory
covers an edit record long enough for encryptSessionPersistIdRef and a CryptSession object named
by a later edit. Both passed as written (eliets2's review).

From storytold/deckcraft@f0b8525cc6 (storytold/deckcraft#1137).

* ppt-binary: test title masters and slides that follow nothing

No test made a slide of a title master or a slide with the follow-master flags off. The new test
checks that a title master becomes a "Title Master" layout with its own background and shapes
and without the master's shapes, that its slide uses that layout and follows its background, and
that a slide with all three flags off keeps its own background and colour scheme and hides the
master's shapes. It passed as written (eliets2's review).

From storytold/deckcraft@a41bf545e7 (storytold/deckcraft#1137).

* ppt-binary: merge boolean properties flag by flag

A boolean property word holds sixteen flags, each with its own fUse bit.
Props::inherit and add_table kept the whole word from the most specific
set, so a placeholder or text box that set only fNoFillHitTest lost the
inherited "not filled" and "no line" and was drawn with a fill and an
outline. Merge those words per flag instead (storytold/deckcraft#1137 review, issue 1).

From storytold/deckcraft@79ae833152 (storytold/deckcraft#1137).

* ppt-binary: recover a broken edit chain and report lost slides

An edit whose previous-edit offset points back at itself (or anywhere
that isn't an edit) cut the older edits off, and with them the persist
directories holding the slides: such a file opened as an empty deck
with no warning. When the chain doesn't end at offset 0, read every
edit's persist directory in the stream, newest first, filling only what
the chain left unset.

Slides the slide list names but whose objects are still missing are now
returned by deckcraft_ppt::import_checked and reported like a damaged
.pptx: lostSlides, a "(Repaired)" copy and the CLI warning
(storytold/deckcraft#1137 review, issue 3).

From storytold/deckcraft@135674101f (storytold/deckcraft#1137).

* ppt-binary: picture frames, inline picture fills, gradients, footers, numbering

The remaining differences from LibreOffice in the storytold/deckcraft#1137 stress test:

- Picture frames (and OLE frames) that say nothing about fill or line
  start with neither, as placeholders and text boxes do, instead of the
  drawing defaults' fill.
- A pib or fillBlip held in the property's own complex bytes (fBid) is
  decoded within the picture budget: table cells with a picture fill
  showed a plain colour.
- Shaded fills put the back colour at fillFocus ([MS-ODRAW]), and the
  linear angle follows how LibreOffice writes and reads it (0 degrees
  from the top): the linear gradient was reversed, the radial inside out.
- HeadersFooters (the slide's, else the document's) add the date,
  footer and slide number placeholders; the master's footer placement,
  alignment, size and colour reach every layout.
- Numbering from the document's ___PPT9 tag (OutlineTextProps9, pp9rt
  in the runs' fontStyle) turns bulleted paragraphs into numbered ones.
- Wingdings diamonds draw as a diamond, not a dot.

From storytold/deckcraft@24437bd075 (storytold/deckcraft#1137).

* ppt-binary: read CString records up to their first NUL

Header/footer text and the ___PPT9 tag name were decoded from the whole
CString body. A writer that ends the string with a NUL would put the NUL
into the footer text and make the tag name fail to match, losing the
numbering. Stop at the first NUL, as the font names already do.

From storytold/deckcraft@110e1420fd (storytold/deckcraft#1137).

* ppt-binary: on craft-cfb and craft-pptx (the move from DeckCraft)

What the move from storytold/deckcraft#1137 changes; the commits before this one are that
PR's crates/ppt as it is on its branch, without its manifest.

- craft-cfb replaces the crate's own compound-file reader (cfb.rs, 552 lines). Streams are
  read capped at the file's length, as before. Its six tests (looping chains, mini streams,
  version 4 sectors, the DIFAT) are covered by craft-cfb's own. The byte helpers move to
  record.rs. Test files are written by craft-cfb's writer.
- deckcraft-model, deckcraft-color and deckcraft-geom become craft-pptx and craft-drawingml,
  the same types (storytold/deckcraft#2179, storytold/deckcraft#2180 and #792's plan). A gradient now states its
  shape and rotate-with-shape explicitly, as craft-drawingml's are optional.
- DeckCraft's default master (defaults::build_master and blank_presentation) becomes the
  caller's craft_pptx::Defaults: import(bytes, &defaults), as craft_pptx::import takes. The
  file's masters take the default master's layouts and placeholders, then the file's theme,
  placeholder boxes and styles. The tests use a default master with title, body and footer
  placeholders and the seven layouts .ppt layout types map to; a new test reads with
  craft_pptx::Plain.
- The two tests that drive DeckCraft's engine (open and save, lost slides in the app) stay in
  DeckCraft.
- The fixture's rebuild variable is CRAFT_WRITE_PPT_FIXTURE; old-talk.pps is unchanged and
  gets its ATTRIBUTION row. Bare #1137 references in comments name storytold/deckcraft#1137.
- README, crate README (doctested) and the workspace entry.

* ppt-binary: bound text, strings, paths and repeated work from hostile files

Tab stops keep the first 64 entries while still reading past the rest, string properties stop
at 4096 units, and a freeform path uses at most 8192 vertices, since each of these is copied
into every paragraph or inheriting shape. An outline block in the slide list is the text of
one shape only; a second reference keeps the shape's own text.

The fallback master and each master's layout per type are found once before the slides are
converted, a shape's primary property tables are collected without inserting at the front,
and a compressed metafile that fails to inflate is charged to the picture budget.

* ppt-binary: review fixes for footers, rulers, title masters, paths and numbering

A slide's own headers and footers record (instance 0) now wins over the document's, and a
text box that points at an outline block keeps the margins and indents of its own ruler. A
slide list entry whose object is not a slide is reported as lost.

Title masters place their layout's placeholders from their own placeholder boxes, adding any
the title layout lacks, and copy only placeholders from an earlier title layout. Slides that
don't name a title master no longer pick its layout.

Freeform paths skip the points of escape segments, and without segments follow shapePath
(closed lines by default, open lines or curves). DIB colour tables are sized by bit depth and
refused when they run past the bitmap. Numbering schemes 0x10 to 0x28 map to their DrawingML
names, master style levels go to the level they name, and a broken edit chain reads the newest
edits rather than the oldest.

The nested persist directory test now checks the file is reported damaged, the footer test
fails when a layout has no slide number, and the README says tables come in as groups of
shapes.

* ppt-binary: second review round: failed pictures, title layouts, notes, arcs and property tables

Inflating a compressed metafile is now charged its compressed bytes as well as its output, and
is refused when those bytes alone pass the remaining budget, so many entries pointing at one
stream that inflates to nothing can't each read it again for free.

A title master's layout starts only from the defaults' own title layout, not one made for an
earlier title master. A notes page shared by two slide records with the same slide id goes to
the first only. After elliptical quadrants or a quadratic Bezier escape a path goes on from
their last point; after an arc or angle ellipse, whose end isn't one of its vertices, the path
stops rather than draw from the wrong place. A property set keeps at most 1024 distinct
properties, so copying the drawing defaults into each shape costs a bounded amount.

* ppt-binary: take each main master's title-layout base once; test outline notes

A title master's layout starts from the placeholders of the defaults' title layout. They are now
taken once, when the main master is made, instead of rebuilding the set of title-master layouts
and rescanning the master's layouts for every title master, which was quadratic in title masters.

A notes page whose body text is in the notes list's outline block also goes to one slide only.

---------

Co-authored-by: Oliwier Kulczycki <oleknuso282@gmail.com>
Co-authored-by: kiwi4boy <kiwi4boy@gmail.com>
2026-11-18 23:23:02 -05:00

45 KiB

Craft App Libraries

Scanned by SonarCloud Reviewed by CodeRabbit

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/<name>, named craft-<name>, 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.

Use a released version

The first coordinated release is v0.1.0. It gives consumers a fixed baseline while development continues on main. All five crates share this version. They require Rust 1.95 or later; the UI integrations use egui 0.36.

Add only the crates you need, using the same tag for every craft-libs dependency:

[dependencies]
craft-ui = { git = "https://github.com/storytold/craft-libs", tag = "v0.1.0" }
craft-settings = { git = "https://github.com/storytold/craft-libs", tag = "v0.1.0" }
# Optional, for egui close handling and the macOS application menu:
craft-quit = { git = "https://github.com/storytold/craft-libs", tag = "v0.1.0", features = ["menu"] }

craft-atomic and craft-print use the same dependency syntax. Enable craft-ui's serde feature if you need to serialize its docking layout. These are Git releases; crates.io publication is deferred.

Release tags are never moved or reused. For a commit pin, resolve the tag with git ls-remote https://github.com/storytold/craft-libs 'refs/tags/v0.1.0^{}' and replace tag = "v0.1.0" with rev = "<full commit SHA>" on every craft-libs dependency. Use either tag or rev, not both. An existing commit pin keeps working; switching to this release may require adapting to changes since that commit.

Commit your application's Cargo.lock and build with cargo build --locked for reproducible Rust dependency resolution. A Git pin fixes craft-libs source, not every transitive dependency. A library's own lockfile does not constrain its downstream consumers. Upgrade deliberately: read the release notes, update all craft-libs pins together, refresh the lockfile with cargo check, and run your application's tests and affected workflows before committing.

See the release notes for included functionality and known limits, and the versioning policy for compatibility guarantees and release checks.

Libraries

  • craft-platform: optional native dialog lifecycle, Linux/BSD desktop appearance observation and browser download ownership; application policy stays in the apps.

  • craft-aep: After Effects projects: the .aep (RIFX) and .aepx container as a lossless chunk tree that writes back byte for byte, and a typed, read-only view of compositions, layers, properties, keyframes, effects, masks, shapes, text and footage. Clean room, from EffectCraft. Mapping onto an app's document stays in the app.

  • 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-pe: PE/COFF headers (.exe, .dll, .sys, .efi) from untrusted bytes, from Craft Anything: the COFF header, PE32/PE32+ optional header with its data directories bounded by the header's real size, the section table, RVA-to-file mapping and the decoded Rich header.

  • 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-pdn: Paint.NET documents (.pdn, PDN3), read: the layer list, blend modes and chunked gzip pixel blocks, with a data-only MS-NRBF (.NET binary serialization) reader. From PhotoCraft.

  • craft-aaf: clean-room AAF (Edit Protocol, structured storage) and OMF Interchange 2.0 (Bento) readers and writers over one mob-style composition model with exact times, clip gain, markers, nested compositions and embedded PCM essence. From FilmCraft.

  • craft-assuan: the Assuan protocol and gpg-agent's operations (key lookup, signing a digest, decrypting a session key) over any Read + Write stream, with a bounded canonical S-expression reader. No sockets; everything the agent sends is capped.

  • craft-affinity: bounded reader for native Affinity documents (.af, .afdesign, .afphoto, .afpub): archive, object stream and a neutral document model with layers, artboards, vectors, text, tables, images and masks. Read only; mapping onto an app's document stays in the app.

  • 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-xtask: a library for the apps' cargo xtask binaries: the gate's step runner (steps in order, stop at the first failure, the ok, FAIL and skip summary, workspace tests that exclude the running xtask package), an optional slot lock held across processes and an optional per-step JSON report. Each app keeps its step list and its own policy. Planned for DesignCraft and LightCraft.

  • craft-captions: caption and subtitle files behind one neutral model (cues with exact tick times): SubRip, WebVTT, Scenarist SCC, MacCaption MCC, EBU STL and TTML / IMSC1 / DFXP readers and writers, and CEA-608 / CEA-708 byte-pair coding. Carved from FilmCraft.

  • craft-cfb: clean-room Compound File Binary ([MS-CFB], OLE structured storage) reader and writer: the container of legacy Office files, Outlook messages, encrypted OOXML packages and AAF. Bounded on hostile input; what the streams hold stays with each format.

  • craft-dav: WebDAV multistatus documents (RFC 4918) with the CalDAV and CardDAV namespaces, from MailCraft: read fail-closed into a bounded craft-xml tree with fixed prefixes, and the successful properties of each response. No I/O.

  • 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-crs: Adobe Camera Raw settings (the crs: namespace of an XMP packet or .xmp sidecar, read through craft-metadata): the settings by name, numbers, tone curve points, local corrections and the crop, read and written. From PhotoCraft.

  • craft-codepage: legacy 8-bit code pages, one table each: the single-byte Windows pages, Mac OS Roman and fifteen DOS pages, keyed by Windows code page number, with the RTF/Word font charsets. craft-rtf, craft-dxf and craft-mime decode through it.

  • craft-crw: clean-room Canon CRW (CIFF) raw decoder, from LightCraft: the heap container, the entropy coding derived by black-box analysis (frozen code tables), sensor black and white levels and as-shot white balance. The complete derivation record (plan, sources log, scripts, verification) is in crates/crw/clean-room/. Colour stays in each app.

  • craft-csv: delimited text (CSV, TSV) and SYLK: encoding detection (UTF-8, UTF-16, Windows-1252 or Windows-1256), delimiter sniffing, a record parser with a cap on fields per record, field quoting for writers, and a SYLK (.slk) reader with R1C1 formulas rewritten to A1.

  • craft-dds: DirectDraw Surface (DDS) textures, read and written: the top mip level of uncompressed, BC1 to BC3 (DXT1/3/5) and BC4/BC5 (grayscale data and normal maps) textures, legacy and DX10 headers, and our own block encoder with optional mip chains. No dependencies (rayon behind parallel), so an app that only exports textures needn't take the whole craft-image-codecs codec set and its licences; craft-image-codecs reads and writes DDS through it.

  • craft-dialogs: native file and message dialogs that never block the event loop: queued requests shown at the end of the frame and answered on a later frame, free-standing Open and Folder panels and Save sheets on macOS, case-insensitive filters. What to do with the answer stays in each app.

  • craft-doc: reads PhotoCraft .pcraft, VectorCraft .vectorcraft and EffectCraft .ecproj documents without the apps: the kind and version, the previews and PDF they carry, and their pages and layers. Rendering and editing stay in each app.

  • craft-doc-binary: the Word 97-2003 binary format (.doc, [MS-DOC]) read into craft-wordmodel, with XOR, RC4 and RC4 CryptoAPI password protection. WordCraft's reader, on craft-cfb.

  • 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-dpx: DPX (SMPTE ST 268) and Kodak Cineon frames, from PhotoCraft, FilmCraft and EffectCraft: header fields and code values at 8, 10, 12 and 16 bits in both byte orders, filled and packed, RGB, RGBA, ABGR, luma and Y'CbCr descriptors, and a writer for both formats. Bounded on hostile input. Colour conversion and orientation stay in each app.

  • craft-drawingml: the DrawingML that PPTX, DOCX and XLSX share: EMU units and a:xfrm, colours with theme slots and colour transforms, preset shape outlines (a:prstGeom), custom geometry with guide formulas (a:custGeom) and preset text warps (a:prstTxWarp). From DeckCraft. Takes craft-xml trees; packages stay with each format.

  • craft-elf: ELF program headers and dynamic section entries from untrusted bytes, from Craft Anything: 32- or 64-bit in either byte order, bounded counts and overflow-checked offsets, virtual-address-to-file mapping through PT_LOAD, and segment, permission and dynamic tag names.

  • craft-eps: Encapsulated PostScript files as a container: the binary preview header (read and write), the DSC header comments and bounding boxes (also (atend)), the EPSI preview bitmap, ASCII85 data, and telling EPS, PostScript and Illustrator files (PostScript- or PDF-based) apart. No PostScript interpreter.

  • craft-docx: DOCX (WordprocessingML) read and written on craft-wordmodel, with Word XML (Flat OPC) and Word 2003 XML, password-protected packages and Restrict Editing hashes. WordCraft's DOCX crate on craft-opc, craft-xml and craft-offcrypto.

  • craft-dxf: DXF tag reader and writer, from CADCraft: ASCII and binary DXF as (group code, value) tags, split into sections and entities, with pre-2007 code pages and version detection, and written back; and model, the drawing above the tags (header variables, tables, blocks, layouts, entities) and its writer (R12 to 2018), merged from CADCraft's and VectorCraft's readers. Bounded on hostile input. Mapping the model onto a document stays in each app.

  • craft-deckcraft-format: the DeckCraft .deckcraft package: identity and sniffing, the presentation.json envelope with the presentation as a type parameter, NaN-safe JSON and the reader for older files with null numbers, member names and compression, and bounded, budgeted member reads. The presentation model and its mapping stay in DeckCraft.

  • craft-dwg: bounded byte-level DWG↔DXF conversion with diagnostics, capped output and an optional child-process worker; the acadrust dependency remains isolated behind bytes and is unavailable on wasm32 and FreeBSD/aarch64.

  • craft-ecproj-format: the envelope of EffectCraft .ecproj project files: savedBy, the schema version and its check, and the file object with the project and its saved view as type parameters. The project model stays in EffectCraft.

  • craft-fig: clean-room reader and writer for the .fig container (Figma Design and FigJam local copies): the ZIP archive, the chunked canvas with its kiwi schema and message, images, and the vector network and geometry blobs. Bounded on hostile input. Carved from FigCraft.

  • craft-epub: EPUB packages: the OCF ZIP container, the package document (metadata, manifest, spine) and the navigation document, written as EPUB 3 (reflowable and fixed layout) and read (EPUB 2 and 3) with bounded entry sizes. Content documents are the caller's.

  • craft-figma-rest: typed model of the Figma REST API file JSON (document tree, paints, effects, text styles, layout, component metadata), read and written with serde without losing fields it has no name for. The neutral model the .fig and .sketch readers map onto, with their extensions documented.

  • craft-ews: the SOAP layer of Exchange Web Services, from MailCraft, without sockets: the request envelope and an escaping element builder, and the answer envelope, faults and response messages with their codes, read with craft-xml. The operations and everything over HTTP stay in each app.

  • craft-exr: OpenEXR pieces shared by PhotoCraft and EffectCraft: layer and channel names, the channels that make a colour picture, and Cryptomatte IDs, metadata keys, manifests and rank channels. The optional decode feature adds bounded part listing, flat decoding (scan lines, tiles, every compression of the exr crate) and writing.

  • craft-flags: Feature flags shared by the Craft apps and the ArtCraft Launcher: one per-user ArtCraft/flags.toml, a CRAFT_FLAGS override, every flag off by default (AI-MCP, AI-MODELS).

  • craft-flow: the flow model every text format maps to (paragraphs with a kind, lists and formatted spans; tables; pictures, fields, notes, equations), converted to and from a craft-wordmodel Document.

  • craft-font-catalog: the installed fonts on every platform (font folders, fontconfig and Flatpak host folders, CoreText, DirectWrite, the font store), lookup by family, style, localized, legacy, full and PostScript names, family loads shared between threads, and rescans when fonts are installed or removed.

  • craft-font-manager: Craft Font Manager as a library: search and filters over the Google Fonts index, installed fonts by family, the font store interface, and (egui feature) FontsPanel, the whole interface as one panel for the launcher's Fonts tab and the standalone app.

  • craft-font-store: the suite's font store: the pinned Google Fonts and Noto indexes plus indexes the user adds (never curated), exact lookup by family and style or PostScript name, and installs from each source's URLs (jsDelivr, then raw GitHub) checked by size, sha256 and parsing, with the licence, a manifest, and removal. Off until the user turns downloading on; agents can't.

  • craft-fonts-build: embeds the optional craft-fonts faces from an app's build.rs (CRAFT_FONTS_DIR, CRAFT_FONTS_REQUIRED, script filters) as a table of EmbeddedFaces. No dependencies; the app picks the faces.

  • craft-gainmap: HDR gain maps, from LightCraft: the ISO 21496-1 metadata and Adobe hdrgm XMP (read and write), measuring a gain map from SDR and HDR renditions, applying one, and Apple's legacy maps. Encoding and the container stay in each app.

  • craft-gcode: Grbl-style G-code writer: polylines in millimetres to G0/G1 moves with laser power and feed, for cutting lasers and plotters, as a commented file or as bare lines for streaming. Its grbl module has the real-time command bytes and the status and acknowledgement parsers.

  • craft-gif: GIF block reader, from PhotoCraft: the logical screen, every frame's position, delay, disposal and transparent colour, the loop count and the first frame's colour table, without decompressing pixels. Tells an animation from a still and whether a file can hold the picture it declares before a decoder runs.

  • craft-gridcraft-format: GridCraft's native JSON workbook (.json, .scjson): the extensions, the reader, the pretty writer, and newer entries kept unread and written back into a list. The workbook model and what follows a read stay in GridCraft.

  • craft-hdr: Radiance HDR (RGBE) picture reader, from FilmCraft: flat, old and new run-length scan lines and all eight axis orders, to linear float RGB. Scan lines are validated before the picture is allocated.

  • craft-heif: optional HEIF/HEIC still-image decoder, from LightCraft: heic-rs reads the container and HEVC pictures, and this crate converts to 16-bit RGB to match libheif (VUI range and matrix, chroma upsampling, imir, ICC on grid tiles). Also orientation, alpha, EXIF/XMP and thumbnails. It never panics, and apps put it behind a non-default feature.

  • craft-html: the bottom layer of reading and writing HTML: a tolerant tokenizer (text, start tags, end tags; elements to drop or to read as raw text are options), character references with the legacy names browsers accept without ;, escaping, and the character set a page declares. With the flow feature, HTML documents read into and written from the craft-flow model.

  • 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-raw: camera raw files, the file-format layer, from LightCraft with what PhotoCraft's and FilmCraft's readers added: container parsing and decompression to a neutral raw image (samples, CFA, black and white levels, active area, crop, orientation, colour tags, opcode lists, embedded previews), one Cargo feature per format. DNG reading and writing, Hasselblad 3FR/FFF, Minolta MRW, Epson ERF, Mamiya MEF, Kodak DCS, Pentax PEF, Samsung SRW, Canon CR2, Nikon NEF/NRW, Panasonic RW2, Fujifilm RAF, Olympus ORF (uncompressed), Sony ARW, Canon CR3 and Canon CRW (through craft-crw) so far; demosaicing and everything after stay with the develop pipeline.

  • craft-render-parity: test support for the shared develop pipeline (#587): how far two renders of the same photo are apart (per-channel error, CIEDE2000, the worst pixel) and whether that is within a stated tolerance.

  • craft-tga: Truevision Targa, from FilmCraft (reader) and PhotoCraft (writer): true-colour, grayscale and colour-mapped pictures, raw or run-length encoded, any origin, to RGBA8, and a run-length writer whose packets end with their scan line. Bounded on hostile input.

  • craft-idml: IDML (InDesign Markup Language) packages: the ZIP container read with bounded part sizes and lenient part names, designmap.xml with its includes in place, the <Properties> form on craft-xml elements, value codecs and the package writer; and InDesign Tagged Text, read and written.

  • craft-ical: iCalendar (RFC 5545) building blocks, from MailCraft: content lines, DATE/DATE-TIME values, durations, TEXT escaping, the common subset of recurrence rules, and VTIMEZONE definitions read and written. No time-zone database; what events and to-dos mean stays in each app. Bounded and panic-free on hostile input.

  • craft-stream-codecs: byte-stream and bi-level image codecs that PDF, PostScript and TIFF share: LZW, ASCII85, ASCIIHex, RunLength, TIFF and PNG predictors, CCITT Group 3 and 4 decoding and Group 4 encoding, JBIG2 decoding and lossless encoding. Every decoder is bounded and returns its partial output on damage. From PdfCraft; a PDF filter chain is built on it in craft-pdf.

  • craft-timeline: editorial timeline interchange: exact media time and SMPTE timecode, import/export reports, media path and file:// URL handling, Avid Log Exchange (ALE) and CMX 3600 EDL documents, format detection. From FilmCraft.

  • craft-time: exact rational ticks and SMPTE time across media, with a soundcraft compatibility module retaining SoundCraft's sample-index timebase, tempo maps, grids and session serialization semantics.

  • craft-scraft-format: SoundCraft's typed .scraft session schema, versioned reader/writer, hostile-input validation, and .scraftz bundle reader/writer. Engine and UI mapping stays in SoundCraft.

  • craft-metadata: photo metadata, from LightCraft: EXIF (read and write, maker-note lens and focus point, every tag by name), IPTC-IIM, XMP packets (read, write, and a merge that keeps what another program wrote), GPX track logs, and the blocks that carry them in JPEG, PNG, WebP, TIFF-based, RAF and CR3 files. One Metadata model for all of them. Built on craft-tiff.

  • craft-tiff: TIFF and BigTIFF IFD reader and writer, from LightCraft: every field type, the IFD chain, SubIFDs and Exif/GPS/Interop pointer IFDs, maker-note IFDs (Canon, Nikon, Sony, Fujifilm, Olympus, Panasonic, Pentax), strip and tile layout. Bounded and panic-free on hostile input. Pixel decompression stays with the callers.

  • craft-metafile: Windows metafiles, from DeckCraft, WordCraft and VectorCraft: a WMF, EMF and EMF+ reader into a neutral picture (paths with line styles, pattern fills, bitmaps, text, clip regions and clip paths) and, behind write, EMF and WMF writers. Bounded and panic-free on hostile input. Mapping the picture onto a document stays in each app.

  • craft-psd: Adobe Photoshop PSD and PSB reader and writer, from PhotoCraft: a lossless format-level model (layers, masks, tagged blocks, image resources, descriptors, all four compressions, lazy reading from a file) that writes an unmodified file back byte for byte, a builder for new files, and the Photoshop resource files that share its primitives (.abr, .asl, .aco, .act, .ase, .grd, .pat, .atn, .csh, .shc) and the Photoshop blocks of a layered TIFF. Bounded and panic-free on hostile input. Compositing and the mapping onto a document stay in each app.

  • craft-ipc: Craft apps talking on one machine: per-user local sockets (Unix socket, Windows named pipe), token auth, instance discovery, launch on demand, focus hand-off, frame transfer and linked-file watching. Native only: it does not build for wasm32. Protocol in PROTOCOL.md.

  • craft-jmap: the JMAP protocol core (RFC 8620), from MailCraft, without sockets: session, requests of method calls with back-references, responses, ids, address templates, credentials and the judgement of HTTP answers, over any HTTP implementation. Bounded on hostile answers; what a program asks and makes of the answers stays in it.

  • craft-jpeg: clean-room JPEG decoder for 12-bit and arithmetic-coded frames (T.81 SOF0/SOF1 at 12 bits, SOF9, SOF10), band decoding, and an optimized 8-bit baseline encoder, from PhotoCraft; includes a frame probe for routing. Metadata interpretation stays in each app.

  • craft-raster-codecs: small raster formats, one module each, from PhotoCraft: DDS (BC1 to BC3 read and write, BC4 and BC5 read), DICOM, FITS (read and write), IFF/ILBM (read and write), PCX, PNM/PAM/PFM (read and write) and XPM, into one flat image type. Bounded and panic-free on hostile input. Colour, orientation and the document mapping stay in each app.

  • craft-kiwi: clean-room decoder and encoder for the kiwi binary schema format (the encoding inside .fig files): a schema of enums, structs and messages, and messages decoded with it into a tree keyed by field name. Bounded on hostile input. Carved from FigCraft.

  • craft-keymap: keyboard bindings: chords and their text forms, scopes, conflicts, user overrides stored through craft-settings and import of other applications' shortcut sets. Command catalogs, file readers and the shortcut editor UI stay in each app.

  • craft-audio: audio file I/O and codecs (WAV, AIFF, FLAC, AAC, Opus, AC-3/E-AC-3, MP1/MP2, MP3 encoding), streaming and seeking, and packet decoding for any demuxer. See its README for formats and features.

  • craft-latex: LaTeX documents read (the everyday subset) and written (a standalone article), to and from the craft-flow model.

  • craft-macho: Mach-O header pieces from untrusted bytes, from Craft Anything: universal (fat and fat64) slice tables checked against the file, CPU and load command names, the fixed size each load command needs before its fields are read, and the thread-state program counter.

  • craft-markdown: Markdown read and written (a CommonMark subset with GitHub tables and strikethrough), to and from the craft-flow model.

  • craft-math: equations as one tree (the Office Math object model) with its syntaxes, read and written: OMML, presentation MathML, LaTeX math and the UnicodeMath linear format.

  • craft-media: bit-level I/O (bitstream), clean-room MP4/MOV (isobmff), Matroska/WebM (matroska) and MXF (mxf) demuxers and muxers, Ogg (ogg), AVI (avi) and MPEG-TS/PS (mpegts) demuxers, from FilmCraft, a Sierra VMD (vmd) demuxer, and an ISO BMFF box reader. Containers only; codecs are in craft-audio, and video codecs will go in a separate crate.

  • craft-lottie: Lottie (Bodymovin) JSON: the document model of lottie-spec 1.0 (animation, assets, layers by type, shape items, masks, effects, text, markers) with a bounded reader and a writer that keep what they do not know, and the encodings of its values (keyframes, ease tangents, bezier paths, gradients, data URIs). From EffectCraft; mapping onto an app's document stays in the app.

  • craft-menu: an app's menus as a macOS menu bar: the Mac layout (app menu, Window, Help, system-key clashes), a platform backend trait, and key equivalents fed back to egui as the input egui-winit would have made. Commands and their enabled state stay in each app.

  • craft-mesh: 3D mesh file formats behind one neutral model (meshes of polygons with per-corner indices, materials, a node hierarchy): STL, OBJ with MTL, PLY, glTF 2.0 / GLB, FBX and 3MF, one feature each. Readers are bounded by Limits, never open a file themselves and never panic. Carved from EffectCraft, SolidCraft, TextureCraft and MaterialCraft.

  • craft-midi: Standard MIDI Files: a bounded reader for formats 0, 1 and 2 and a format-1 writer, over a neutral model of notes and channel events in ticks at 960 per quarter note. From SoundCraft.

  • craft-mime: Internet messages and MIME, read and written: RFC 5322 header fields, MIME parts and multiparts, encoded-words, RFC 2231 parameters, base64 and quoted-printable, character sets, address lists, dates, mbox files and the multipart/related lookups of MHT web archives. What a message means (body, attachments, flags) stays in each app.

  • craft-openpgp: OpenPGP as mail carries it: PGP/MIME and cleartext Digital signatures checked, attached Public keys and Autocrypt: headers read, a secret key file inspected without using it. Built on rPGP; no I/O, and every size and count is capped.

  • craft-odf: OpenDocument packages (ODF 1.3 Part 2), read and written: the ZIP container with its mimetype and manifest within limits, password protection (AES-256-CBC with PBKDF2, as LibreOffice writes it) and flat single-file documents. With the text feature, OpenDocument Text documents read into and written from the craft-flow model.

  • craft-prc: a reader for PRC (ISO 14739-1), the 3D model format of PDF 3D annotations: container, bit-level primitives, schema, tessellations and the product tree as placed, coloured triangle meshes and a model tree. Bounded on hostile input. From PdfCraft; rendering stays in the app.

  • craft-offcrypto: clean-room Office document cryptography ([MS-OFFCRYPTO]): password-encrypted OOXML packages on craft-cfb (agile and standard encryption read, with the integrity check enforced; agile written), unsupported schemes named, and the password hashes of document and sheet protection.

  • craft-ods: OpenDocument spreadsheets (.ods, .ots) on craft-odf: the tables of content.xml with typed values, displayed text, formulas as text, style names, repeats expanded and merged cells, with dates and durations as serial numbers. Bounded cells, merges and text; strict XML.

  • craft-opc: Open Packaging Conventions, the ZIP container of DOCX, XLSX and PPTX files: bounded readers (every part up front, or on demand), part names, relationships, content types and a deterministic package writer. What the parts hold stays with each format's crate.

  • craft-pcraft-format: the envelope of PhotoCraft's .pcraft bundle: Manifest<D> with the document as a type parameter, TileRef, the entry paths, the manifest decode limits and the migration runner. The document model stays in PhotoCraft.

  • craft-pkcs7: the formats of digital signatures, read, verified and written: ASN.1 DER, X.509 certificates and chains, CMS SignedData (PKCS #7), PKCS #12 identity files, RFC 3161 timestamps, and CRL / OCSP revocation evidence. What a signature means for a document or a message stays in each app.

  • craft-penpot: clean-room reader and writer for the Penpot 2.x export container (.penpot): the ZIP archive, its manifest, the per-file, per-page and per-shape JSON members and media objects, as the JSON the file holds. Bounded on hostile input. Carved from FigCraft.

  • craft-plotter: cutter and pen-plotter command languages: HP-GL, DMPL and GP-GL (plain and the Silhouette dialect, three generations, registration marks) from a job in millimetres, plus the Silhouette device queries and reply parsers. No I/O.

  • craft-ppt-binary: the PowerPoint 97-2003 binary format (.ppt, .pot, .pps; [MS-PPT], [MS-ODRAW]) read into craft-pptx, on craft-cfb. Import only. DeckCraft's reader.

  • craft-pptx: PresentationML, the model of a .pptx presentation: masters, layouts, slides, shapes, placeholders and their inheritance, transitions and animations, comments, sections, media and kept parts. From DeckCraft. DrawingML comes from craft-drawingml.

  • craft-press-print: press-accurate printing: a PDF page separated into plates by craft-prepress, composited into the printer's RGB profile and printed through craft-print's RGB transport, application-managed.

  • craft-print: PDF submission to CUPS and Windows, printer discovery, duplex/copies/colour and driver preferences. PDF generation stays in each app.

  • craft-proof: proofing per language (spelling, suggestions, grammar, hyphenation, a Hunspell reader, user words, Language packs). The word lists and patterns are craft-i18n's language-data/, embedded at build time from CRAFT_I18N_DIR: English and the carry-over locales by default, the set CRAFT_PROOF_EMBED names otherwise (en for English only); other languages come from installed Language packs.

  • craft-pst: Outlook personal folders files (.pst, [MS-PST]) read over any Read + Seek, from MailCraft: the node database, property and table contexts, folders, messages, recipients, attachments, attached messages and named properties, ANSI and Unicode, encoded or not, with a password. Salvages damaged files. Bounded and panic-free on hostile input. What an item means 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-rtf: Rich Text Format: a tokenizer, text decoding in the file's code pages (\uN, \'hh, single-byte and East Asian multibyte pages), escaping and dates, and a reader and writer for a small neutral model (paragraphs, character formatting, outline levels, tables).

  • 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.

  • craft-sheet: spreadsheet vocabulary shared by craft-xls, craft-xlsx and craft-ods: cell positions and A1 text, cell values and error values, sheet-name quoting, Excel's built-in number formats and indexed colour palette. Not a file format; no dependencies.

  • craft-sf2: SoundFont 2 (.sf2) reader: the sample pool and, per preset, the key and velocity regions a note sounds, with tuning, loop points, pan, level and volume envelope resolved from the preset and instrument zones. Bounded on hostile input. From LoopCraft.

  • craft-silhouette-studio: bounded, fail-closed reader for Silhouette Studio .studio and .studio3 documents: outlines, line colours and page size in millimetres. Protected designs are refused.

  • craft-stencilcraft-format: the versioned .stencilcraft JSON wire schema and envelope: required members, version 1 defaults, optional fields, and header checks.

  • craft-stencilcraft-document: StencilCraft's typed document model, geometry helpers, validation, and native .stencilcraft codec.

  • craft-sketch: clean-room reader for the .sketch container (Sketch 48 and newer): the ZIP archive, the version cut, document.json, the pages in document order and images, as the JSON the file holds. Bounded on hostile input. Carved from FigCraft.

  • craft-svg: SVG. sniff recognises SVG and SVGZ data; svgz unpacks SVGZ within a byte limit, decodes UTF-8, UTF-16 and ISO 8859-1, and compresses; guard bounds element nesting and entity expansion before any XML reader sees the text; paths reads geometry (shapes, transforms, <use>/<symbol> instances and the CSS cascade as Bézier paths in millimetres, each tagged by the caller); color parses CSS colours; write writes documents (elements with escaping, path data, numbers). Feature tree: the full parser, usvg at the one version every Craft app uses, re-exported behind an entry point that runs those checks first (plus nesting with references followed, attribute counts, bounded embedded SVGs), and a budget check for drawing a tree with resvg. Apps take usvg from here, not as their own dependency.

  • craft-svg-paths: the former name of craft-svg's paths, color and write; re-exports them for existing users.

  • craft-testkit: test support for the apps' own tests. Its guards module reports source patterns that broke platforms before: muda's predefined Quit item, WGSL float literals out of range, and std::time::Instant in code the web build runs. Its deadline module fails a test whose body runs past a limit, or whose condition does not hold in time; a variable the caller names replaces each limit. Its hostile module runs a parser on every truncation and on seeded damaged copies of a valid input, and fails the test with the case that panicked or did not finish. Not published.

  • craft-text: text processing below the composer. Its hyphen module finds hyphenation points, with a bundled US English dictionary and patterns and optional hypher patterns for 47 more languages (one cargo feature each).

  • craft-texture: linear float image planes, gray or RGBA, with nearest and bilinear sampling that repeats or clamps, resizing and display conversion. Sizes are bounded by Limits. From MaterialCraft.

  • craft-ui: SVG catalogs, icon buttons, tabs, pane controls, transactional docking, print settings and theme helpers for egui frontends;

  • craft-ai (spec): AI provider abstraction — BYO API keys (OpenAI-compatible) and one-click curated local models with capability probing, resumable checksummed downloads, and document segmentation that protects markup while translating prose; assets, themes, localization and command handling stay in each app. Requires Rust 1.95 or later.

  • craft-vcard: vCard contacts, from MailCraft: vCard 2.1, 3.0 and 4.0 read (legacy character sets, quoted-printable, labels and Apple label groups, KEY certificates and OpenPGP public keys), vCard 3.0 written. Bounded and panic-free on hostile input. The mapping onto an app's contact type stays in each app.

  • craft-vectorcraft-format: the envelope of VectorCraft's .vectorcraft file: its members, versions, embedded images and the data after the JSON, with the document as a type parameter. The document and its migrations stay in VectorCraft.

  • craft-vectordrawable: Android Vector Drawable writer: a model of paths, groups, clip outlines, strokes and linear, radial and sweep gradients; the XML as Android Studio formats it; and the mapping of a gradient on any affine frame to what a drawable can say. What a drawable cannot draw is the caller's to bake in or leave out. No reader.

  • craft-web-api: the page command API every Craft web build offers its page — one window.<app> shape (request, execute, commands, docInspect, uiInspect, screenshot) over the app's JSON control channel.

  • craft-web-host: the host messages between a Craft app's web build and the page that hosts it (?host=parent or data-host="page"): one contract and one bridge for every app.

  • craft-webp: the WebP container, from EffectCraft (reader) and PhotoCraft (writer): canvas size, alpha and every animation frame's timing from the chunk headers without decoding, and the RIFF container around an encoded VP8 frame with alpha, ICC, EXIF and XMP chunks. The VP8 and VP8L codecs are not part of it.

  • craft-xls: clean-room Excel 97-2003 workbook (.xls, BIFF8) reader: worksheets, cell values, formulas as A1 text (shared and array formulas included), cell formats with resolved palette colours, merged cells, column and row records, defined names, print areas and calculation settings, with limits on records, cells and text.

  • craft-wordmodel: a word-processing document model (stories, paragraphs, runs, tables, sections, styles, numbering, fields, notes, comments, revisions, drawings, math): what the text-format crates read into and write from. WordCraft's model without its editing code.

  • craft-xlsx: Excel workbooks (.xlsx, .xlsm, SpreadsheetML, transitional and strict) and binary workbooks (.xlsb) on craft-opc: the workbook part, shared strings, the styles tables and worksheet rows streamed one at a time, with limits on the package, the XML and the binary records.

  • craft-ora: OpenRaster documents (.ora): the ZIP archive and the stack.xml layer tree as written, read with bounded sizes and written. From PhotoCraft.

  • craft-sniff: what a file is from its first bytes: one dependency-free, wasm-safe signature table naming the format, its media type, extension and family for images, audio, video, 3D models, archives, compressed streams, executables and databases. Identifies only; parsing stays with each format's reader.

  • craft-tar: TAR (v7, ustar, GNU long names and base-256 sizes, local and global pax overrides) and cpio (newc, crc, odc) member walkers for hostile input, from Craft Anything: list each member, its kind, mode, link target and where its data lies, without extracting. Bounded by the input and a member cap; an optional serde feature serializes listings.

  • craft-y4m: YUV4MPEG2 (.y4m) reader, from FilmCraft: the stream header, colour space layouts at 8 to 16 bits, a frame index built from the FRAME lines without loading the file, and plane access. Bounded on hostile input.

  • craft-kra: Krita documents (.kra, .krz), read: the ZIP archive, the maindoc.xml node tree as written, and the tiled pixel files with their LZF compression, a tile at a time. From PhotoCraft.

  • craft-xcf: GIMP XCF images (.xcf, .xcf.gz), read: header, properties, parasites, layers with their item paths, channels, and tiled pixels (uncompressed, RLE, zlib) at every precision, under a caller's byte budget. From PhotoCraft.

  • craft-xml: bounded XML for hostile input: an owned element tree with limits on size, depth, nodes and attributes, streaming of repeated elements, namespace handling (as written, by local name, or canonical prefixes by URI), escaping and a writer. No DTDs and no entity expansion.

  • craft-zip: ZIP archives from untrusted files: an entry-count check before the archive is indexed (ZIP64 included), entry reads within per-entry and total budgets that count real bytes, duplicate-name detection, a strict structure preflight, and a deterministic stored/deflate writer. The shared ZIP layer for the package formats. With the lenient feature, also a reader of the raw bytes without the zip crate, from Craft Anything, for inspectors that must describe damaged archives rather than refuse them: the central-directory listing with ZIP64, prepended-stub and multi-volume checks, CP437 and Info-ZIP Unicode Path names, and entry reads (stored, DEFLATE, and bzip2, LZMA, XZ and Zstandard behind lenient-* features) checked against the declared size and CRC-32.

  • Shared UI component audit: source inventory, extraction priorities and compatibility boundaries across the Craft suite.

  • Theme infrastructure: eight-app comparison and the small shared widget-state styling boundary.

  • Panel docking: validated panel moves, floating groups, workspace adapters and an optional egui docking surface.

License and credits

craft-libs is dual-licensed under MIT or Apache-2.0, at your option. Copyright (c) 2026 ArtCraft Team and the craft-libs contributors. Required notices are in NOTICE.

Bundled fonts, icons, images and other assets keep their own open licenses; each one is listed with its author, source and license in ATTRIBUTION.md.