Commit Graph
448 Commits
Author SHA1 Message Date
Dylan M. Taylor e32f0c496b docs: prefer shared Craft libraries for reusable code 2026-11-16 06:28:04 -05:00
FredApps b71c02cacd Merge pull request #259 from storytold/onee/789-svg-shared-tree
#789: read SVG resources through craft-svg's bounded tree and draw
2026-11-16 12:14:36 +01:00
FredApps ff00b06a4c #789: share one usvg nesting budget between an SVG and the SVGs it embeds
The document gets 32 levels and the image resolver is seeded with them, so
embedded SVGs (and their embeddings) only get the remaining 32 of a 64-level
total, about 1 MB of usvg stack. Previously the tree depth of 64 applied to the
document and to each embedded SVG separately.
2026-11-16 11:33:51 +01:00
FredApps e25de7b9a8 #789: read SVG resources through craft-svg's bounded tree and draw
The SVG node's resources were parsed and drawn with a direct usvg/resvg 0.47
dependency, so a hostile file could expand entities, nest past the stack or
allocate layers without a bound. Parsing now goes through craft_svg::tree
(preflight on bytes, SVGZ, entities, attributes and nesting; an image resolver
that never reads linked files and bounds embedded images) and drawing through
craft_svg::tree::draw::render, which refuses a drawing whose buffers would
exceed 1 GiB. The direct resvg dependency is removed.

Part of storytold/craft-libs#778 and storytold/craft-libs#789.
2026-11-16 11:11:35 +01:00
FredApps 983e3276f6 Merge pull request #255 from storytold/refactor/shared-sbs-base64
Use shared Base64 encoding for SBS embedded resources
2026-11-16 07:41:54 +01:00
FredApps fa58e0b8af Merge main into refactor/shared-sbs-base64 2026-11-16 06:47:27 +01:00
FredApps 627fbedd37 Merge pull request #254 from storytold/extract/shared-dds-float
Use shared DDS float surface decoding
2026-11-16 01:37:11 +01:00
FredApps 8402c56d45 formats: name the dds test header by its module path 2026-11-16 01:10:30 +01:00
FredApps 3cd7d04743 Merge remote-tracking branch 'origin/main' into w254
# Conflicts:
#	Cargo.lock
#	Cargo.toml
2026-11-16 01:06:53 +01:00
Dylan M. Taylor 271890af61 Merge pull request #253 from storytold/extract/shared-format-codec
Reuse shared XML escaping for SBS attributes
2026-11-15 18:04:47 -05:00
Dylan M. Taylor faa78d4175 Reuse shared Base64 output for SBS embedded resources 2026-11-15 14:26:33 -05:00
Dylan M. Taylor c0d8e921eb Use shared DDS float surface decoder
Keep original MaterialCraft transfer and first-surface policy; move backend access and checked allocation to craft-texture.
2026-11-15 14:00:31 -05:00
FredApps 6c3b35c396 Merge pull request #219 from storytold/191-sbs-based-node-imports
SBS Based Node Imports
2026-11-15 18:59:42 +01:00
Dylan M. Taylor 258e74cc86 Merge pull request #252 from storytold/codex/zip-guard-pin
Adopt shared ZIP64 entry-count guard fix
2026-11-15 11:54:33 -05:00
Dylan M. Taylor 5cf55f805c Keep shared XML lockfile entry in Cargo order 2026-11-15 11:44:04 -05:00
FredApps ed08636c7c Merge main shared material archive integration 2026-11-15 17:27:13 +01:00
Dylan M. Taylor fd0f4bd4c1 Reuse shared XML escaping for SBS attributes 2026-11-15 11:08:29 -05:00
Dylan M. Taylor 3e361b2af5 Adopt shared ZIP64 entry-count guard fix 2026-11-15 15:47:19 +00:00
FredApps f0cfb5682d Isolate resize render timing from parallel UI tests 2026-11-15 16:43:14 +01:00
Dylan M. Taylor 18c25a3f87 Merge pull request #246 from storytold/codex/shared-mcmat-consumer
Use shared portable material archives
2026-11-15 08:43:00 -05:00
Dylan M. Taylor 5d7dcd8029 Pin merged shared material format 2026-11-15 13:08:27 +00:00
Dylan M. Taylor 01f0c70648 Use bounded portable material detection 2026-11-15 11:39:50 +00:00
Dylan M. Taylor f4e079b49d Use shared portable material archive 2026-11-15 11:36:22 +00:00
FredApps 46a7d647d2 Fix missing If/Else value branch types 2026-11-15 11:19:47 +01:00
chasse20 6c26296dce Auto: Normalize library resource paths before relativizing
Normalize the library resource path alongside the destination to avoid Windows verbatim-prefix mismatches. Assert that saving retains the portable relative link resources/tile.svg.
2026-11-15 00:14:53 +00:00
chasse20 a21a62b211 Auto: Remove normal-map display-toggle integration test
Remove display_toggle_updates_the_session_and_rerenders_the_normal_map.
Retain the ignored normal-convention snapshot test.
2026-11-14 23:44:36 +00:00
chasse20 b41dec44a0 Auto: Merge main and preserve SBS resource loading repairs
Integrate main through 6f19501, including bounded automation reads,
exclusive atomic-write temporaries, and SBS resource-name tracking.

Resolve the reader conflicts by retaining linked resources, replacements,
and font fallback while reserving all names in the shared set. Add mixed
resource round-trip coverage for the integration.

