open-standards/wai/wai-rs/Cargo.toml
Transaction Science d465894019 wai-quantum 0.3.18: make the information layer reachable without writing Rust
Five modules -- quantum_info, quantum_qudit, quantum_comm, quantum_source and
quantum_channel -- were stranded in the sub-crate: wai never re-exported them, so
nothing outside wai-quantum could see them and the CLI could not reach them at
all. This wires them through wai's feature passthrough and re-exports, and gives
each one a command, so the material is usable by anyone with the binary.

  wai-quantum entropy bell --keep 0   1 bit, the entropy no state vector can see
  wai-quantum channel depolarizing --prob 0.5
  wai-quantum bb84 --eavesdrop        interception shows up in the error rate
  wai-quantum chsh                    2 sqrt(2) exactly, computed not sampled
  wai-quantum qutrit                  d = 3, not just qubits

channel prints the Holevo bound before and after, which can only fall. Two of its
outputs are easy to get backwards and are worth reading twice: fully damping |1>
gives a PURE output that still carries nothing, because both inputs land on |0> --
a channel can be perfectly clean and still destroy the message. And dephasing
leaves a Z-basis ensemble's Holevo bound untouched, because loss is relative to
the encoding, not absolute.

Verified by running every command: half a Bell pair reports purity 0.5 and exactly
one bit, the whole pure state reports zero; CHSH gives 2.828427 sitting exactly on
Tsirelson; BB84 gives QBER 0 on a quiet channel and 0.271 under interception;
qutrit F-then-CSUM gives the three-outcome entangled state at 1/3 each.

Also drops an unused import that made every downstream build of 0.3.17 emit a
warning, and stops the identity channel printing a p it does not use.

Co-Authored-By: Claude Opus 5 <[email protected]>
2026-09-07 10:10:20 -04:00

499 lines
26 KiB
TOML
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

