Skip to content

feat(build): remove embed-wasm feature gate — build.rs generates stubs#50

Merged
avrabe merged 1 commit intomainfrom
feat/wasm-default-stubs
Mar 19, 2026
Merged

feat(build): remove embed-wasm feature gate — build.rs generates stubs#50
avrabe merged 1 commit intomainfrom
feat/wasm-default-stubs

Conversation

@avrabe
Copy link
Copy Markdown
Contributor

@avrabe avrabe commented Mar 19, 2026

Summary

  • --features embed-wasm is gone — WASM is always embedded
  • build.rs generates stub files when spar WASM isn't built, so compilation always works
  • Stubs return 404 at runtime → client shows inline fallback
  • When spar repo is available, build.rs checks out the pinned Cargo.toml rev before building WASM

Test plan

  • All tests pass
  • Builds without spar WASM (stubs generated)
  • Builds with spar WASM (real assets used)
  • CI

🤖 Generated with Claude Code

WASM assets are now always compiled into the binary:
- build.rs generates stub files when spar WASM is not built, so
  include_str!/include_bytes! always succeeds
- Stub JS is detected at runtime (starts with "// stub") and returns
  404, so the client-side HEAD probe works correctly
- When spar repo is found, build.rs checks out the pinned Cargo.toml
  rev before building WASM to ensure version consistency
- Removed embed-wasm feature from Cargo.toml — no more --features flag

Implements: FEAT-064
Refs: REQ-022

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@avrabe avrabe merged commit c4a7683 into main Mar 19, 2026
@avrabe avrabe deleted the feat/wasm-default-stubs branch March 19, 2026 20:40
Copy link
Copy Markdown

@github-actions github-actions Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Performance Alert ⚠️

Possible performance regression was detected for benchmark 'Rivet Criterion Benchmarks'.
Benchmark result of this commit is worse than the previous benchmark result exceeding threshold 1.20.

Benchmark suite Current: a91cfb8 Previous: fd6075b Ratio
query/10000 154604 ns/iter (± 389) 107075 ns/iter (± 671) 1.44

This comment was automatically generated by workflow using github-action-benchmark.

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