Skip to content

ci(wasm): pin wasm build toolchain for deterministic size; re-tighten size budget #128

Description

@dean0x

Problem

The WASM size guard in ci.yml is non-deterministic. The wasm job uses unpinned dtolnay/rust-toolchain@stable, so codegen size drifts as Rust stable advances. During the v0.3.0 release CI, crates/mds-wasm/pkg/mds_wasm_bg.wasm measured 601,566 bytes — over the 600,000 guard — with no WASM source change (local toolchain emits ~592,494 bytes). The binary sits right on the threshold and the CI toolchain tips it over.

Band-aid applied

Raised the guard to 650,000 (ci.yml, landed on main in the v0.3.0 release PR #126) to unblock. This trades away bloat sensitivity.

Proper fix

  1. Pin the wasm build toolchain (and ideally the napi build toolchain) to a known Rust version so binary size is reproducible across local/CI/time.
  2. Once deterministic, re-tighten the size budget to a meaningful value with documented headroom.

Found during the v0.3.0 release.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions