Skip to content

Drop the emscripten build retry in grida-canvas-wasm once skia-bindings is fixed upstream #66

Description

@softmarshmallow

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions