Commit Graph
453 Commits
Author SHA1 Message Date
FredApps e2df3ce493 Merge pull request #1844 from storytold/feature/craft-unzip
craft-zip: Craft Anything's hardened ZIP reader as craft_zip::lenient
2026-11-16 15:52:03 +01:00
FredApps e60702ab1c Merge pull request #1861 from storytold/render-parity-harness
craft-render-parity: compare two renders against a stated tolerance (#587)
2026-11-16 15:02:00 +01:00
FredApps e836b6fd89 Merge pull request #1849 from storytold/feature/craft-macho
Add craft-macho: Mach-O slice tables and header names from Craft Anything
2026-11-16 14:46:00 +01:00
FredApps ceffcc52da Merge pull request #1846 from storytold/feature/craft-pe
Add craft-pe: PE/COFF headers from Craft Anything
2026-11-16 14:45:21 +01:00
FredApps 17afe46839 Merge pull request #1843 from storytold/feature/craft-tar
Add craft-tar: TAR and cpio member walkers from Craft Anything
2026-11-16 14:36:11 +01:00
2f8b328c6f Add craft-elf: ELF program headers and dynamic entries from Craft Anything (#1851)
Moves the header pieces of Craft Anything's crates/formats/src/elf.rs
into a pure-Rust crate: the class/endian-aware reader, program_headers,
ProgramHeader, dynamic_entries, va_to_off, and the segment type,
permission and dynamic tag names. Mitigations, dynamic symbols, symbol
versions and core-file notes stay in the app.

Part of #778.

Co-authored-by: BFlat <bombayapirat@gmail.com>
Co-authored-by: Brandon Thomas <echelon@gmail.com>
Co-authored-by: GGWA <65288322+rech4210@users.noreply.github.com>
2026-11-16 08:18:20 -05:00
FredApps a80c0f25f1 ps: add a write feature for PostScript tokens (#778, #790) (#1840)
* ps: add a write feature for PostScript tokens

Numbers, strings, matrices, path data and Flate, so apps can emit a
PostScript or EPS program without owning the token serializer. Path and
paint operators can use the Language Reference names or the one-letter
names a bound prolog defines. Container concerns stay in craft-eps.

Part of #778 and #790.

* ps: tighten write-feature number trimming and Flate bounds

- Require flate2 1.1.10 so inflate rejects an incomplete zlib stream.
- Trim trailing zeros only when the token has a decimal point, so
  places=0 keeps integer zeros at the 1e15 boundary.
- Use saturating_add when bounding inflate, so max = u64::MAX does not
  overflow.
2026-11-16 07:12:00 -05:00
FredApps 9f46880bf5 Merge remote-tracking branch 'origin/main' into w1849
# Conflicts:
#	Cargo.toml
#	README.md
2026-11-16 13:01:00 +01:00
FredApps 48dcd1b472 Merge remote-tracking branch 'origin/main' into w1846
# Conflicts:
#	Cargo.toml
#	README.md
2026-11-16 13:00:41 +01:00
FredApps 356c7ceb29 Merge remote-tracking branch 'origin/main' into w1843
# Conflicts:
#	Cargo.toml
#	README.md
2026-11-16 12:59:40 +01:00
FredApps 070005125f Add craft-sniff: name a file's format, media type and extension from its first bytes (#1841) 2026-11-16 06:38:32 -05:00
FredApps 99e0f2be89 render-parity: compare two renders against a stated tolerance (#587) 2026-11-16 12:34:01 +01:00
FredApps 712feab586 craft-zip: the lenient reader as craft_zip::lenient instead of a second ZIP crate
craft-unzip's raw-bytes reader moves unchanged into craft-zip as the
`lenient` module, behind the `lenient` feature (DEFLATE) and
`lenient-bzip2`, `lenient-lzma` and `lenient-zstd` for the other
methods, with `serde` for the listing types. craft-zip's default build
is unchanged; the module doesn't use the `zip` crate. Its unit and
integration tests move with it and run in craft-zip's test build.
2026-11-16 12:25:00 +01:00
Dylan M. Taylor 37124f86d7 feat: add craft-mcp-server (JSON-RPC 2.0 MCP protocol) (#1649)
* feat: add craft-mcp-server (JSON-RPC 2.0 MCP protocol)

Port from solidcraft: MCP server machinery any app may share,
independent of transport and tools.

- JSON-RPC 2.0 over stdio (newline-delimited)
- MCP lifecycle: initialize, initialized, ping, notifications
- Tools: register, list, call with schema validation
- Resources: register, list, get by URI or template
- Prompts: register, list, get with argument completion
- Content blocks: text, image (base64), progress tokens

No external dependencies beyond serde_json.
Follows craft-libs safety pattern: #![deny(clippy::unwrap_used, ...)]

* retrigger CI

* retrigger CI

* Record MCP server dependencies in workspace lockfile

* chore: update rustls-webpki 0.103.15→0.103.16 and zip 9.1.0→9.1.3
2026-11-16 06:02:29 -05:00
65848bfe29 Add craft-macho: Mach-O slice tables and header names from Craft Anything
Moves the header pieces of Craft Anything's crates/formats/src/macho.rs
into a pure-Rust crate: fat_slices (fat and fat64), FatSlice, cpu_name,
load_command_name, load_command_min_size, nibble_version and
unixthread_pc. The load command walker, symbols, stubs and Objective-C
metadata stay in the app.

Part of #778.

Co-authored-by: Afloat <ShuffleMonkey@163.com>
Co-authored-by: BFlat <bombayapirat@gmail.com>
Co-authored-by: Brandon Thomas <echelon@gmail.com>
Co-authored-by: Cr <60964294+Chr0mium24@users.noreply.github.com>
Co-authored-by: GGWA <65288322+rech4210@users.noreply.github.com>
2026-11-16 11:47:05 +01:00
4123d1235b Add craft-pe: PE/COFF headers from Craft Anything
Moves the header half of Craft Anything's crates/formats/src/pe.rs into
a pure-Rust crate: PeHeaders/PeSection, headers, has_pe_header,
subsystem_name, rich_header, the data-directory names and the RVA
mapping helpers. The import, export, resource and program-model code
stays in the app for now.

Part of #778.

Co-authored-by: Afloat <ShuffleMonkey@163.com>
Co-authored-by: BFlat <bombayapirat@gmail.com>
Co-authored-by: Brandon Thomas <echelon@gmail.com>
2026-11-16 11:43:48 +01:00
ecc89eccff Add craft-unzip: Craft Anything's hardened ZIP reader
Moves Craft Anything's crates/formats/src/zip.rs, zip_file.rs and the
entry decoders from decompress.rs into a pure-Rust crate, keeping the
R3.12 hardening: directory and extra-field bounds, ZIP64 end-record
recovery after a prepended stub, multi-volume refusal, CRC-checked
Info-ZIP Unicode Path names, decoded-size and CRC-32 checks.

bzip2, LZMA/XZ and Zstandard entry methods sit behind default features;
Serialize sits behind an optional serde feature.

Part of #778.

Co-authored-by: Afloat <ShuffleMonkey@163.com>
Co-authored-by: BFlat <bombayapirat@gmail.com>
Co-authored-by: Brandon Thomas <echelon@gmail.com>
Co-authored-by: GGWA <65288322+rech4210@users.noreply.github.com>
Co-authored-by: Max Mittelstädt <62167861+TheGalitube@users.noreply.github.com>
Co-authored-by: NetterSilver <133535268+Silvertree2010@users.noreply.github.com>
Co-authored-by: RRFZ <247457381+Plastic-time@users.noreply.github.com>
Co-authored-by: Roman Serikoff <serikoff@li.ru>
2026-11-16 11:40:58 +01:00
d25dcc5773 Add craft-tar: TAR and cpio member walkers from Craft Anything
Moves Craft Anything's crates/formats/src/tarcpio.rs (main 090188d7) into a shared crate with
its unit tests, the TAR integration tests from crates/formats/tests, and the archive builders
those tests use. The public API is unchanged; CpioChecksum and cpio_with_checksum become public
so the app's firmware scanner can keep sharing its checksum allowance. The pax record handling
is split out of the walker (same checks, same warnings) to stay under the workspace's
cognitive-complexity limit. Serialize is behind an optional `serde` feature.

Co-authored-by: Brandon Thomas <echelon@gmail.com>
Co-authored-by: Afloat <ShuffleMonkey@163.com>
Co-authored-by: BFlat <bombayapirat@gmail.com>
Co-authored-by: RRFZ <247457381+Plastic-time@users.noreply.github.com>
Co-authored-by: NetterSilver <133535268+Silvertree2010@users.noreply.github.com>
2026-11-16 11:30:54 +01:00
FredApps 341020b2c1 Merge pull request #1757 from el-j/feat/video-mjpeg
craft-video: Motion JPEG decoder and encoder (mjpeg)
2026-11-16 11:18:40 +01:00
FredApps 4ffa307f1a Merge pull request #1407 from AlexChambers/craft-heif/primary-item-metadata
craft-heif: items reads the primary image's EXIF and XMP; add scan for every metadata item
2026-11-16 08:19:32 +01:00
FredApps 3a85d8b69a Merge pull request #1725 from storytold/codex/shared-positioned-glyph
Share composed glyph model and caret placement
2026-11-16 07:06:59 +01:00
FredApps 51b074a35a Merge pull request #1627 from storytold/pr-solidcraft-format
feat: add craft-format (versioned JSON file formats)
2026-11-16 06:55:33 +01:00
FredApps fa56e8854b Merge remote-tracking branch 'origin/main' into w1777 2026-11-16 03:13:21 +01:00
FredApps 462fe40be1 Merge remote-tracking branch 'origin/main' into w1627 2026-11-16 02:54:17 +01:00
Dylan M. Taylor 5ac7c9664c Merge pull request #1778 from storytold/fix/rav1e-threading
Forward opt-in threading to rav1e encoder dependencies
2026-11-15 20:53:17 -05:00
FredApps eef0d8ae36 Merge pull request #1605 from storytold/extract/shx-compiler
shx: extract CADCraft SHP to SHX compiler
2026-11-16 02:32:29 +01:00
FredApps 0c15f7c749 Merge pull request #1723 from storytold/codex/shared-jsonrpc-io
Share asynchronous JSON-RPC line adapter
2026-11-16 02:32:15 +01:00
el-j 252c959167 Merge remote-tracking branch 'origin/main' into feat/video-mjpeg 2026-11-16 02:22:43 +01:00
FredApps d4f5f1e0c4 Merge remote-tracking branch 'origin/main' into w1777 2026-11-16 02:14:58 +01:00
FredApps cb504733bf Merge pull request #1635 from storytold/codex/shared-shaped-run
Share contextual directional text shaping
2026-11-16 02:13:00 +01:00
FredApps 9a6d894200 Add craft-gridcraft-format: GridCraft's native JSON workbook (#1749)
GridCraft's native workbook format, moved from storytold/gridcraft at
1d0b311b: the `.json`/`.scjson` extensions (crates/engine/src/io.rs), the
reader and its error text (io.rs), and the pretty writer with newer macros kept
unread and appended to `macros` as the file held them
(crates/engine/src/macros/mod.rs json_bytes).

The Workbook model, the index rebuilds after a read, and macro reading stay in
GridCraft. The consumer's golden test shows saved bytes are unchanged.

Part of #778.
2026-11-16 02:03:41 +01:00
Dylan M. Taylor d99d0d3f9d Merge main preserving AVIF threading and SGI features 2026-11-15 19:32:43 -05:00
FredApps 38b5ba8b7d Merge remote-tracking branch 'origin/main' into w-r-shx
# Conflicts:
#	Cargo.toml
2026-11-16 01:15:16 +01:00
FredApps a997649d15 Merge remote-tracking branch 'origin/main' into w-r-pr-solidcraft-format 2026-11-16 01:15:09 +01:00
FredApps 030a9dda15 Merge pull request #1765 from storytold/extract/light-http-url
http-url: extract bounded HTTP URL and redirect syntax from LightCraft
2026-11-16 01:12:20 +01:00
Dylan M. Taylor ea4f63d574 fix: lock optional AVIF threading dependencies 2026-11-15 18:52:41 -05:00
FredApps 5b74db07d1 Merge remote-tracking branch 'origin/main' into w-pr-solidcraft-format 2026-11-16 00:42:01 +01:00
FredApps 89e3bf0861 Merge remote-tracking branch 'origin/main' into w-extract/shx-compiler
# Conflicts:
#	Cargo.toml
2026-11-16 00:22:44 +01:00
FredApps 3cde950739 Merge remote-tracking branch 'origin/main' into w-codex/shared-jsonrpc-io
# Conflicts:
#	crates/jsonrpc/src/lib.rs
2026-11-16 00:22:34 +01:00
FredApps 095ba1ce29 Merge remote-tracking branch 'origin/codex/fbx-package' into fredapps/i778-fbx-batch 2026-11-16 00:19:57 +01:00
FredApps 01f9fdaebc Merge remote-tracking branch 'origin/main' into shaped
# Conflicts:
#	crates/font-catalog/src/lib.rs
2026-11-16 00:15:08 +01:00
FredApps 9687434f72 Merge pull request #1632 from storytold/codex/shared-font-outline
Share catalog face metrics and glyph outlines
2026-11-16 00:11:44 +01:00
FredApps 6bd1c3dc35 Merge pull request #1715 from storytold/codex/filmcraft-project-format
Share FilmCraft project envelope and schema migrations
2026-11-16 00:10:16 +01:00
FredApps 99d0a6eca4 Merge pull request #1724 from storytold/codex/shared-control-protocol
Share authenticated JSON-lines control protocol
2026-11-16 00:10:04 +01:00
FredApps 24a9b2928e Merge pull request #1722 from storytold/extract/dds-float-surface
craft-texture: add bounded DDS float surface adapter
2026-11-16 00:07:17 +01:00
FredApps 947dc5fb0e Merge pull request #1630 from storytold/codex/shared-tiff-inspection
Share first-directory TIFF inspection
2026-11-16 00:05:27 +01:00
FredApps 254e9a409b Add craft-deckcraft-format: the .deckcraft package layer from DeckCraft (#1748)
The package layer of DeckCraft's native format, moved from storytold/deckcraft
crates/format at 0d5c0b85 (lib.rs, finite.rs): the mimetype and legacy
SlideCraft type, sniffing, the presentation.json envelope (generic over the
app's presentation), the NaN-safe JSON writer (Finite), the reader that patches
null numbers in older files, member names and compression choice, and the
bounded, budget-charged member reads with the format's limits.

The presentation model, repair, media and chart-part mapping, and outline/RTF
stay in DeckCraft. Writes go through craft-zip's deterministic writer; the
consumer's golden test shows the package bytes are unchanged.

Part of #778.
2026-11-15 23:44:31 +01:00
Dylan M. Taylor 7b58f84547 Merge main for shared HTTP URL integration 2026-11-15 17:30:48 -05:00
Dylan M. Taylor 4ce781dab2 Merge pull request #1738 from storytold/extract/usd-crate-codec
Extract bounded USD Crate LZ4 decompression
2026-11-15 17:04:17 -05:00
FredApps d1a431c4b5 audio: pure-Rust Vorbis encoder (1-8 channels, quality, tags, wasm) and an Ogg page writer (#1642)
* audio: pure-Rust Vorbis encoder, and an Ogg page writer in craft-media

Replace the libvorbis wrapper (vorbis_rs, C, desktop only) behind
`vorbis-encode` with FilmCraft's clean-room Vorbis I encoder by
@JordyUSA (storytold/filmcraft#4481), and move its Ogg page writer into
craft-media's `ogg` module.

craft-audio:
- `vorbis::encoder::{Encoder, EncoderConfig, Error}`: 1-8 channels in
  Vorbis order, any sample rate, quality -1 to 10 (VBR), streaming
  packets with granule positions.
- `encode_ogg_vorbis` with `OggVorbisOptions` (quality, vendor, tags,
  serial) writes a whole Ogg Vorbis file with a comment header.
- `encode_ogg(buf, kbps)` and `OGG_BITRATES` keep working: the bit rate
  picks the quality whose nominal rate it is (`quality_for_bitrate`).
- `encode` with `EncodeFormat::Ogg` takes 1-8 channel WAV-order layouts
  and writes them in Vorbis order, and `RateControl::Quality`.
- Ogg is built on wasm32 too.
- Residue partitions hold whole sample frames (48, 40, 48 or 56 values
  for 3, 5, 6 and 7 channels): libvorbis decodes each partition from
  channel 0, so 32-value partitions came out scrambled for those counts.
- The first audio packet gets a page of its own, so a short file's
  first audio page is never also its last (ffmpeg then kept the padding).

craft-media: `ogg::PageWriter`, `opus_tags`, `vorbis_comment`.

Part of storytold/craft-libs#778.

* audio, media: address review on the Vorbis encoder and Ogg writer

- Encoder: read cursor into the pending input, compacted once per call,
  so a large encode() call no longer moves the tail on every block.
- Tests: check ffmpeg's libvorbis decoder only when ffmpeg has it.
- PageWriter::finish: the end granule replaces the last page's only when
  a packet completes on it (RFC 7845 4.4); documented and tested.
- README: Ogg Opus packet granules are the samples decoded so far.

* audio: pick Ogg by extension on wasm32 too

The Vorbis encoder is pure Rust now, so encode_format_for("ogg") follows
the vorbis-encode feature alone, as EncodeFormat::Ogg.is_built() and
ENCODE_EXTENSIONS already do.
2026-11-15 22:59:29 +01:00