Skip to content

feat(wasm): add browser WebAssembly support - #6

Open
ddurst-nvidia wants to merge 7 commits into
NVIDIA:mainfrom
ddurst-nvidia:feat/ddurst-nvidia/wasm
Open

feat(wasm): add browser WebAssembly support#6
ddurst-nvidia wants to merge 7 commits into
NVIDIA:mainfrom
ddurst-nvidia:feat/ddurst-nvidia/wasm

Conversation

@ddurst-nvidia

@ddurst-nvidia ddurst-nvidia commented Aug 18, 2026

Copy link
Copy Markdown
Collaborator

Pull Request

Why

  • Make the YamlSigil Rust implementation usable from browser-oriented
    wasm32-unknown-unknown consumers through a narrow JavaScript boundary.

What changed

  • Make runtime dependency features compatible with browser WebAssembly and
    embed the optional signature schema at compile time.
  • Add the unpublished, source-only yaml-sigil-wasm crate with typed
    compose, decompose, sign, and verify results.
  • Validate selectors and key encodings at the JavaScript boundary, preserve
    stable error codes, and document copying and best-effort zeroization limits.
  • Add Node.js and Firefox tests, a generated-JavaScript API smoke test,
    optimized size reporting, and temporary-artifact cleanup under
    cargo xtask wasm.
  • Add WebAssembly validation to copied-head and protected hosted CI.

Review guide

  • Start with crates/yaml-sigil-wasm/src/lib.rs for the exported API and
    result mapping.
  • Review crates/yaml-sigil-wasm/tests/ for boundary and generated-binding
    coverage.
  • Review xtask/src/wasm.rs, .github/workflows/ci.yml, and
    .github/workflows/pr-ci.yml for runtime validation, size measurement, and
    artifact cleanup.

Compatibility impact

  • Existing native APIs and wire formats are unchanged.
  • The workspace continues to require Rust 1.95.0.
  • The new JavaScript API is unpublished and source-only.

Dependency and licensing impact

  • Adds wasm-bindgen, js-sys, zeroize, wasm-bindgen-test,
    console_error_panic_hook, and tempfile; their licenses are MIT,
    Apache-2.0, or dual MIT/Apache-2.0.
  • No executable WebAssembly, npm package, copied third-party source, or new
    third-party notice is included.

Related issue

Refs #5.

Testing

  • cargo +1.95.0 xtask ci
  • cargo +1.95.0 xtask wasm --candidate-root . with Node.js 22.23.2,
    Firefox 154.0, and wasm-pack 0.15.0: all 14 shared tests passed in Node.js
    and Firefox, the generated API smoke test passed, and no .wasm output was
    retained.
  • RUSTFLAGS='-D warnings' cargo +1.95.0 check --locked --manifest-path xtask/Cargo.toml --target x86_64-pc-windows-gnu
  • python3 -m unittest discover -s .github/scripts -p 'test_protected_pr_ci.py'
  • actionlint 1.7.12
  • shuck check .github/scripts
  • Optimized web module measurements: 548,492 bytes by default and 3,411,426
    bytes with json-schema-validate.

Checklist

  • I confirmed this belongs in the Rust implementation repository and is
    not a language-neutral specification change better handled in
    yaml-sigil-spec.
  • I confirmed this change does not bypass or conflict with the public API
    contract in
    yaml-sigil-traits; any required
    traits changes are already available or tracked as coordinated work.
  • I have the right to submit this contribution and every commit includes a
    Signed-off-by trailer.
  • I understand and can explain this change.
  • I updated documentation or tests where needed.
  • I reviewed CONTRIBUTING.md and SECURITY.md.

@ddurst-nvidia
ddurst-nvidia force-pushed the feat/ddurst-nvidia/wasm branch 2 times, most recently from 3faecfd to 470885e Compare August 21, 2026 15:49
@copy-pr-bot

copy-pr-bot Bot commented Aug 21, 2026

Copy link
Copy Markdown

Auto-sync is disabled for draft pull requests in this repository. Workflows must be run manually.

Contributors can view more details about this message here.

@ddurst-nvidia
ddurst-nvidia force-pushed the feat/ddurst-nvidia/wasm branch 3 times, most recently from a5ac74d to a9bac16 Compare August 24, 2026 15:14
@ddurst-nvidia
ddurst-nvidia marked this pull request as ready for review August 24, 2026 15:15
@ddurst-nvidia
ddurst-nvidia force-pushed the feat/ddurst-nvidia/wasm branch 6 times, most recently from 96a504e to f0c4b05 Compare August 26, 2026 23:59
@ddurst-nvidia

Copy link
Copy Markdown
Collaborator Author

/ok to test f0c4b05

@ddurst-nvidia
ddurst-nvidia force-pushed the feat/ddurst-nvidia/wasm branch from f0c4b05 to 341d493 Compare August 28, 2026 23:27
Signed-off-by: ddurst <267424412+ddurst-nvidia@users.noreply.github.com>
Signed-off-by: ddurst <267424412+ddurst-nvidia@users.noreply.github.com>
Signed-off-by: ddurst <267424412+ddurst-nvidia@users.noreply.github.com>
Signed-off-by: ddurst <267424412+ddurst-nvidia@users.noreply.github.com>
Signed-off-by: ddurst <267424412+ddurst-nvidia@users.noreply.github.com>
Signed-off-by: ddurst <267424412+ddurst-nvidia@users.noreply.github.com>
Signed-off-by: ddurst <267424412+ddurst-nvidia@users.noreply.github.com>
@ddurst-nvidia
ddurst-nvidia force-pushed the feat/ddurst-nvidia/wasm branch from 341d493 to 5bf12c4 Compare August 29, 2026 00:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant