open-standards/wai
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Transaction Science 3e7811fbbb
All checks were successful
WAI conformance / cargo-class corpora · windows (push) Successful in 1m29s
WAI conformance / cargo-class corpora · linux (push) Successful in 1m39s
WAI conformance / cross-arch byte-equality · linux (push) Successful in 14s
WAI conformance / cross-arch byte-equality · windows (push) Successful in 23s
WAI conformance / cargo-class corpora · linux-arm64 (push) Successful in 2m46s
WAI conformance / cross-arch byte-equality · linux-arm64 (push) Successful in 56s
WAI conformance / cargo-class corpora · macos (push) Successful in 20m46s
WAI conformance / cross-arch byte-equality · macos (push) Successful in 24s
wai: neutral-atom rearrangement — wai.quantum.rearrange
Register preparation as a signed plan: a deterministic Hungarian / linear-sum-
assignment solver that turns a stochastic ~half-full trap load into a defect-free
target array at minimum total move distance.

- quantum_atom.rs: a trap Array (stochastic load); a centered defect-free target
  block; the Hungarian algorithm (Kuhn–Munkres with potentials, O(n²m)) over
  integer Manhattan costs assigning every target site a distinct atom; a Plan
  (moves + total distance) with an order-independent set verifier (sources present,
  targets a bijection, every target covered). random load + rearrange_and_seal.
- quantum_ops.rs: RearrangeReceipt binds (initial occupancy hash, target hash,
  plan hash) → (success, atoms_moved, total_distance, joules); merkle + Ed25519,
  joule ceiling in verify(). success is in the receipt (re-checkable).
- wai-web: RearrangeDemo binding (plan + yield transformation + tamper-rejection).