[package]
name = "wai"
version = "0.3.0"
edition = "2024"
rust-version = "1.97"
license = "Apache-2.0"
description = "WAI — Web AI media transport + execution, and a deterministic QUANTUM stack: byte-exact circuit simulation with statevector / stabilizer / tensor-network / sparse-Pauli backends, error mitigation, qLDPC decoding, noise learning, circuit-equivalence proofs and signed energy-accounted receipts — identical results native and in cloud WASM. Plus a capability-as-requirement envelope and zeroth-condition wrappers around SOTA codecs (AVIF / JPEG-XL / PNG / Opus / FLAC / AV1 / zstd / LZMA)."
repository = "https://git.transaction.science/Transaction-Science/open-standards"
homepage = "https://wai.transaction.science"
documentation = "https://wai.transaction.science/quantum-ide"
keywords = ["quantum", "simulation", "wasm", "deterministic", "codec"]
categories = ["science", "simulation", "wasm", "multimedia"]
[lib]
name = "wai"
crate-type = ["lib", "cdylib", "staticlib"] # cdylib + staticlib for FFI/SDK
[dependencies]
# Container manifest. preserve_order so JSON round-trips byte-identical.
serde = { version = "1", features = ["derive"] }
serde_json = { version = "1", features = ["preserve_order"] }
# ---- zeroth codec wrappers: lossy + lossless across all media ----
# All optional behind the (default-on) `codecs` feature: native sinks get
# the full menu; a wasm32 world sink builds with --no-default-features
# --features world and none of the C codec chain. Registration (the
# capability strings in codecs/mod.rs) is NOT gated — only the decoders.
# Image
image = { version = "0.25", default-features = false,
features = ["png", "jpeg", "webp", "avif"], optional = true } # PNG, JPEG decode, AVIF encode (via ravif)
jpeg-encoder = { version = "0.7", optional = true } # pure-Rust JPEG with optimized Huffman tables
libavif-image = { version = "0.14", optional = true } # AVIF decode via system libavif (fixes silent-empty decode bug)
jpegxl-rs = { version = "0.14", optional = true } # libjxl bindings (links system libjxl; 0.11.x and 0.12.x both work)
# Audio
opus = { version = "0.3", optional = true } # libopus bindings (lossy)
ogg = { version = "0.9", optional = true } # Ogg container for standard .opus interop
claxon = { version = "0.4", optional = true } # FLAC decode (pure Rust)
flac-bound = { version = "0.5", optional = true } # FLAC encode (libFLAC)
# Video
rav1e = { version = "0.8", default-features = false, features = ["threading"], optional = true }
dav1d = { version = "0.11", optional = true } # AV1 decode (libdav1d)
# Text
zstd = { version = "0.13", optional = true } # zstd bindings
xz2 = { version = "0.1", optional = true } # liblzma bindings (XZ/LZMA)
# Bytestream framing for video container (we wrap rav1e packets into a
# minimal IVF-like sequence for self-contained .wai video payloads).
byteorder = { version = "1", optional = true }
# ---- neural runtime (optional, behind the `neural` feature) ----
# `ort` wraps Microsoft's onnxruntime — same ORT version (1.26) the
# browser-side wai-web demo uses, so models built with our exporters
# load identically here. The `download-binaries` feature fetches the
# right libonnxruntime build at compile time; no manual brew install.
ort = { version = "2.0.0-rc.12", default-features = false,
features = ["std", "download-binaries", "ndarray", "tls-rustls"],
optional = true }
ndarray = { version = "0.17", optional = true }
zstd-safe = { version = "7", optional = true, features = ["std"] } # for bmshj2018 latent unpack (std → WriteBuf for Vec)
sha2 = { version = "0.10", optional = true } # verify a pinned neural prior against the registered model artifact
# ---- real C2PA manifest emission (optional, behind `c2pa_emit`) ----
# Writes an actual signed manifest carrying the energy + reconstruction
# bindings, rather than only defining their shapes. Off by default: the SDK
# is a large dependency chain and most consumers only need the types.
c2pa = { version = "0.90", optional = true, default-features = false,
features = ["rust_native_crypto"] }
# ---- interactive worlds (optional, behind the `world` feature) ----
# extensions/interactive-worlds: WWLD container, signed CausalOps,
# deterministic fixed-point simulation, replay-equivalence conformance.
blake3 = { version = "1", optional = true } # state hashes, node minting, op/seal commitments
ed25519-dalek = { version = "2", optional = true } # op + seal signatures
# ---- quantum (optional, behind the `quantum*` features) ----
# The quantum stack now lives in its own dependency-light crate so it can be used
# without the media/codec chain. `wai` re-exports it unchanged.
wai-quantum = { version = "0.3.0", path = "../wai-quantum", optional = true, default-features = false }
[features]
default = ["codecs"]
# The zeroth-condition codec wrappers (image/audio/video/text) + the C
# FFI surface built on them. Default-on: a native sink is a full sink.
# Disable for targets where the C codec chain can't follow (wasm32) —
# the envelope, manifest, and `world` engine build without it.
codecs = [
"dep:image", "dep:jpeg-encoder", "dep:libavif-image", "dep:jpegxl-rs",
"dep:opus", "dep:ogg", "dep:claxon", "dep:flac-bound",
"dep:rav1e", "dep:dav1d",
"dep:zstd", "dep:xz2", "dep:byteorder",
]
# Pulls in the ONNX runtime + zstd unpack so the native sink can
# decode `wai.neural.<...>` envelopes. Off by default — the bare
# container + zeroth codecs build with no ML dep chain.
# The integer-exact synthesis decoder (`wai.neural.int_synth`). Pure i64
# arithmetic — no ONNX, no float, bit-identical on every machine by
# construction — so it sits behind its own light feature, checkable in a CI
# matrix with no ONNX Runtime present. `neural` pulls it in. blake3 is for the
# conformance corpus's content hash (the same hash the other classes freeze).
neural_int = ["dep:blake3"]
# Deterministic integer generative synthesis (`wai.generate.*`): byte-exact
# generation pinned to (model, prompt, seed, steps) — the create-side of the
# integer contract. Pure i64, no ONNX/float (serde_json is already a base dep),
# so it builds and is bit-checkable with no ML dep chain, and compiles to wasm32.
generate = []
# Deterministic integer inter-frame VIDEO (`wai.video.int_motion`): byte-exact
# frame-by-frame decode — integer block motion compensation + integer-quantized
# residual over the rANS coder. Frame-state-equivalence (per-frame hash); the
# temporal extension of the integer contract. Reuses the pure-i64 rANS (neural_int).
video_int = ["neural_int"]
# Integer-exact LEARNED audio codec (`wai.audio.int_codec`): a learned 1-D transform
# codec, integer transposed-conv synthesis → byte-exact int16 PCM (sample-equivalence,
# a portable PCM hash). The audio analog of int_hyper. Reuses pure-i64 rANS + IGDN.
audio_int = ["neural_int"]
# Integer-exact INTERACTIVE WORLD MODEL (the byte-exact renderer for wai.world.model):
# action-conditioned next-frame model, transition + synthesis both int_hyper IntModels.
# Reuses int_hyper_synth (neural_int).
world_int = ["neural_int"]
# Integer-exact LEARNED Gaussian-splat ATTRIBUTE codec ("the int_hyper of 3D"):
# learned transform over the [14,S,S] attribute image → byte-exact attribute tensor
# (splat-equivalence, a portable cloud hash). Reuses int_hyper_synth (neural_int).
splat_int = ["neural_int"]
neural = ["neural_int", "dep:ort", "dep:ndarray", "dep:zstd-safe", "dep:sha2"]
# The perceptual / generative-semantic path: CLIP-similarity conformance,
# regenerate-at-sink. Reuses the ONNX runtime for the reference CLIP embedder;
# the generator is always sink-supplied. Off by default like `neural`.
semantic = ["codecs", "dep:ort", "dep:ndarray"]
# Interactive worlds (extensions/interactive-worlds): media that consumes
# input. Pure-Rust, no ML dep chain — the sim is closed-form fixed-point.
world = ["dep:blake3", "dep:ed25519-dalek"]
# Object-based spatial audio (extensions/spatial-audio): the deterministic
# Fx mixdown engine. Reuses the world `Fx` floor + blake3; no codec/ML deps
# (sources arrive as decoded mono PCM — decoding the wai.audio.* assets is
# the sink's job, exactly as glb/spz decode is).
audio_scene = ["world"]
# Haptics (extensions/haptics): touch as a tiny keyframed envelope,
# reconstructed in the Fx floor. Sample-equivalence; no codec/ML deps.
haptic = ["world"]
# Volumetric / 4D temporal Gaussian splats (extensions/volumetric): each
# Gaussian's keyframed tracks reconstructed at frame N in the Fx floor.
# Frame-state-equivalence; no codec/ML deps (the render is the sink's).
splat4d = ["world"]
# Music as instructions (extensions/score): a note-event score rendered to
# a canonical PCM mixdown by a deterministic trig-free synth in the Fx
# floor. Mixdown-equivalence; no codec/ML deps (the instrument is the sink's).
score = ["world"]
# Asset provenance (extensions/provenance): a signed, energy-accounted
# lineage receipt for opaque captured content WAI does not reconstruct.
# Reuses the JWP Merkle + Ed25519; no codec/ML deps.
provenance = ["world", "dep:sha2"]
# Emit a REAL C2PA manifest (not just the assertion shapes). Off by default:
# the SDK is a large dependency chain and most WAI consumers only need the
# binding types, which `provenance` already gives them.
c2pa_emit = ["provenance", "dep:c2pa"]
# wai.world.model — generative-world transport: a signed, replay-equivalent action
# trace (reuses the world CausalOp log) + per-frame provenance. The neural sibling
# of wai.world.replay; the renderer is a declared world model (sink-supplied, or the
# int_* family for byte-exact frames).
world_model = ["world", "provenance"]
# Linear film (extensions/linear-film): a film is a sealed camera-on-rails
# world — the world replay (replay-equivalence) + a keyframed camera track
# (Fx floor) + a frame schedule, verified frame-by-frame (film-equivalence).
# Composes the world engine; pulls `score` so a reel can embed a soundtrack
# (one envelope = movie + sound). No codec/ML deps (the render is the sink's).
film = ["world", "score"]
# Deterministic quantum-circuit SIMULATION (extensions/quantum-sim,
# `wai.quantum.circuit`): the wire carries a gate op-log (WQC container), the sink
# classically simulates it in a fixed-point complex floor, the statevector is
# byte-identical on every machine (statevector-equivalence). Pure i64, no float —
# blake3 for the conformance/receipt hashes, same discipline as the other floor
# classes. No quantum hardware (it would break determinism). Compiles to wasm32.
quantum = ["dep:wai-quantum", "wai-quantum/quantum"]
# The energy-accounted seal for a quantum reconstruction (extensions/quantum-sim
# § Receipt): a signed receipt that separates the portable-exact WORK (n_ops·2^n
# amplitude updates, recomputable) from the measured-attested ENERGY (joules_micro
# from the sink's meter), both bound to a re-simulatable statevector hash. Reuses
# the JWP Merkle + Ed25519 from `world` — reuse, not reinvention.
quantum_receipt = ["quantum", "wai-quantum/quantum_receipt"]
# The JWP receipt profile for the integer inter-frame video codec. Follows the
# same shape as `quantum_receipt`: the class feature plus `world`, which is what
# supplies blake3, ed25519 and the shared `merkle_root`. Kept OUT of `video_int`
# on purpose — `int_video.rs` is #[path]-included by the byte-exact conformance
# crate, and that crate must keep its three-dependency set to stay runnable on
# every leg of the cross-arch matrix.
video_receipt = ["video_int", "world"]
# Balanced-ternary matrix-product-state transform (`wai.ternary.tt`,
# extensions/ternary-tt): quantum-INSPIRED (tensor-network) compression whose
# novel delta is an INTEGER core scale — the whole decode is pure i64/i128, so a
# ternary-MPS reconstruction is byte-identical on every machine (a portable
# reconstruction hash), unlike the float-scale ternary/MPS fabric it ports from.
# Lossy codec, deterministic decode. Encoder-side float (SVD) only. Reuses
# int_transform's fixed-point idiom (neural_int) + blake3 for the recon hash.
ternary = ["neural_int"]
# The energy-accounted seal for a ternary-MPS reconstruction (extensions/ternary-tt
# § Receipt): a signed receipt separating portable-exact WORK (trit_macs) from
# measured-attested ENERGY (joules_micro), bound to the WQTT payload hash + a
# re-decodable reconstruction hash. Reuses the JWP Merkle + Ed25519 from `world`.
ternary_receipt = ["ternary", "world"]
# Quantum-operations attestation (extensions/quantum-ops, `wai.quantum.calibration`
# + `wai.quantum.job`): signed, content-addressed, joule-metered, grant-authorized
# receipts of calibration runs and QPU jobs — the verify-half of WAI applied to the
# quantum-control industry. WAI does NOT run hardware; it owns the receipt. Reuses
# the JWP Merkle + Ed25519 from `world`; no sim/codec deps.
quantum_ops = ["dep:wai-quantum", "wai-quantum/quantum_ops"]
# Deterministic autonomous CALIBRATION engines (extensions/quantum-ops § Calibration):
# a fixed-point qubit-device simulator + autonomous tune-up algorithms (Rabi π-pulse
# to start) — the software capability the quantum-control vendors sell, byte-exact and
# reproducible, sealing a wai.quantum.calibration receipt per run. Pulls quantum_ops.
quantum_cal = ["quantum_ops", "wai-quantum/quantum_cal"]
# Deterministic quantum ERROR MITIGATION (extensions/quantum-ops § Mitigation,
# `wai.quantum.mitigate`): the classical post-processing layer between raw QPU
# counts and the reported number — zero-noise extrapolation, tensored readout
# inversion, classical shadows — in pure fixed-point, byte-exact, each sealing a
# signed, joule-metered MitigationReceipt. The layer nobody signs. Pulls quantum_ops.
quantum_mitigate = ["quantum_ops", "wai-quantum/quantum_mitigate"]
# Deterministic quantum LDPC DECODING (extensions/quantum-ops § Decoding,
# `wai.quantum.decode`): a fixed-point Relay-BP (normalized min-sum) decoder for
# qLDPC codes (toric + bivariate-bicycle), byte-exact on every machine, each
# decode sealing a signed, joule-metered DecodeReceipt carrying joules-per-decode
# — the metric no decoder reports and none signs. Pulls quantum_ops.
quantum_qec = ["quantum_ops", "wai-quantum/quantum_qec"]
# Deterministic FILTER-FUNCTION control + NOISE SPECTROSCOPY (extensions/quantum-ops
# § Calibration, frequency domain): the filter-function overlap χ = ∫ S(ω)F(ω)/ω²
# — DD noise spectroscopy (reconstruct S(ω) from a filter bank) + filter-function
# robust control (reshape a DD sequence to dodge a PSD). Fully offline, byte-exact,
# sealing wai.quantum.calibration receipts. Pulls quantum_cal (trig/exp + seal).
quantum_control = ["quantum_cal", "wai-quantum/quantum_control"]
# Deterministic NOISE LEARNING (extensions/quantum-ops § Calibration, noise model,
# `wai.quantum.cal.noise_learn`): Cycle Benchmarking + Cycle Error Reconstruction
# of a sparse Pauli–Lindblad model — recover a hidden device's Pauli error rates
# from a simulated twirled-cycle experiment (multiplicative NNLS), byte-exact,
# sealing a signed model whose hash a MitigationReceipt binds (the PEC producer).
quantum_noise = ["quantum_cal", "wai-quantum/quantum_noise"]
# Deterministic circuit COMPILATION + equivalence proof (extensions/quantum-ops
# § Compilation, `wai.quantum.compile`): a coupling-graph router (SWAP insertion)
# + a byte-exact Clifford stabilizer-tableau equivalence check, sealing a signed
# CompileReceipt that a routed circuit is equivalent to its source — compilation
# correctness, which no compiler signs. Pulls quantum_ops.
quantum_compile = ["quantum_ops", "wai-quantum/quantum_compile"]
# Deterministic neutral-atom REARRANGEMENT (extensions/quantum-ops § Register
# preparation, `wai.quantum.rearrange`): a Hungarian / LSAP solver that assigns a
# defect-free target register a distinct loaded atom minimizing total move
# distance, byte-exact, sealing a signed RearrangeReceipt whose success verdict is
# re-checkable. Pulls quantum_ops.
quantum_atom = ["quantum_ops", "wai-quantum/quantum_atom"]
# WAI Quantum Toolchain (extensions/quantum-sim § Toolchain,
# `wai.quantum.toolchain`): the compute core of a classical-hardware quantum IDE —
# algorithm library + state analysis (Bloch, entanglement, expectations) + backend
# selection (Clifford → statevector → tensor-network cascade) + OpenQASM interop,
# all over the byte-exact fixed-point simulator. Framework-neutral, no cloud.
quantum_toolchain = ["quantum", "wai-quantum/quantum_toolchain"]
# Matrix Product State backend (extensions/quantum-sim § MPS, `wai.quantum.mps`):
# the tensor-network "classical referee" — evolve a bounded-bond MPS gate-by-gate
# with a deterministic complex Jacobi SVD truncation, reproducible on every machine
# (approximate method → determinism + retained-weight fidelity, not byte-exact).
# Verified against the dense simulator. Pure Rust; only IEEE-754 + - * / sqrt.
quantum_mps = ["quantum", "wai-quantum/quantum_mps"]
# Stabilizer / CHP backend (extensions/quantum-sim § Stabilizer,
# `wai.quantum.stabilizer`): the O(n²) Clifford tier of the cascade — the
# Aaronson–Gottesman tableau simulates + samples Clifford circuits far past the
# dense 2^n wall (thousands of qubits), exact integer bit-arithmetic (no floats),
# deterministic histograms. Rejects non-Clifford gates for fallback.
quantum_stabilizer = ["quantum", "wai-quantum/quantum_stabilizer"]
# Sparse-Pauli / Heisenberg propagation (extensions/quantum-sim § Pauli,
# `wai.quantum.pauli`): the observable referee — propagate an observable backward
# through the circuit as a truncated sum of Pauli strings (the Begušić–Chan method
# that reproduced IBM's utility experiment on a laptop). Computes ⟨O⟩ on large
# low-magic circuits where no state vector exists; grows with magic, not qubits.
quantum_pauli = ["quantum", "wai-quantum/quantum_pauli"]
quantum_qir = ["quantum_toolchain", "wai-quantum/quantum_qir"]
# Variational quantum machine learning (extensions/quantum-sim § VML,
# `wai.quantum.vml`): the interference-based ML the thermodynamic-computing pivot
# left behind — a Quantum Circuit Born Machine (P_θ(x)=|ψ_θ(x)|²) trained by the
# exact parameter-shift gradient on the classical state vector, plus a
# barren-plateau probe (the honest limit). Deterministic f64. Pure Rust, no deps.
quantum_vml = ["dep:wai-quantum", "wai-quantum/quantum_vml"]
# The phasor bridge (extensions/quantum-sim § Phasor, `wai.quantum.phasor`): a
# quantum feature-map model is exactly a Fourier series of phasors (Schuld et al.).
# Compute the model on the state vector, extract its spectrum, and reproduce the
# identical function as a classical phasor sum (FHRR/HDC) — same interference, two
# substrates — with a qFHRR quantized-phase variant. Pure f64, no deps.
quantum_phasor = ["dep:wai-quantum", "wai-quantum/quantum_phasor"]
# The full Born machine on the qFHRR substrate (extensions/quantum-sim § qFHRR,
# `wai.quantum.qfhrr`): run the whole generative distribution P(x)=|ψ(x)|² with
# amplitude phases held at qFHRR resolution (b-bit, integer-native) — a trained
# Born machine deployed end-to-end on the phasor substrate, converging to the exact
# state vector as phase bits grow. Pure f64; reuses the vml ansatz for the ref.
quantum_qfhrr = ["quantum_vml", "wai-quantum/quantum_qfhrr"]
# Phasor-feature classifier (extensions/quantum-sim § Kernel, `wai.quantum.kernel`):
# the quantum kernel deployed as random Fourier / FHRR phasor features + a ridge
# classifier — separates nonlinearly-separable data a linear model cannot, at qFHRR
# phase resolution, with a counted phasor-op tally for joule pricing. Pure f64.
quantum_kernel = ["dep:wai-quantum", "wai-quantum/quantum_kernel"]
# Phasor energy meter (extensions/quantum-sim § Receipt, `wai.quantum.phasor`): the
# energy-accounted seal for an interference computation. Splits portable-exact
# phasor WORK — `D·(dim+1)·n`, linear and recomputable from the shape — from
# measured-attested joules, binding both to a reproducible-f64 result hash. Prices
# every bind/bundle/similarity op so qFHRR is an accountable substrate, not merely a
# fast one. Reuses the JWP Merkle + Ed25519 from `world`.
quantum_phasor_meter = ["dep:wai-quantum", "wai-quantum/quantum_phasor_meter"]
# Learning from quantum data (extensions/quantum-sim § QData, `wai.quantum.qdata`):
# the exponential sample-complexity separation for Pauli-channel learning — Ω(2^n)
# copies entanglement-free vs O(1/ε²) n-independent copies with a two-copy Bell
# measurement (Chen–Cotler–Huang–Li / Huang Science 2022). The quantum-data advantage
# that survives dequantization; it is why `noise_learn`'s Bell/CB sampling is
# data-efficient. Pure f64, deterministic in the seed.
quantum_qdata = ["dep:wai-quantum", "wai-quantum/quantum_qdata"]
# Quantum Bill of Materials (extensions/quantum-ops § Provenance,
# `wai.quantum.qbom`): assemble the stage receipts of one quantum computation
# (compile/calibrate/execute/mitigate/…) into a single signed, content-addressed
# provenance manifest with a total-energy roll-up and an operator-envelope export;
# binds each stage to a receipt that itself verifies. Pulls quantum_ops.
quantum_qbom = ["quantum_ops", "wai-quantum/quantum_qbom"]
# Mixed states (extensions/quantum-sim § Information): density matrices, the
# partial trace, purity, exact Pauli expectations, and CHSH against the classical
# and Tsirelson bounds. A state vector cannot describe a subsystem; this can.
quantum_info = ["quantum", "wai-quantum/quantum_info"]
# Qubits AND qutrits (extensions/quantum-sim § Qudits): the Weyl–Heisenberg group,
# the Fourier gate over `Z_d`, the controlled sum — exact for `d = 2` and `3`.
quantum_qudit = ["quantum", "wai-quantum/quantum_qudit"]
# Key distribution and security (extensions/quantum-sim § Communication): BB84 with
# an intercept-resend eavesdropper, and the no-cloning theorem priced.
quantum_comm = ["quantum", "wai-quantum/quantum_comm"]
# The limits on encoding and transport (extensions/quantum-sim § Source): von
# Neumann entropy, the Schumacher limit, and the Holevo bound — which says `n`
# qubits carry at most `n` classical bits, so quantum does not compress classical
# media. The layer that lets WAI state real limits instead of overclaiming.
quantum_source = ["quantum_info", "wai-quantum/quantum_source"]
# Transport itself (extensions/quantum-sim § Channel): Kraus channels and
# linear-inversion tomography, with the law that a channel can only lose
# information, never create it.
quantum_channel = ["quantum_source", "wai-quantum/quantum_channel"]
# Codec-chain examples gate on `codecs` (they call the C codec wrappers), so
# a `--no-default-features --features neural` build doesn't try to compile them.
[[example]]
name = "gen_preview"
path = "examples/gen_preview.rs"
required-features = ["generate"]
[[example]]
name = "int_hyper_decode_frame"
path = "examples/int_hyper_decode_frame.rs"
required-features = ["neural_int"]
[[example]]
name = "int_audio_decode"
path = "examples/int_audio_decode.rs"
required-features = ["audio_int"]
[[example]]
name = "int_world_decode"
path = "examples/int_world_decode.rs"
required-features = ["world_int"]
[[example]]
name = "int_splat_decode"
path = "examples/int_splat_decode.rs"
required-features = ["splat_int"]
[[example]]
name = "opus_check"
path = "examples/opus_check.rs"
required-features = ["codecs"]
[[example]]
name = "dl_check"
path = "examples/dl_check.rs"
required-features = ["codecs"]
[[example]]
name = "jpeg_test"
path = "examples/jpeg_test.rs"
required-features = ["codecs"]
[[bin]]
name = "wai"
path = "src/bin/wai.rs"
required-features = ["codecs"]
# The quantum stack as a CLI. Pure Rust, no host bindings — the same source builds
# for native AND `wasm32-wasip2`, producing byte-identical output under wasmtime.
[[bin]]
name = "wai-quantum"
path = "src/bin/wai_quantum.rs"
required-features = [
"quantum_toolchain",
"quantum_receipt",
"quantum_qir",
"quantum_channel",
"quantum_comm",
"quantum_qudit",
]
[[bin]]
name = "wai_int_synth_vectors"
path = "src/bin/wai_int_synth_vectors.rs"
required-features = ["neural_int"]
[[bin]]
name = "wai_film_vectors"
path = "src/bin/wai_film_vectors.rs"
required-features = ["film"]
[[bin]]
name = "wai_world_vectors"
path = "src/bin/wai_world_vectors.rs"
required-features = ["world"]
[[bin]]
name = "wai_world_meter"
path = "src/bin/wai_world_meter.rs"
required-features = ["world"]
[[bin]]
name = "wai_audio_vectors"
path = "src/bin/wai_audio_vectors.rs"
required-features = ["audio_scene"]
[[bin]]
name = "wai_haptic_vectors"
path = "src/bin/wai_haptic_vectors.rs"
required-features = ["haptic"]
[[bin]]
name = "wai_feed_vectors"
path = "src/bin/wai_feed_vectors.rs"
required-features = ["world"]
[[bin]]
name = "wai_avatar_vectors"
path = "src/bin/wai_avatar_vectors.rs"
required-features = ["world"]
[[bin]]
name = "wai_splat4d_vectors"
path = "src/bin/wai_splat4d_vectors.rs"
required-features = ["splat4d"]
[[bin]]
name = "wai_quantum_vectors"
path = "src/bin/wai_quantum_vectors.rs"
required-features = ["quantum"]
[[bin]]
name = "wai_quantum_ops_vectors"
path = "src/bin/wai_quantum_ops_vectors.rs"
required-features = ["quantum_ops"]
[[bin]]
name = "wai_quantum_meter"
path = "src/bin/wai_quantum_meter.rs"
required-features = ["quantum_receipt"]
[[bin]]
name = "wai_video_meter"
path = "src/bin/wai_video_meter.rs"
required-features = ["video_receipt"]
[[bin]]
name = "wai_meter"
path = "src/bin/wai_meter.rs"
required-features = ["haptic", "splat4d", "score", "film"]
[[bin]]
name = "wai_prov"
path = "src/bin/wai_prov.rs"
required-features = ["provenance", "codecs"]
[[bin]]
name = "wai_bench"
path = "src/bin/wai_bench.rs"
required-features = ["codecs"]
[[bin]]
name = "wai_bench_diff"
path = "src/bin/wai_bench_diff.rs"
required-features = ["codecs"]
[dev-dependencies]
serde_json = { version = "1", features = ["preserve_order"] } # construct manifests in tests
[build-dependencies]
pkg-config = "0.3" # locate system libflac (cross-platform; replaces
# the macOS-hardcoded .cargo/config.toml rustflags)
cbindgen = { version = "0.29", default-features = false }
# generate include/wai.h from the FFI surface so
# SDK consumers get a typed C header instead of
# hand-writing extern decls
[profile.release]
opt-level = 3
lto = true
codegen-units = 1
[[bin]]
name = "wai_score_vectors"
path = "src/bin/wai_score_vectors.rs"
required-features = ["score"]