The SBS library import (#219) embeds every file under assets/sbs into
every build, the browser one included. Its resources/ bitmaps are already
compressed PNG/EXR/BMP (14.1 MB, deflate saves 1%), and with them the
release wasm grew from 14.3 MB to 33.3 MB, past the 24 MiB gate in
packaging/web/package.sh that guards Cloudflare Pages' 25 MiB file cap.
The nightly Release dry run has failed on Web (wasm) since.
For wasm32 the formats build script now leaves resources/ out of the
embedded library and lists it as EXTERNAL_ASSETS. index.html copies
assets/sbs/resources to sbs/resources in the dist, and the web app
downloads those files at startup (in parallel, before the session is
created) and hands them to library::install, so library::read serves
them as before. A failed download is logged and surfaces as a missing
asset on the nodes that use it; startup goes on. Native builds still
embed everything.
A unit quad with a large node translation was collapsing: the world-space
positions were cast to f32 first, and at magnitude 2^25 the f32 spacing is
4, so all four corners rounded to one point. normalize_to could not recover
the shape. Center and scale in f64, then convert.
Normals of a placed mesh now go through craft_mesh::transform_normal, so a
non-uniform scale leaves them perpendicular to the surface. A mirrored
placement (craft_mesh::is_mirror) has its triangles' winding reversed so they
keep facing out. When any placed mesh has no UVs the combined mesh keeps none,
so load_mesh projects them instead of leaving that mesh on one texel.
Refs storytold/craft-libs#778
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.
OBJ and glTF/GLB meshes for the 3D view now come from craft-mesh's obj and
gltf readers (craft-libs main 57288eda) instead of the tobj and gltf crates.
Meshes are placed with Scene::instances, so a mesh under a transformed parent
node takes its parent's transform. Normalisation, box UVs, tangents and the
vertex/triangle limits stay in the app.
Refs storytold/craft-libs#778
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.
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.
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.
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.
* 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
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.
* 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
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.