Honest boundary: a geometric/combinatorial model — the solver and its optimality
are exact (tested vs brute force); transport/loss/AOD physics is out of scope.
Tests green (Hungarian optimal over 30 instances, defect-free, infeasible-when-
too-few, tamper caught, already-placed atoms don't move).

Co-Authored-By: Claude Opus 4.8 <[email protected]>
2026-08-27 13:09:49 -04:00
..
.github/workflows Add WAI — Web AI Media Transport & Execution standard 2026-05-24 13:36:51 -04:00
audio-conformance wai: interactive + temporal cargo classes, provenance, telepresence 2026-06-13 23:16:42 -04:00
avatar-conformance wai: interactive + temporal cargo classes, provenance, telepresence 2026-06-13 23:16:42 -04:00
byte-exact-conformance chore(deps): cargo update across the workspace; eoc toolchain → 1.98.0 2026-08-26 07:39:26 -04:00
extensions wai: ingest the determinism-tier spectrum for neural decode 2026-08-01 19:44:45 -04:00
feed-conformance wai: interactive + temporal cargo classes, provenance, telepresence 2026-06-13 23:16:42 -04:00
film-conformance wai: a reel can embed its soundtrack — one envelope, movie + sound 2026-06-17 03:10:12 -04:00
glossary ingest wave E: 3 crates · op-bin + smart-byte-tendermint + eoc-safety 2026-05-24 16:52:07 -04:00
haptic-conformance wai: interactive + temporal cargo classes, provenance, telepresence 2026-06-13 23:16:42 -04:00
neural-conformance wai: a real trained int_synth model — real photo, decoded bit-exact everywhere 2026-06-17 17:12:48 -04:00
quantum-conformance wai-quantum: Add wai.quantum.circuit — deterministic quantum-simulation transport 2026-07-30 23:10:18 -04:00
quantum-ops-conformance wai-quantum-ops: conformance-vectors corpus for wai.quantum.calibration + wai.quantum.job 2026-08-01 19:45:10 -04:00
research wai: research note — the determinism contract generalizes to 3D neural coding 2026-08-24 11:09:40 -04:00
score-conformance wai: music as instructions — wai.audio.score (Phase 6) 2026-06-14 04:29:10 -04:00
tools wai-rs: the whole decoder end to end — codestream → RGB vs the reference PNG 2026-07-26 05:48:42 -04:00
vocab vocab v1 SHACL shapes across sister standards (wave-23 #4/#5) 2026-06-02 18:55:56 -04:00
volumetric-conformance wai: interactive + temporal cargo classes, provenance, telepresence 2026-06-13 23:16:42 -04:00
wai-relay chore(deps): cargo update across the workspace; eoc toolchain → 1.98.0 2026-08-26 07:39:26 -04:00
wai-rs wai: neutral-atom rearrangement — wai.quantum.rearrange 2026-08-27 13:09:49 -04:00
wai-spz-gen chore(deps): cargo update across the workspace; eoc toolchain → 1.98.0 2026-08-26 07:39:26 -04:00
wai-web wai: neutral-atom rearrangement — wai.quantum.rearrange 2026-08-27 13:09:49 -04:00
world-conformance wai: interactive + temporal cargo classes, provenance, telepresence 2026-06-13 23:16:42 -04:00
.gitignore wai: compact binary model + in-browser conditional-codec demo 2026-06-25 03:14:46 -04:00
CHANGELOG.md wai: ingest the determinism-tier spectrum for neural decode 2026-08-01 19:44:45 -04:00
CONTRIBUTING.md Add WAI — Web AI Media Transport & Execution standard 2026-05-24 13:36:51 -04:00
LICENSE Add WAI — Web AI Media Transport & Execution standard 2026-05-24 13:36:51 -04:00
README.md docs(wai): document the system libraries a default wai-rs build links 2026-08-26 12:27:29 -04:00
SPEC.md wai: ingest the determinism-tier spectrum for neural decode 2026-08-01 19:44:45 -04:00

WAI — Web AI Media Transport & Execution

A container + capability-dispatch standard for media. WAI does not re-implement codecs; it dispatches to SOTA standard libraries (AVIF, JPEG-XL, PNG, JPEG, Opus, FLAC, AV1, zstd, XZ) and adds an envelope that lets the neural-shared-prior path coexist with the model-free floor.

Two paths open every conforming file:

  • Neural condition — the sink regenerates the media against a shared ambient prior (a model). The model is a requirement of existence, never shipped (an .mp3 doesn't ship its decoder either).
  • Zeroth condition — a menu of registered SOTA codecs. Always satisfiable on any device that ships ffmpeg or equivalent.

The capability a file requires is named, not supplied.

Building

wai-rs builds the codec chain by default (the codecs feature), and those crates link system libraries rather than vendoring them — consistent with "WAI does not re-implement codecs". Without them the build stops in a codec crate's build script, not in WAI's own code:

# macOS
brew install jpeg-xl libavif opus dav1d xz

# Debian / Ubuntu
apt-get install libjxl-dev libavif-dev libopus-dev libdav1d-dev liblzma-dev

To build without the C codec chain — the envelope, manifest and world engine do not need it, which is also how the wasm32 target is built:

cargo check -p wai --no-default-features

What's here

Path Contents
SPEC.md WAI v1.0 spec — envelope, manifest, capability menu
wai-rs/ Rust reference implementation (lib + cdylib + staticlib + C FFI)
glossary/ Reference catalog of media codecs surveyed for capability registration. codecs.json is the canonical survey dataset; SCHEMA.md defines the shape and contribution rules. Rendered at wai.transaction.science/glossary.
corpus/ Standard test material (Kodak/CLIC/Tecnick/SIPI images, Xiph Derf + UVG video, SQAM-class audio, enwik8 + Silesia text). Not committed; CORPUS.md documents reacquisition.

Quickstart

cd wai-rs
cargo test --lib    # every registered capability + envelope round-trip
cargo build --release --bin wai
cargo build --release --lib    # produces libwai.dylib/.so/.dll + libwai.a

On macOS, libflac lives under the Homebrew "flac" formula prefix that Cargo doesn't probe automatically. The committed .cargo/config.toml adds the path; if you build outside the repo set RUSTFLAGS="-L /opt/homebrew/opt/flac/lib".

SDK consumption

wai-rs exposes a stable C ABI in src/ffi.rs — the cdylib drops in as libwai.dylib/.so/.dll. Bindings for any language (Python ctypes, Node N-API, Swift, JNI, Go cgo, etc.) call into:

  • wai_image_{png,jpeg,avif,jxl}_{encode,decode}
  • wai_audio_{opus,flac}_{encode,decode}
  • wai_text_{zstd,xz}_{encode,decode}
  • wai_envelope_{pack,unpack} — wrap/unwrap the WAI container
  • wai_buffer_free, wai_last_error — memory + error handling

Registered capabilities (the zeroth menu)

Capability Codec Lossless? Mandatory?
wai.image.png PNG yes mandatory floor
wai.image.jxl JPEG-XL both recommended
wai.image.avif AVIF (AV1-based) lossy recommended
wai.image.jpeg JPEG lossy recommended (legacy compat)
wai.audio.flac FLAC yes mandatory floor
wai.audio.opus Opus lossy recommended
wai.video.av1 AV1 lossy recommended
wai.video.av1.lossless AV1 (quantizer=0) YUV-lossless recommended
wai.text.zstd zstd yes mandatory floor
wai.text.xz XZ/LZMA2 yes recommended

Neural capabilities (wai.neural.*) are OPTIONAL and sink-advertised. Most run float inference, so their decode is exact only on the build that produced it. A distinguished subset is integer-exact by construction — an all-i64 decode with no float and no ONNX — so the reconstructed artifact is byte-identical on every machine and its hash is portable. Conformance is a hash: a deployer can require intent=replicate to dispatch only to these.

Capability Integer-exact decode of Conformance
wai.neural.int_hyper image — integer hyperprior σ source + integer entropy + integer synthesis byte-exact (hash-portable)
wai.neural.int_synth image — integer synthesis only byte-exact (hash-portable)
wai.video.int_hyper video — int_hyper I-frame + integer half-pel motion-compensated P-frames byte-exact (hash-portable)
wai.audio.int_codec audio — learned 1-D transform, integer synthesis → int16 PCM byte-exact (hash-portable)
wai.splat.int_codec 3D — learned Gaussian-splat-attribute transform, integer synthesis byte-exact (hash-portable)

Interactive & temporal content (extensions)

Beyond the codec menu, WAI carries content that consumes input or moves over time — reconstructed from instructions at the sink, over one wai.det.fixed64 fixed-point floor, each with its own deterministic *-equivalence conformance criterion:

Capability What it carries Conformance
wai.world.{scene,replay,live} interactive worlds (signed op log) replay-equivalence
wai.world.model action-conditioned world model (signed action ops → next frame, integer transition + synthesis) replay-equivalence
wai.mesh.glb / wai.splat.spz 3D mesh / Gaussian-splat assets content-addressed
wai.audio.scene object-based spatial audio mixdown-equivalence
wai.audio.score music as note events (synthesized at the sink) mixdown-equivalence
wai.haptic.signal keyframed touch envelopes sample-equivalence
wai.feed.state scoreboards / telemetry / market feeds replay-equivalence
wai.avatar.pose digital humans (skeletal pose stream) pose-equivalence
wai.splat.4d volumetric / 4D temporal Gaussian splats frame-state-equivalence
wai.film.linear animation / CGI film (sealed world + camera track) film-equivalence
wai.film.reel a film with cuts (one world, a sequence of shots) reel-equivalence

And the verify half — a signed, energy-accounted lineage for opaque captured content WAI does not reconstruct (wai.asset.provenance). See SPEC.md §5 and extensions/ for each.

License

Apache-2.0 — see LICENSE.