open-standards/wai/wai-web/demo/README.md
Transaction Science 46c5688b86 wai: the WAI open standard — full cargo-class surface + provenance
Commit the WAI standard source: a content + capability-dispatch standard
whose thesis is "carries whatever it can reconstruct, verifies whatever
it carries." Source only — large vendored/model assets and build output
are gitignored.

Reconstruct classes (each: spec + conformance corpus + in-tab browser
sink that re-derives the corpus hash, one wai.det.fixed64 fixed-point
floor, one *-equivalence apiece):
  - interactive worlds  (replay-equivalence)   + 3 sim registrants,
    multiplayer over a relay, session receipts, glTF + real SPZ assets
  - spatial audio        (mixdown-equivalence)
  - haptics              (sample-equivalence)
  - state-feeds          (replay-equivalence, non-physics sim)
  - avatars / digital humans (pose-equivalence) + telepresence over the relay
  - volumetric / 4D splats   (frame-state-equivalence) + WebGPU EWA render,
    real-SPZ-derived clip

Verify half (lever 4):
  - asset provenance: a signed, energy-accounted lineage for opaque
    captured content WAI does not reconstruct; tamper-evident, in-tab.

Cross-cutting: JWP receipt profiles per class; a native energy meter
(IOReport via macmon, no sudo) emitting receipts with REAL measured
joules; the learned-image/neural codec family and JPEG AI entropy port
from earlier work.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
2026-06-13 22:28:51 -04:00

1.1 KiB

wai-web demo — interactive-worlds browser sink

world.html is a conformant wai.world.replay sink running in a tab: the WWLD payload (a tick-0 world + signed op log, ~1.3 KB for the truss vector) is re-derived frame by frame in WebGPU by the same wai crate native sinks run, compiled to wasm32 with the codec chain off (--no-default-features --features world). At the sealed final tick the sink recomputes the BLAKE3 state hash and compares it to the publisher's Ed25519-signed seal — replay-equivalence, demonstrated: the hash the browser computes is byte-identical to world-conformance/expected_hashes.json.

Run

# from wai-web/: rebuild the wasm pkg after engine changes
wasm-pack build --target web --out-dir demo/pkg

# vectors come from the conformance corpus
cp ../world-conformance/vectors/{truss_fracture,ballistic_bounce,basic_kinematics}.wwld demo/vectors/

# serve (any static server; WASM needs http, not file://)
python3 -m http.server 8741
# → http://localhost:8741/demo/world.html

Needs a WebGPU browser (Chrome/Edge stable, Safari TP). No build steps beyond wasm-pack; no JS dependencies.