Skip to content

feat: WASM bridge rendering the WorldGraph twin over SuperSplat#1

Draft
ruvnet wants to merge 5 commits into
mainfrom
claude/worldgraph-wasm-supersplat-vju9cn
Draft

feat: WASM bridge rendering the WorldGraph twin over SuperSplat#1
ruvnet wants to merge 5 commits into
mainfrom
claude/worldgraph-wasm-supersplat-vju9cn

Conversation

@ruvnet

@ruvnet ruvnet commented Jun 27, 2026

Copy link
Copy Markdown
Owner

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_enu shape-union, EnuPoint{east_m,north_m,up_m},
from_json(&[u8])) — and native tests pin that contract so it can't silently
drift. See the mapping table in ADR-200.

What's here

worldgraph-wasm/ — Rust → WASM bridge (cdylib + rlib)

  • bridge.rswasm32-only #[wasm_bindgen] surface; a thin
    serde-wasm-bindgen serializer (uses json_compatible() so ids cross as JS
    number, not BigInt).
  • core.rs / enu.rs / overlay.rspure, host-tested logic: physical-node
    filtering, render-primitive geometry, ENU⇄PlayCanvas mapping, click-to-audit
    provenance cards, OccWorld trajectory overlays, and the configurator's
    PlayCanvas→ENU projection.
  • build-wasm.shwasm-pack build helper.

supersplat-bridge/ — TypeScript / PlayCanvas integration

  • types.ts — the serde wire format, exactly.
  • SemanticVisualizer — typed wrapper; the WASM module is injected, so it
    unit-tests headlessly against an in-memory fake.
  • WorldgraphScene reconciler (create / update-in-place / destroy) +
    PlayCanvasBackend.
  • Four spatial apps: zero-video control room, visual configurator,
    OccWorld predictive debugger, click-to-audit provenance.

docs/adr/ADR-200..203 + INTEGRATION.md — architecture, the
ENU 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:

cargo test -p worldgraph-wasm     # 14 native tests pin the Rust wire contract
cd supersplat-bridge && npm test  # 18 vitest tests; tsc --noEmit strict clean

The wasm32-gated bridge.rs cannot be compiled on the CI host here (no
wasm32-unknown-unknown target / wasm-pack), so it is verified by inspection;
all logic it calls is proven by the 14 native tests via the rlib path. A host
with the wasm toolchain runs worldgraph-wasm/build-wasm.sh to emit the module.

Notes

  • No backend — everything runs in the tab.
  • Privacy is structural: person nodes carry no identity; the audit card surfaces
    the privacy decision, not raw signals.
  • The generated .wasm module and node_modules/lockfile-regenerated artifacts
    are git-ignored.

🤖 Generated with Claude Code


Generated by Claude Code

ruvnet added 5 commits June 26, 2026 23:37
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.
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