open-standards/wai/wai-web/Cargo.toml
Transaction Science 8eb90cf901
Some checks failed
WAI conformance / cargo-class corpora · windows (push) Successful in 1m13s
WAI conformance / cross-arch byte-equality · windows (push) Successful in 22s
WAI conformance / cargo-class corpora · linux-arm64 (push) Successful in 51s
WAI conformance / cross-arch byte-equality · linux-arm64 (push) Successful in 19s
WAI conformance / cargo-class corpora · linux (push) Successful in 29s
WAI conformance / cross-arch byte-equality · linux (push) Successful in 15s
WAI conformance / cargo-class corpora · macos (push) Has been cancelled
WAI conformance / cross-arch byte-equality · macos (push) Has been cancelled
wai: circuit compilation + equivalence proof — wai.quantum.compile
Compilation correctness as a signed certificate: a deterministic coupling-graph
router + a byte-exact Clifford stabilizer-tableau equivalence check.

- quantum_compile.rs: Clifford tableau (Aaronson–Gottesman H/S/CX/SWAP updates on
  the 2n generator images); a coupling graph (line/ring/edges) + BFS routing that
  inserts SWAPs so every two-qubit gate is local; equivalence = routed ++ (swaps
  restoring identity) ≡ source, all through the tableau sim. random_clifford +
  compile_and_seal.
- quantum_ops.rs: CompileReceipt binds (source hash, compiled hash + final map,
  coupling hash) → (equivalent, swaps, work, joules); merkle + Ed25519, joule
  ceiling in verify(). equivalent is in the receipt (a compiler can re-run the
  same deterministic check).
- wai-web: CompileDemo binding (route+prove + tamper-rejection).

Honest boundary: exact for Clifford circuits (the standard tableau-checker scope),
covering routing/mapping correctness. Tests green (routing preserves equivalence
over 40 random circuits, tamper is caught, HH=I, S^4=I, SWAP=3·CX).

Co-Authored-By: Claude Opus 4.8 <[email protected]>
2026-08-26 11:55:54 -04:00

36 lines
1.8 KiB
TOML

[package]
name = "wai-web"
version = "0.3.0"
edition = "2021"
license = "Apache-2.0"
description = "WAI envelope parser + capability dispatch for the browser. Wasm-bindgen surface over the standard's container format. NOT a codec backend — backends are pluggable, the deployer chooses (WASM / WebGPU / WebNN / native ONNX / transformers.js / etc.)."
[lib]
crate-type = ["cdylib"]
[dependencies]
wasm-bindgen = { version = "0.2", features = ["serde-serialize"] }
serde-wasm-bindgen = "0.6"
serde = { version = "1", features = ["derive"] }
serde_json = { version = "1", features = ["preserve_order"] }
js-sys = "0.3"
# THE world engine — the same crate native sinks run, compiled to wasm32
# with the codec chain off. No second implementation: replay-equivalence
# in the browser is the identical Rust that generated the conformance
# corpus hashes.
wai = { path = "../wai-rs", default-features = false, features = ["world", "audio_scene", "haptic", "splat4d", "provenance", "score", "film", "neural_int", "generate", "video_int", "audio_int", "world_model", "world_int", "splat_int", "quantum", "quantum_ops", "quantum_cal", "quantum_mitigate", "quantum_qec", "quantum_control", "quantum_noise", "quantum_compile"] }
ed25519-dalek = "2" # actor keys for browser-side op authoring (same version as wai-rs)
blake3 = "1" # in-page receipt check: hash a decoded image against a pinned digest
[profile.release]
opt-level = "s" # size, not speed — runtime is parse-only
lto = true
codegen-units = 1
strip = "symbols"
[package.metadata.wasm-pack.profile.release]
# The host's wasm-opt (binaryen) is behind the Rust toolchain's emitted
# wasm features; rustc already runs LTO + size opts so skipping wasm-opt
# costs little. Re-enable when binaryen catches up.
wasm-opt = false