Skip to content

v0.2.51 — sdivi-rust v0.2.51 — Binaryen-free WASM builds

Latest

Choose a tag to compare

@GeoffGodwin GeoffGodwin released this 03 Jun 20:34

sdivi-rust v0.2.51 — Binaryen-free WASM builds

A small maintenance release (M50) that lets bindings/sdivi-wasm build with
wasm-pack in network-restricted / corporate environments that lack the
binaryen toolchain (wasm-opt). No source or behaviour change; snapshot_version
stays "1.0".

Highlights

  • Disabled wasm-opt post-processing in the wasm-pack release profile. By
    default wasm-pack build runs wasm-opt and, when binaryen isn't on PATH,
    tries to download it — which fails behind a corporate proxy/airgap and breaks
    the build. The size-optimised [profile.release-wasm] Cargo profile
    (opt-level = "z", fat LTO, codegen-units = 1) already provides the primary
    size reduction, so wasm-opt is now disabled via
    [package.metadata.wasm-pack.profile.release] wasm-opt = false. Source builders
    no longer need binaryen.

Size impact

Dropping the wasm-opt pass grows the bundler/node .wasm by ~10%
(≈1,531,484 → ≈1,679,707 bytes) but stays comfortably within the existing
1.75 MB (1,835,008-byte) per-target budget, with ~155 KB of headroom. The trade —
a fragile toolchain dependency for ~10% size — favours the project's primary
audience (corporate / network-restricted builders).

What did not change

  • snapshot_version is still "1.0". Snapshot JSON, the 19-category contract,
    pattern_metrics, and DivergenceSummary are unchanged from v0.2.50.
  • No public-API change, no new .sdivi/config.toml keys, no analysis behaviour change.
  • The published @geoffgodwin/sdivi-wasm exposes the identical wasm-bindgen surface;
    only the codegen post-processing differs.
  • The WASM dependency invariant (Rule 21) holds.

Install

# crates.io
cargo install sdivi-cli

# pre-built binary (Linux x86_64 example)
curl -Lo sdivi https://github.com/GeoffGodwin/sdivi-rust/releases/download/v0.2.51/sdivi-x86_64-unknown-linux-gnu
chmod +x sdivi && mv sdivi ~/.local/bin/

# WASM / npm
npm install @geoffgodwin/sdivi-wasm@0.2.51

Documentation

Released under Apache 2.0.

Full Changelog: v0.2.50...v0.2.51