Validation: 96 targeted release tests; scoped clippy, wasm, and formatting.
2026-11-14 22:57:51 +00:00
chasse20 1a7225c8c2 Auto: Reuse SBS parsing and fix stale preview cache failures
Integrate main's read limits and preserve the font, evaluator, converter,
and measured preview repairs. Complete the scoped type, comment, and
spacing cleanup.

Reuse one validated XML document for library layout and graph reads.
Associate cache maintenance completion with its submitted revision so
old failures cannot consume new settings or clear requests.
2026-11-14 22:52:26 +00:00
Dylan M. Taylor 6f19501a4b automation: cap workspace and trusted-local reads at 2 GiB (#240)
* automation: cap workspace and trusted-local reads at 2 GiB

* automation: format the read-cap changes

* automation: drop unneeded mut from capped reads

* automation: cover trusted read size and file-kind checks
2026-11-14 17:31:30 -05:00
Dylan M. Taylor cd9addceb4 formats: use a set for unique SBS resource names (#242)
Every resource rebuilt a vector of all existing names and scanned it linearly, making duplicate-heavy packages quadratic on open. Track used names in a HashSet and add a duplicate-name regression test.
2026-11-14 16:55:33 -05:00
Dylan M. Taylor 3a08213c55 formats: create atomic-write temps exclusively so a planted symlink is never followed (#239) 2026-11-14 15:55:15 -05:00
Dylan M. Taylor 703d3b1cf4 Bound SBS input bytes, wire counts and stored warnings (#237)
* formats: bound SBS input, wires and stored warnings

* formats: format the SBS size check
2026-11-14 15:21:33 -05:00
Dylan M. Taylor 6f5812f8ef engine: cap linked SBS resources at 256 MiB (#236) 2026-11-14 15:21:29 -05:00
Dylan M. Taylor 3a2b421e6d Refuse oversized .mcraft archives (#235)
* Refuse oversized .mcraft archives

The archive reader had no entry-count, per-entry or aggregate decompression
limit: every member was read to its end and retained, so a small zip bomb
could exhaust memory on Open. Members are now limited to 100 000 entries,
256 MiB each and 1 GiB together, and a member is read at most one byte past
its allowance before the archive is refused.

* formats: drop the unused mut on the capped zip entry
2026-11-14 14:32:52 -05:00
Chris Hassebrook bb7434478c Matching CI to TextureCraft (#222)
* ci: port TextureCraft verification improvements

* fix: keep CI green on stable Rust
2026-11-14 08:52:48 +01:00
Chris Hassebrook 848d7fd63b Merge pull request #220 from storytold/style-guidelines
Helpful Style Guidelines
2026-11-14 00:47:27 -05:00
chasse20 9ac3a142f5 Restore original AGENTS.md 2026-11-13 23:37:10 -05:00
chasse20 6b517db158 Add Rust code style guidelines 2026-11-13 23:31:06 -05:00
chasse20 e9b777bee2 CPR review #1 2026-11-14 03:45:23 +00:00
chasse20 c28d66b620 Added a proper substitute to perm.png by artist instead of the clean-room, generated noise pattern 2026-11-13 20:32:10 -05:00
chasse20 8737d45b64 Use shared Liberation fallback for clean-room SBS assets
Preserve available user fonts and use craft-fonts Liberation Mono only when font data is missing. Keep original identifiers and retain repairable references if the fallback is unavailable.

Attribute the bundled clean-room SBS library, remove the bundled font binary, and share documentation and license staging across Windows MSI and portable packages.
2026-11-13 17:00:24 -05:00
chasse20 43f665f988 Revert "Document approved GUST and BSD-3-Clause licences"
This reverts commit cfe1779df3.
2026-11-13 16:14:32 -05:00
chasse20 cfe1779df3 Document approved GUST and BSD-3-Clause licences 2026-11-13 13:20:46 -05:00
chasse20 2318d25a3a Improve clean-room SBS evaluation parity 2026-11-13 11:46:15 -05:00
FredApps 3133062968 Merge pull request #147 from SteamSmith/fix/146-mcp-ui-input-schema
Give ui_input events an object item schema
2026-11-13 10:28:38 +01:00
chasse20 941aa5722f Configure and clear the library preview cache 2026-11-12 20:06:44 -05:00
chasse20 db0baa1c2d Persist library previews in a bounded platform cache 2026-11-12 19:43:34 -05:00
chasse20 cc2437c0bd Bound render caches and cancel stale library previews
Cap retained output and decoded-image data, bypass oversized entries, and give thumbnail cooks smaller cache budgets. Limit visible preview work to one cancellable cook, yield to foreground edits, and evict old GPU thumbnails.

Cover cache eviction, image and library lifetimes, cancellation, and repeated preview rendering with regression checks.
2026-11-12 19:19:43 -05:00
chasse20 46802a44fc Merge latest SBS branch improvements
Preserve resource and rendering fixes alongside updated library previews, node UI, and function input support. Reconcile evaluator state and loop caching while retaining both sets of regression tests.
2026-11-12 18:52:32 -05:00
chasse20 3432f14b53 Fix SBS resource resolution and shared graph rendering
Use the supplied attributed resources, replace legacy surface and font references on import, and keep resource credits outside SBS files.

Correct function evaluation state, FX-Map roughness and regions, primitive rendering, gradient handling, and scalar luminosity validation. Add regression coverage for resource import and shared rendering behavior.
2026-11-12 18:46:34 -05:00