feat: WASM bridge rendering the WorldGraph twin over SuperSplat#1
Draft
ruvnet wants to merge 5 commits into
Draft
feat: WASM bridge rendering the WorldGraph twin over SuperSplat#1ruvnet wants to merge 5 commits into
ruvnet wants to merge 5 commits into
Conversation
Add the `worldgraph-wasm` crate (cdylib + rlib) that wraps WorldGraph for the browser. Logic lives in host-tested `core`/`enu`/`overlay`; the wasm32-only `bridge.rs` is a thin serde-wasm-bindgen serializer. Built against the real serde wire format. 14 native tests pin the contract.
…l apps Typed serde wire format, SemanticVisualizer (injected WASM module), WorldgraphScene reconciler + PlayCanvas adapter, and the four use cases (avatars, configurator, occworld, audit). 18 vitest tests, strict tsc.
ADR-200 bridge architecture, ADR-201 ENU↔PlayCanvas coordinate contract, ADR-202 the four spatial applications, ADR-203 verification-driven evolution. INTEGRATION.md is the end-to-end wiring + build guide.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
End-to-end, no-backend integration that renders the privacy-aware WorldGraph
semantic twin over a SuperSplat
(PlayCanvas / WebGPU) Gaussian splat in the browser, via WebAssembly.
The headline detail: the original integration sketch used field names that do
not exist in this codebase (
node.type,ZoneBoundsEnu,{east,north,up},from_json(&str)). This PR is built against the real serde wire format(
node.kind,node.bounds_enushape-union,EnuPoint{east_m,north_m,up_m},from_json(&[u8])) — and native tests pin that contract so it can't silentlydrift. See the mapping table in ADR-200.
What's here
worldgraph-wasm/— Rust → WASM bridge (cdylib+rlib)bridge.rs—wasm32-only#[wasm_bindgen]surface; a thinserde-wasm-bindgenserializer (usesjson_compatible()so ids cross as JSnumber, notBigInt).core.rs/enu.rs/overlay.rs— pure, host-tested logic: physical-nodefiltering, render-primitive geometry, ENU⇄PlayCanvas mapping, click-to-audit
provenance cards, OccWorld trajectory overlays, and the configurator's
PlayCanvas→ENU projection.
build-wasm.sh—wasm-packbuild helper.supersplat-bridge/— TypeScript / PlayCanvas integrationtypes.ts— the serde wire format, exactly.SemanticVisualizer— typed wrapper; the WASM module is injected, so itunit-tests headlessly against an in-memory fake.
WorldgraphScenereconciler (create / update-in-place / destroy) +PlayCanvasBackend.OccWorld predictive debugger, click-to-audit provenance.
docs/adr/ADR-200..203+INTEGRATION.md— architecture, theENU coordinate contract, the four applications, and the verification-driven
("Darwin") evolution loop with the generations actually run.
Testing
Both suites are green and require no browser and no wasm target:
The
wasm32-gatedbridge.rscannot be compiled on the CI host here (nowasm32-unknown-unknowntarget /wasm-pack), so it is verified by inspection;all logic it calls is proven by the 14 native tests via the
rlibpath. A hostwith the wasm toolchain runs
worldgraph-wasm/build-wasm.shto emit the module.Notes
the privacy decision, not raw signals.
.wasmmodule andnode_modules/lockfile-regenerated artifactsare git-ignored.
🤖 Generated with Claude Code
Generated by Claude Code