crates/grida-canvas-wasm/justfile carries a two-phase build: the first
cargo build --target wasm32-unknown-emscripten is expected to fail, the
recipe then seeds lib<x>.wasm.a as a copy of lib<x>.a, and builds again.
It exists because skia-bindings' BinariesConfiguration::commit_to_cargo()
copies lib<x>.wasm.a onto lib<x>.a for every emscripten target, while the
published prebuilt archives contain only lib<x>.a. The copy therefore panics
on a missing source before anything is compiled. Reported upstream as
rust-skia/rust-skia#1310.
The seeding is an identity operation — the build script copies each seeded file
straight back over itself — so nothing that gets linked changes. It costs one
wasted cargo invocation (~20s) per wasm build.
Landed in d11a78b alongside the skia-safe 0.93.1 → 0.99.0 upgrade (2197b18).
Close this by deleting the retry once a released skia-bindings no longer
panics when the .wasm.a is absent. Both shapes proposed upstream fix it:
skipping the copy when the source file is missing, or running it only on the
from-source path.
Verification when removing: from a clean
target/wasm32-unknown-emscripten/release/build/skia-bindings-* directory,
just build must succeed on the first cargo build, and the node smoke test
(pnpm --filter @grida/canvas-wasm test) must still pass.
crates/grida-canvas-wasm/justfilecarries a two-phase build: the firstcargo build --target wasm32-unknown-emscriptenis expected to fail, therecipe then seeds
lib<x>.wasm.aas a copy oflib<x>.a, and builds again.It exists because
skia-bindings'BinariesConfiguration::commit_to_cargo()copies
lib<x>.wasm.aontolib<x>.afor every emscripten target, while thepublished prebuilt archives contain only
lib<x>.a. The copy therefore panicson a missing source before anything is compiled. Reported upstream as
rust-skia/rust-skia#1310.
The seeding is an identity operation — the build script copies each seeded file
straight back over itself — so nothing that gets linked changes. It costs one
wasted cargo invocation (~20s) per wasm build.
Landed in d11a78b alongside the skia-safe 0.93.1 → 0.99.0 upgrade (2197b18).
Close this by deleting the retry once a released
skia-bindingsno longerpanics when the
.wasm.ais absent. Both shapes proposed upstream fix it:skipping the copy when the source file is missing, or running it only on the
from-source path.
Verification when removing: from a clean
target/wasm32-unknown-emscripten/release/build/skia-bindings-*directory,just buildmust succeed on the firstcargo build, and the node smoke test(
pnpm --filter @grida/canvas-wasm test) must still pass.