Close out Phase 22 with an end-to-end demonstration that a real Rust-compiled WebAssembly module loads, instantiates, and interoperates with JS in our browser. Depends on every other Phase 22 issue, especially streaming compilation and the JS API.
Scope:
- Add a tiny demonstration crate under tests/wasm-fixtures/ that compiles to wasm32-unknown-unknown and exposes a small set of pure functions (e.g., compute_primes(limit) -> usize, fib(n) -> u64) plus a host-imported logger that calls a JS-provided function. Build instructions (rustc/cargo command line, no external toolchains beyond the standard wasm32 target) must be documented and committed alongside the resulting .wasm so CI doesn't need to recompile.
- Add an HTML page under crates/e2e/pages/ that fetches the .wasm, calls instantiateStreaming with an importObject containing a console-logging function, invokes the exports, and writes the results into the DOM.
- Add an e2e scenario under crates/e2e/scenarios/ that loads the page and verifies the rendered output via assert_dom_contains and assert_console_contains.
- Add a smoke section to PLAN.md (or to crates/wasm/README.md) showing the end-to-end happy path.
Acceptance criteria:
- cargo run -p we-e2e -- --scenario crates/e2e/scenarios/wasm_e2e.we --out-dir crates/e2e/artifacts passes locally.
- The e2e scenario exercises both the streaming compile path and the import/export round trip (JS -> wasm -> JS via host import).
- Document the milestone in the Phase 22 section of PLAN.md so future contributors can find it.
- cargo clippy --workspace -- -D warnings and cargo test --workspace pass.