we (web engine): Experimental web browser project to understand the limits of Claude
2
fork

Configure Feed

Select the types of activity you want to include in your feed.

End-to-end WebAssembly: Rust-compiled module embedded in a real web page #230

open opened by pierrelf.com

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.
sign up or login to add to the discussion
Labels

None yet.

assignee

None yet.

Participants 1
AT URI
at://did:plc:meotu43t6usg4qdwzenk4s2t/sh.tangled.repo.issue/3mm2toaz2ft23