open-standards/wai/wai-rs/Cargo.toml
Transaction Science 1ae28b8407
Some checks failed
standards workspaces build + test / which workspaces this change touches (pull_request) Successful in 8s
WAI conformance / does this change touch it (pull_request) Successful in 8s
WAI energy receipts / does this change touch it (pull_request) Successful in 6s
WAI HTTP delivery / WAI HTTP · does this change touch it (pull_request) Successful in 6s
WAI HTTP delivery / HTTP corpus · falsify mutations 0/3 (pull_request) Has been skipped
WAI HTTP delivery / HTTP corpus · falsify mutations 1/3 (pull_request) Has been skipped
WAI HTTP delivery / HTTP corpus · falsify mutations 2/3 (pull_request) Has been skipped
WAI HTTP delivery / HTTP corpus · falsify patches 0/3 (pull_request) Has been skipped
WAI HTTP delivery / HTTP corpus · falsify patches 1/3 (pull_request) Has been skipped
WAI HTTP delivery / HTTP corpus · falsify patches 2/3 (pull_request) Has been skipped
wai-pack / wai-pack · does this change touch it (pull_request) Successful in 5s
wai-web wasm32 / does this change touch it (pull_request) Successful in 5s
wai-web wasm32 / wai-web wasm32 build · corpus, menu and writers (pull_request) Has been cancelled
wai-web reach builds / wai-web reach · does this change touch it (pull_request) Has been cancelled
wai-web reach builds / wai-web reach builds · the package of record, every output as recorded (pull_request) Has been cancelled
wai-web reach builds / wai-web reach builds · this tree's wai-web, every rung on its engine line (pull_request) Has been cancelled
wai-pack / wai-pack · linux (pull_request) Has been cancelled
wai-pack / wai-pack · linux-arm64 (pull_request) Has been cancelled
wai-pack / wai-pack · macos (pull_request) Has been cancelled
wai-pack / wai-pack · independent verifier (Python) (pull_request) Has been cancelled
wai-pack / wai-pack · the floor through a media prober (pull_request) Has been cancelled
wai-pack / wai-pack · dependency licences (pull_request) Has been cancelled
WAI HTTP delivery / HTTP corpus · every patch and mutation in exactly one shard (pull_request) Has been cancelled
WAI HTTP delivery / HTTP corpus · verified both ways, and the differential (pull_request) Has been cancelled
WAI HTTP delivery / cache rules · controls and labelled caches (pull_request) Has been cancelled
WAI energy receipts / energy receipts · linux (pull_request) Has been cancelled
WAI energy receipts / energy receipts · linux-arm64 (pull_request) Has been cancelled
WAI energy receipts / energy receipts · macos (pull_request) Has been cancelled
WAI conformance / cargo-class corpora · linux (pull_request) Has been cancelled
WAI conformance / cargo-class corpora · macos (pull_request) Has been cancelled
WAI conformance / quantum core and corpus under wasm32-wasip2 (wasmtime) (pull_request) Has been cancelled
WAI conformance / v2 vocabulary · manifests validate as stated (pull_request) Has been cancelled
WAI conformance / independent verifiers · claims, JWP, key discovery and integer payloads (Python) (pull_request) Has been cancelled
WAI conformance / delivery telemetry · CMCD and CMSD against an independent library (pull_request) Has been cancelled
WAI conformance / cross-arch byte-equality · linux (pull_request) Has been cancelled
WAI conformance / cross-arch byte-equality · linux-arm64 (pull_request) Has been cancelled
WAI conformance / cross-arch byte-equality · macos (pull_request) Has been cancelled
WAI conformance / codec wrappers · fuzz smoke, text decode limits, C entry points, provenance, the semantic path (pull_request) Has been cancelled
WAI conformance / C2PA manifest emission · signed, read back, validated (pull_request) Has been cancelled
standards workspaces build + test / macOS energy backends (pull_request) Has been cancelled
standards workspaces build + test / joule-code-rs (joule-code/joule-code-rs, joule-code-rs, linux-arm64, true) (pull_request) Has been cancelled
joule-moq-web browser client / joule-moq-web · does this change touch it (pull_request) Has been cancelled
joule-moq-web browser client / joule-moq-web · browser end-to-end (macos) (pull_request) Has been cancelled
joule-moq-room room service / joule-moq-room · does this change touch it (pull_request) Has been cancelled
joule-moq-room room service / joule-moq-room, every target (pull_request) Has been cancelled
WAI conformance / cargo-class corpora · linux-arm64 (pull_request) Has been cancelled
repository checks / lockfiles, tests in CI, workflow hygiene, spec and section references, public text (pull_request) Has been cancelled
Merge remote-tracking branch 'origin/main' into wai/live-ads
# Conflicts:
#	.github/workflows/wai-conformance.yml
#	wai/CHANGELOG.md
#	wai/REGISTRY.md
#	wai/SPEC.md
#	wai/live-conformance/README.md
#	wai/wai-rs/Cargo.toml
#	wai/wai-rs/src/codecs/registry.rs
#	wai/wai-rs/src/lib.rs
#	wai/wai-rs/tests/int_kernels_vectors.rs
2026-10-20 13:07:05 -04:00

1441 lines
62 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 standard codec libraries (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
# clippy.toml's `disallowed-methods` lists the float functions the JPEG AI exact
# decoder must not call. Allowed for the package here; each module on that decode path
# denies it with `#![deny(clippy::disallowed_methods)]`.
[lints.clippy]
disallowed_methods = "allow"
# `cfg(kani)` is set only by the model checker (wai-verify `#[path]`-includes the
# integer sources: rans, int_entropy, int_transform, int_kernels). Declared so an
# ordinary build or clippy run knows the name and does not warn on it.
[lints.rust]
unexpected_cfgs = { level = "warn", check-cfg = ["cfg(kani)"] }
[dependencies]
# Container manifest. preserve_order so JSON round-trips byte-identical.
serde = { version = "1", features = ["derive"] }
serde_json = { version = "1", features = ["preserve_order", "raw_value"] }
# ---- 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-sys = { version = "0.17", optional = true, default-features = false, features = ["codec-dav1d"] } # AVIF decode through libavif itself, with the reader limits as its decoder limits
jpegxl-rs = { version = "0.14", optional = true } # libjxl bindings (links system libjxl; 0.11.x and 0.12.x both work)
jpegxl-sys = { version = "0.12", optional = true } # libjxl itself, to read a payload's declared size before it decodes
# 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 ONNX Runtime — 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 }
# ---- the `wai` CLI's TLS client (optional, behind the `cli_tls` feature) ----
# `wai http receipts --key-origin` retrieves an origin's key log over HTTPS itself
# (http-delivery §8.4), the origin's certificate validated against the operating system's
# trust store. The library never opens a connection: only the binary uses these, and no
# library or wasm32 build enables the feature. ring is the provider already in the graph.
rustls = { version = "0.23", default-features = false, features = ["std", "ring", "tls12"], optional = true }
rustls-platform-verifier = { version = "0.7", optional = true }
zstd-safe = { version = "7", optional = true, features = ["std"] } # for bmshj2018 latent unpack (std → WriteBuf for Vec)
# SHA-256 is WAI's digest for parameter-set identity, component identity and decoded-output
# conformance digests (SPEC §3.1, §7 *Digests*, §7.1). Pure Rust, so it is always on: the
# envelope reader verifies a component digest and a pin with no feature enabled.
sha2 = "0.10"
# ---- 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.8", optional = true } # state hashes, node minting, op/seal commitments; `hazmat` (1.8) for the HTTP head proof
ed25519-dalek = { version = "2", optional = true } # op + seal signatures
num-bigint = { version = "0.4", optional = true } # oer: exact decimal arithmetic in the composition checks
# The curve ed25519-dalek is built on, named directly only by `receipt_claims`: its
# conformance corpus builds the signatures jwp-receipts §3.1 step 3 must refuse (keys of
# small order, non-canonical encodings), which the signing API cannot produce, and the
# verifier checks S < L itself (§3.1 step 3).
curve25519-dalek = { version = "4", optional = true }
# ---- 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.6.0", path = "../wai-quantum", optional = true, default-features = false }
# ---- the integer operator set (behind `neural_int`) ----
# `wai-ops/1` (extensions/integer-operators.md): an integer decoder that decodes
# through it lowers its parameter set to WHG1 graphs and loads them under its
# capability's profile, the bounds certificate included (src/int_ops.rs). no_std, no
# dependencies of its own.
wai-ops = { path = "../wai-ops", optional = true }
[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-sys", "dep:jpegxl-rs", "dep:jpegxl-sys",
"dep:opus", "dep:ogg", "dep:claxon", "dep:flac-bound",
"dep:rav1e", "dep:dav1d",
"dep:zstd", "dep:xz2", "dep:byteorder",
"ffi",
]
# The C ABI's envelope surface (buffers, errors, WAI1/WAI2 pack and unpack, §7.1
# selection), with no codec library: it builds and is tested where libjxl and the
# other C codec libraries are absent. `codecs` adds the codec wrappers to it.
ffi = []
# 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", "dep:wai-ops"]
# Test-only: the integer decoders' direct decodes, as they were before they decoded
# through the integer operator set (`int_synth::legacy`). The differential tests decode
# random sets and payloads both ways and require the same output or the same refusal
# outside the planned breaks (tests/int_ops_differential.rs). No sink enables it.
legacy_int = ["neural_int"]
# The 32-bit forms of the stage operators that have one by identity (E9's,
# integer-operators §5E), and the decodes of `WIV1` and `WIR1` through them
# (`int_video::ops::decode_typed_i32`, `staged::wir1::ops::apply_unit_i32`): the
# arithmetic a 32-bit fabric runs, which the parity tests hold to the exact decode. For
# the integer GPU legs; no sink decodes through it by default.
i32_forms = ["neural_int", "wai-ops/i32_forms"]
# 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", "serde_json/float_roundtrip"]
neural = ["neural_int", "dep:ort", "dep:ndarray", "dep:zstd-safe"]
# 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"]
# Ed25519 verified as WAI verifies every signature (SPEC §7 *Signatures*, `src/sig.rs`):
# the dependency on its own, so the one verifier builds exactly when ed25519-dalek does
# and asks for no feature its caller does not need. Every signing feature enables it.
ed25519 = ["dep:ed25519-dalek"]
# 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", "ed25519"]
# Live events (extensions/live-events): `wai.live.events`, a signed, hash-chained,
# timeline-bound event track — the WEV1 record, its policy, its verifier, poll tallies
# replayed through the feed sim (wai.world.sim.feed0), and the MSF event timeline,
# EXT-X-DATERANGE and emsg mappings. SHA-256 and Ed25519 only; no new dependency.
live_events = ["world"]
# Live rooms (extensions/live-rooms): `wai.live.room` — the signed room descriptor (WRD1)
# and room grant (WRG1), revocation through the authority's key log (jwp-receipts §7),
# track naming, precedence and redundancy over slots, publish profiles, and the room
# verifier that replays every principal's events under the grant in effect at each t.
# Ed25519, SHA-256 and the key log only; no new dependency.
live_room = ["live_events", "key_discovery"]
# Capture binding (extensions/capture-binding): `wai.capture.take` — a device's master
# recording bound to a live room by rolling take_commit events (the take tree is
# staged-measurement Appendix C's, with RFC 9162 consistency proofs), the store's upload
# receipts (WUR1), the take manifest (WTM1), consent records (WCN1), and the take verifier
# with its single-take, aligned, complete and publishable verdicts. Ed25519, SHA-256 and
# the key log only; no new dependency.
capture_take = ["live_room"]
# Live composition (extensions/live-compose.md): `wai.live.compose` — the signed
# composition descriptor (WCD1), the participant set a room's lifecycle replay gives at
# each instant, the integer layout function (grid, featured tile, picture in picture, fill
# modes) and the saturating integer mixer, and the compositor's signed receipt (WCR1).
# The layout and the mixer use nothing beyond core and alloc. Ed25519 and SHA-256 only; no
# new dependency.
live_compose = ["live_room"]
# Live recording (extensions/live-recording): `wai.live.recording` — a finished room session as
# one WAI package (the SPEC §3.1 listing of its files; the room, its events, each take and the
# composite as components named by id and the SHA-256 of their listings; the signed WRM1
# recording manifest) with its complete and publishable verdicts, and provable clips: WCL1 clip
# records whose RFC 6962 range proofs reach a take's commitment, verified without the take.
# SHA-256, Ed25519 and the key log only; no new dependency.
live_record = ["capture_take"]
# Live metering (extensions/live-metering): `wai.live.metering` — the per-hop session record
# (WMH1) a relay, compositor or ingest gateway signs, with its ledger of the grants its sessions
# ran under and a size bound independent of the audience; the room-session receipt (WMR1) a room
# authority or a `live/meter` key signs, its units, joules per hop with their acquisition class and
# a total per class, each grant's consumption against its ceilings, and the QoE cell; and the QoE
# observations' CMCD event-timeline record and `application/cmcd` batch. It reads rooms, takes and
# composition receipts through their modules and the logs through the telemetry module. SHA-256,
# Ed25519 and the key log only; no new dependency.
live_metering = ["live_compose", "capture_take", "telemetry"]
# Energy-aware content steering (extensions/energy-steering): `wai.live.steering` — the signed
# steering policy (WSP1) and steering decision (WSD1): each pathway's joules per delivered byte or
# per delivered second at the floor tier from its hops' per-hop records (live-metering's WMH1), with
# their acquisition class, compared only within a class, a pathway with no figure never ranked above
# one with a figure; the integer decision rule with limits, minimum shares and hysteresis; the client's
# report from HLS and DASH steering requests and CMCD (an RFC 9651 parser of its own); and the
# steering manifest, the HLS tag and the DASH element, written exactly. SHA-256, Ed25519 and the key
# log only; no new dependency.
energy_steering = ["live_metering"]
# Live moderation (extensions/live-moderation): `wai.live.moderation` — the room authority's
# signed review policy (WMP1: what is held for review or reviewed after delivery, by whom, each
# deadline and fallback, and the reason codes with their grounds), the statement (WMS1) that
# follows a `decision` event, notices and complaints (WMN1), lines of decisions by digest, the
# review state machine, gaps that withheld events leave explained by the decisions that restrict
# them, clips of a redacted take through live-recording's clip verifier, and the export of each
# restricting decision as a statement of reasons in the DSA Transparency Database's format,
# written by hand. SHA-256, Ed25519 and the key log only; no new dependency.
live_moderation = ["live_events", "live_room", "live_record"]
# Forensic watermark sessions (extensions/forensic-watermark): `wai.live.watermark` — the edge's
# signed session record (WWS1: the positions of an ETSI TS 104 002 pattern it embedded, the variant
# at each, the token by its digest, the content keys, and a salted commitment to the session's grant
# and principal), the claimant's recovered sequence (WWQ1) and the exact rule that matches it, and
# the room authority's disclosure (WWD1) that opens one commitment. The TS's token is read with a
# deterministic-CBOR reader of its own and RFC 9052's COSE_Mac0 / COSE_Sign1 structure. SHA-256,
# Ed25519 and the key log only; no new dependency.
live_watermark = ["live_room"]
# Live ads (extensions/live-ads): `wai.live.ads` — server-guided ad insertion for rooms: the
# room authority's signed ad policy (WAP1), the schedule of breaks the room's `cue` events open
# and close with the post-roll annotation (WAB1), each break's HLS interstitial and preload date
# ranges and DASH alternative-presentation event written exactly, the HLS asset lists and DASH
# list MPDs each viewer is served, and the room verifier extended to the break form of
# wai.video.ssai's receipt: the decision recomputed, the asset list bound, the spend held to the
# decider grant's ceiling. SHA-256, BLAKE3, Ed25519 and the key log only; no new dependency.
live_ads = ["live_room", "video_ssai"]
# Timed text and live captions (extensions/timed-text): `wai.text.timed` — the cue model,
# live caption revisions (`caption` events of wai.live.events with the WTX1 annotation),
# and their exact mappings onto WebVTT documents and segments, the IMSC1 Text Profile,
# the MoQ caption timelines, CTA-608 (CC1, pop-on and roll-up) and HLS, with the
# machine-generation disclosure carried through each. No new dependency: the XML is
# written by hand.
timed_text = ["live_events"]
# 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"]
# OER/2 outcome-and-energy receipts (extensions/oer-receipts.md): a verifier for
# receipts that grade what a unit of work cost (projected/simulated/derived/measured),
# content-address and chain it, and sign it. Conformance is reason-set equality with
# the reference verifier and the portable C kernel over oer-conformance/.
oer = ["dep:blake3", "ed25519", "dep:num-bigint", "serde_json/float_roundtrip"]
# jwp-receipts §2.1's object content hash (src/jwp_hash.rs), on its own so any
# receipt family that names an object can compute it with BLAKE3 alone.
jwp_hash = ["dep:blake3"]
# Staged delivery (extensions/staged-delivery.md): a base first, then refinements as
# their own objects, each bound to what it refines by content hash. The residual form
# (WIR1) is integer rANS (neural_int); content hashes are jwp_hash's BLAKE3; stage
# hashes are SHA-256, always on.
staged = ["neural_int", "jwp_hash"]
# HTTP delivery (extensions/http-delivery.md): objects named by their content hash, the
# WHP1 head proof (BLAKE3's tree, through jwp_hash's BLAKE3), verified range fetch of one
# WAI2 component, the codecs union and floor, and an origin's responses. Component
# digests are SHA-256, always on. No I/O in the library; `wai http` does it.
http = ["jwp_hash"]
# Staged-delivery measurement (extensions/staged-measurement.md): the counted bytes of
# an envelope, the output tree, and the deterministic evaluation of a staged title —
# its prefixes' counted bytes, outputs and quality integers, first presentable,
# layering overhead and deduplication — over the staged sink and the integer decoders.
# Pure integer, no ONNX, no file system on wasm32.
stage_measure = ["staged", "video_int", "audio_int", "splat_int"]
# Delivery telemetry (extensions/delivery-telemetry.md): unsigned, advisory observations,
# their CMCD version 2 and CMSD reports as RFC 9651 Structured Field Values, and session
# metrics. No dependency beyond serde_json; wasm32-clean.
telemetry = []
# Typed receipt classes on the JWP chain (extensions/jwp-receipts.md §2.4.3–§2.4.7,
# §2.6, §3.1–§3.2): `claim` receipts of class energy / lawful-basis / log-inclusion,
# the soft-binding class, and recovery under the ancestor rule. Needs `provenance`
# for the coverage vocabulary and `oer` for the evidential grades and the OER receipt
# an energy claim may name, which it reads and verifies through `crate::oer`; and
# `staged`, so a session verifier holding envelopes counts a refinement layer's `WIR1`
# payload (staged-measurement §3) and reads its `refines`. Its one direct dependency,
# curve25519-dalek, is already in the graph under ed25519-dalek.
receipt_claims = ["provenance", "oer", "jwp_hash", "staged", "dep:curve25519-dalek"]
# Key discovery and signing authority (extensions/jwp-receipts.md §7): the origin key
# log a `did:web` signer_id names, anchoring, the confirmation reported beside a receipt's
# or claim's verdict, and the authorisation and revocation of decoder and reconstruct
# modules (§7.9). Adds no dependency: it signs and hashes with what `receipt_claims`
# already brings, and a module digest is the SHA-256 `oer` already brings.
key_discovery = ["receipt_claims"]
# The `wai` CLI's TLS client for anchoring an origin (`wai http receipts --key-origin`,
# http-delivery §8.4): rustls with the operating system's trust store. Built into the
# binary only; without it the CLI refuses to anchor rather than fetch over plaintext.
cli_tls = ["http", "key_discovery", "dep:rustls", "dep:rustls-platform-verifier"]
# 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.circuit2` and the frozen `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"]
# wai.video.manifest — attested, deduplicating, energy-accounted per-session
# manifest. Reuses the world Merkle + Ed25519 and the JCP GrantRef (quantum_ops);
# carries no pixel-decode dependency, so it stays a light, pure-Rust surface.
# Depends on `world` EXPLICITLY: these receipts use
# `crate::world::receipt::merkle_root`. That used to arrive transitively via
# `quantum_ops`, which no longer provides it now the quantum stack lives in
# its own crate — a dependency this feature always had and never declared.
video_manifest = ["quantum_ops", "world"]
# Energy meters — the source of a receipt's joules_micro. Reuses the
# EnergyProvenance ladder; hardware counter vs calibrated model, mechanically.
energy_meter = ["video_manifest"]
# wai.video.ssai — attested ad decisioning + per-impression receipt. Reuses the
# manifest module's EnergyProvenance + the GrantRef/Merkle/Ed25519 floor.
# Pure decision policy (no deps) — separable so it can be model-checked.
video_policy = []
video_ssai = ["video_manifest", "video_policy"]
# wai.video.keys — attested content-key release; the DRM audit trail as a
# recomputable decision. Reuses the manifest floor (EnergyProvenance, GrantRef,
# Ed25519).
video_keys = ["video_manifest"]
# wai.video.package — deterministic segmentation + attested, deduplicating
# SegmentMap. Reuses the manifest floor (EnergyProvenance, GrantRef, Merkle). Also the
# packaging extension's stage index (WSIX) and version-2 package receipt, which name
# each object by jwp-receipts §2.1's content hash (jwp_hash).
video_package = ["video_manifest", "jwp_hash"]
# wai.video.channel — virtual linear / FAST assembly; the program-as-run hash
# chain. Reuses the manifest floor (EnergyProvenance, GrantRef, Merkle).
video_channel = ["video_manifest"]
# The whole OTT workflow suite in one switch.
video_workflow = ["video_manifest", "video_ssai", "video_keys", "video_package", "video_channel"]
# 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), 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 over the step. 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
# signed with the correction. 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 (Begušić and Chan's sparse
# Pauli dynamics). Computes ⟨O⟩ on large
# low-magic circuits where no state vector exists; grows with magic, not qubits.
quantum_pauli = ["quantum", "wai-quantum/quantum_pauli"]
# Sparse Pauli dynamics at utility scale (arbitrary angles, up to 1024 qubits),
# and its signed receipts.
quantum_spd = ["quantum", "wai-quantum/quantum_spd"]
quantum_spd_receipt = ["quantum_spd", "wai-quantum/quantum_spd_receipt"]
# Tensor-network states on the hardware graph (simple update, belief propagation).
quantum_bptn = ["quantum_spd", "wai-quantum/quantum_bptn"]
# Fault-tolerant resource estimation (layout, distance, T factories, frontier),
# and its signed receipts.
quantum_resource = ["dep:wai-quantum", "wai-quantum/quantum_resource"]
quantum_resource_receipt = ["quantum_resource", "wai-quantum/quantum_resource_receipt"]
# Noisy Clifford circuits at QEC scale: frame sampling, detector error models,
# exact matching, measured code models.
quantum_frame = ["dep:wai-quantum", "wai-quantum/quantum_frame", "wai-quantum/quantum_uf"]
# Tensor-network contraction: hyper-optimised trees, slicing, circuit amplitudes.
quantum_tn = ["dep:wai-quantum", "wai-quantum/quantum_tn"]
# Gaussian boson sampling: hafnians, torontonians, exact probabilities, samples, checks.
quantum_gbs = ["dep:wai-quantum", "wai-quantum/quantum_gbs"]
# The dense state vector at any angle: fusion, threads, the same bits everywhere.
quantum_sv = ["dep:wai-quantum", "wai-quantum/quantum_sv", "wai-quantum/quantum_noisy"]
# Architecture-level estimation: yoked storage, cultivation, CCZ factories,
# reaction-limited time, whole machines.
quantum_arch = ["dep:wai-quantum", "wai-quantum/quantum_arch"]
# qLDPC memory at circuit level: bivariate-bicycle codes, BP-OSD.
quantum_ldpc = ["quantum_frame", "wai-quantum/quantum_ldpc"]
# Quantum-inspired optimisation: simulated bifurcation, annealing, exact referee.
quantum_qio = ["dep:wai-quantum", "wai-quantum/quantum_qio", "wai-quantum/quantum_dmrg", "wai-quantum/quantum_tdvp", "wai-quantum/quantum_chem", "wai-quantum/quantum_nqs"]
quantum_qir = ["quantum_toolchain", "wai-quantum/quantum_qir"]
# The fabric: members, parity against the CPU reference, certification,
# placement by joules, and the core in 32-bit lanes.
quantum_fabric = ["quantum", "quantum_ops", "wai-quantum/quantum_fabric"]
# The fabric's WebGPU member: the 32-bit-lane kernel in WGSL through the
# platform's GPU interface, certified bit-exact per adapter, and
# `wai_quantum_vectors verify --webgpu`. Opt-in: it is the one feature that
# reaches a platform interface.
quantum_fabric_webgpu = ["quantum_fabric", "wai-quantum/quantum_fabric_webgpu"]
# 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"]
# `encode` and `decode` need the `codecs` feature and are compiled out without it;
# every other command (wrap, unwrap, inspect, capabilities, registry export) builds
# with --no-default-features, which is how CI runs it. `generate` needs the feature
# `generate`, and `score` the feature `score`; without them each says so.
[[bin]]
name = "wai"
path = "src/bin/wai.rs"
# 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",
"quantum_spd_receipt",
"quantum_bptn",
"quantum_resource_receipt",
"quantum_frame",
"quantum_tn",
"quantum_gbs",
"quantum_sv",
"quantum_arch",
"quantum_ldpc",
"quantum_qio",
"quantum_fabric",
]
[[bin]]
name = "wai_int_synth_vectors"
path = "src/bin/wai_int_synth_vectors.rs"
required-features = ["neural_int"]
# The binary payload vectors of the integer codecs and their refusal fixtures
# (extensions/integer-payloads.md §12): `gen` converts the committed JSON, `verify`
# requires byte-identical regeneration, the sidecars' SHA-256 and every fixture's code.
[[bin]]
name = "wai_int_payload_vectors"
path = "src/bin/wai_int_payload_vectors.rs"
required-features = ["video_int", "audio_int", "splat_int"]
[[bin]]
name = "wai_staged_vectors"
path = "src/bin/wai_staged_vectors.rs"
required-features = ["staged", "video_int", "audio_int", "splat_int"]
[[bin]]
name = "wai_stage_bench"
path = "src/bin/wai_stage_bench.rs"
required-features = ["staged", "video_int", "audio_int", "splat_int"]
[[bin]]
name = "wai_film_vectors"
path = "src/bin/wai_film_vectors.rs"
required-features = ["film"]
[[bin]]
name = "wai_http_vectors"
path = "src/bin/wai_http_vectors.rs"
required-features = ["http"]
[[bin]]
name = "wai_world_vectors"
path = "src/bin/wai_world_vectors.rs"
required-features = ["world"]
[[bin]]
name = "wai_live_events_vectors"
path = "src/bin/wai_live_events_vectors.rs"
required-features = ["live_events"]
[[bin]]
name = "wai_live_room_vectors"
path = "src/bin/wai_live_room_vectors.rs"
required-features = ["live_room"]
[[bin]]
name = "wai_capture_take_vectors"
path = "src/bin/wai_capture_take_vectors.rs"
required-features = ["capture_take"]
[[bin]]
name = "wai_live_compose_vectors"
path = "src/bin/wai_live_compose_vectors.rs"
required-features = ["live_compose"]
[[bin]]
name = "wai_live_record_vectors"
path = "src/bin/wai_live_record_vectors.rs"
required-features = ["live_record"]
[[bin]]
name = "wai_live_metering_vectors"
path = "src/bin/wai_live_metering_vectors.rs"
required-features = ["live_metering"]
[[bin]]
name = "wai_energy_steering_vectors"
path = "src/bin/wai_energy_steering_vectors.rs"
required-features = ["energy_steering"]
[[bin]]
name = "wai_live_moderation_vectors"
path = "src/bin/wai_live_moderation_vectors.rs"
required-features = ["live_moderation"]
[[bin]]
name = "wai_live_watermark_vectors"
path = "src/bin/wai_live_watermark_vectors.rs"
required-features = ["live_watermark"]
[[bin]]
name = "wai_live_ads_vectors"
path = "src/bin/wai_live_ads_vectors.rs"
required-features = ["live_ads"]
[[bin]]
name = "wai_timed_text_vectors"
path = "src/bin/wai_timed_text_vectors.rs"
required-features = ["timed_text"]
[[bin]]
name = "wai_world_meter"
path = "src/bin/wai_world_meter.rs"
required-features = ["world", "receipt_claims"]
[[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_oer_vectors"
path = "src/bin/wai_oer_vectors.rs"
required-features = ["oer"]
[[bin]]
name = "wai_oer_diff"
path = "src/bin/wai_oer_diff.rs"
required-features = ["oer"]
[[bin]]
name = "wai_pin_vectors"
path = "src/bin/wai_pin_vectors.rs"
[[bin]]
name = "wai_claim_vectors"
path = "src/bin/wai_claim_vectors.rs"
required-features = ["receipt_claims"]
[[bin]]
name = "wai_jwp_vectors"
path = "src/bin/wai_jwp_vectors.rs"
required-features = ["receipt_claims"]
[[bin]]
name = "wai_signer_vectors"
path = "src/bin/wai_signer_vectors.rs"
required-features = ["key_discovery"]
[[bin]]
name = "wai-keys"
path = "src/bin/wai_keys.rs"
required-features = ["key_discovery"]
[[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", "receipt_claims"]
[[bin]]
name = "wai_video_meter"
path = "src/bin/wai_video_meter.rs"
required-features = ["video_receipt", "receipt_claims"]
[[bin]]
name = "wai_meter"
path = "src/bin/wai_meter.rs"
required-features = ["haptic", "splat4d", "score", "film", "receipt_claims"]
[[bin]]
name = "wai_prov"
path = "src/bin/wai_prov.rs"
required-features = ["provenance", "codecs", "receipt_claims"]
[[bin]]
name = "wai_bench"
path = "src/bin/wai_bench.rs"
required-features = ["codecs"]
[[bin]]
name = "wai_decode_bench"
path = "src/bin/wai_decode_bench.rs"
required-features = ["neural_int", "video_int", "audio_int", "world_int", "splat_int"]
[[bin]]
name = "wai_bench_diff"
path = "src/bin/wai_bench_diff.rs"
required-features = ["codecs"]
# A program, not a libtest suite: it lists its own executable's symbols, so the test
# harness's code must not be in it (see the file's doc).
[[test]]
name = "jpegai_decode_symbols"
path = "tests/jpegai_decode_symbols.rs"
harness = false
required-features = ["neural_int"]
# Feature-gated integration tests that CI names with `--test`. Declared with their
# features so that naming one without them stops cargo with an error, instead of
# compiling the `#![cfg(feature)]` file to an empty binary that reports ok.
[[test]]
name = "int_audio"
path = "tests/int_audio.rs"
required-features = ["audio_int"]
[[test]]
name = "int_splat"
path = "tests/int_splat.rs"
required-features = ["splat_int"]
[[test]]
name = "cli_http"
path = "tests/cli_http.rs"
required-features = ["http"]
[[test]]
name = "int_kernels_vectors"
path = "tests/int_kernels_vectors.rs"
required-features = ["neural_int", "video_int", "audio_int", "world_int", "splat_int"]
[[test]]
name = "int_kernels_geometry"
path = "tests/int_kernels_geometry.rs"
required-features = ["neural_int", "legacy_int"]
[[test]]
name = "int_ops_differential"
path = "tests/int_ops_differential.rs"
required-features = ["legacy_int", "splat_int", "audio_int", "world_int"]
[[test]]
name = "int_synth_ops"
path = "tests/int_synth_ops.rs"
required-features = ["legacy_int"]
[[test]]
name = "int_audio_ops"
path = "tests/int_audio_ops.rs"
required-features = ["audio_int", "legacy_int"]
[[test]]
name = "int_splat_ops"
path = "tests/int_splat_ops.rs"
required-features = ["splat_int", "legacy_int"]
[[test]]
name = "int_hyper_ops"
path = "tests/int_hyper_ops.rs"
required-features = ["video_int", "legacy_int"]
# wai.world.model's integer renderer through its lowering world/1 (integer-operators §13.5).
[[test]]
name = "int_world_ops"
path = "tests/int_world_ops.rs"
required-features = ["world_int", "legacy_int"]
[[test]]
name = "jpegai_ops"
path = "tests/jpegai_ops.rs"
required-features = ["neural_int", "legacy_int"]
[[test]]
name = "jpegai_nets_ops"
path = "tests/jpegai_nets_ops.rs"
required-features = ["neural_int", "legacy_int"]
[[test]]
name = "int_video_ops"
path = "tests/int_video_ops.rs"
required-features = ["video_int", "legacy_int"]
[[test]]
name = "wir1_ops"
path = "tests/wir1_ops.rs"
required-features = ["staged", "legacy_int"]
# What the JPEG AI exact decoder holds against its direct decode (its own binary: a live-bytes allocator).
[[test]]
name = "jpegai_memory"
path = "tests/jpegai_memory.rs"
required-features = ["neural_int", "legacy_int"]
# What that renderer holds against the direct renderer (its own binary: a live-bytes allocator).
[[test]]
name = "int_world_memory"
path = "tests/int_world_memory.rs"
required-features = ["world_int", "legacy_int"]
[[test]]
name = "int_mlicpp"
path = "tests/int_mlicpp.rs"
required-features = ["neural_int"]
[[test]]
name = "int_mlicpp_preflight"
path = "tests/int_mlicpp_preflight.rs"
required-features = ["neural_int"]
[[test]]
name = "int_mlicpp_ops"
path = "tests/int_mlicpp_ops.rs"
required-features = ["legacy_int"]
[[test]]
name = "cli_stage"
path = "tests/cli_stage.rs"
required-features = ["staged", "video_int", "audio_int", "splat_int"]
[[test]]
name = "staged_resources"
path = "tests/staged_resources.rs"
required-features = ["staged", "video_int"]
[[test]]
name = "staged_moq"
path = "tests/staged_moq.rs"
required-features = ["staged", "video_int", "receipt_claims"]
[[test]]
name = "int_payload"
path = "tests/int_payload.rs"
required-features = ["video_int", "audio_int", "splat_int"]
[[test]]
name = "int_payload_preflight"
path = "tests/int_payload_preflight.rs"
required-features = ["video_int", "audio_int", "splat_int"]
[[test]]
name = "int_payload_cost"
path = "tests/int_payload_cost.rs"
required-features = ["video_int", "audio_int", "splat_int", "legacy_int"]
# The store of loaded parameter sets under the decodes that use it (src/int_set_cache.rs).
[[test]]
name = "int_set_cache"
path = "tests/int_set_cache.rs"
required-features = ["video_int", "audio_int", "splat_int"]
[[test]]
name = "int_video_enc_memory"
path = "tests/int_video_enc_memory.rs"
required-features = ["video_int"]
[[test]]
name = "generate"
path = "tests/generate.rs"
required-features = ["generate"]
# `wai generate` and `wai score build|render` run as a user runs them, against the
# committed generate vectors and score-conformance/.
[[test]]
name = "cli_generate_score"
path = "tests/cli_generate_score.rs"
required-features = ["generate", "score"]
[[test]]
name = "ffi_envelope"
path = "tests/ffi_envelope.rs"
required-features = ["ffi"]
[[test]]
name = "ffi_neural_pin"
path = "tests/ffi_neural_pin.rs"
required-features = ["neural", "ffi"]
[[test]]
name = "neural_native_decode"
path = "tests/neural_native_decode.rs"
required-features = ["neural"]
[[test]]
name = "jpegai_e2e_full"
path = "tests/jpegai_e2e_full.rs"
required-features = ["neural_int"]
# Drives the `wai-keys` binary, so it needs the feature that builds it.
[[test]]
name = "wai_keys_cli"
path = "tests/wai_keys_cli.rs"
required-features = ["key_discovery"]
# On 64-bit Arm, SHA-256 through the processor's SHA-2 instructions where it has them
# (sha2's `asm` feature: its aarch64 backend, which detects the instructions at run time
# and falls back to the portable code). Hashing a parameter set is a decode's to identify
# it (SPEC §3.1), and a set can be tens of megabytes. The digests are the same bytes.
# Not on Windows, whose toolchain does not assemble the sha2-asm sources the feature
# brings in, and not on wasm32 or any other target, whose build this leaves as it is.
[target.'cfg(all(target_arch = "aarch64", not(target_os = "windows")))'.dependencies]
sha2 = { version = "0.10", features = ["asm"] }
[dev-dependencies]
serde_json = { version = "1", features = ["preserve_order"] } # construct manifests in tests
# The bounds pass as it stood before its closed forms (`wai_ops::bounds_oracle`), which
# the random-set differential (tests/int_ops_differential.rs) holds load step 8 to.
wai-ops = { path = "../wai-ops", features = ["oracle"] }
[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
# The HTTP corpus's falsification (http-conformance/falsify/run.sh): one target
# directory, each patch rebuilt incrementally on the last; overflow checks and debug
# assertions on, as in the tests, so a patch is judged by the code's own checks; enough
# optimisation that each verify runs quickly.
[profile.falsify]
inherits = "dev"
opt-level = 1
debug = false
incremental = true
overflow-checks = true
debug-assertions = true
[[bin]]
name = "wai_score_vectors"
path = "src/bin/wai_score_vectors.rs"
required-features = ["score"]
# Staged-delivery measurement (extensions/staged-measurement.md): `eval` one title,
# `verify` the corpus staged-measure-conformance/ (fixtures regenerated in memory,
# evaluations, the fixture tool's own reconstruction, goldens), `generate-goldens`
# and `gen-fixtures` (never in CI), and `bench` (never in CI): one title's decode time
# and decode figure on this machine, and, with `receipt_claims`, its session claim
# (`--sign`).
[[bin]]
name = "wai_stage_measure"
path = "src/bin/wai_stage_measure.rs"
required-features = ["stage_measure"]
[[test]]
name = "stage_measure"
path = "tests/stage_measure.rs"
required-features = ["stage_measure"]
# Its own binary: a counting allocator shows a title over an outsized base is refused
# before anything is allocated for it.
[[test]]
name = "stage_measure_bounds"
path = "tests/stage_measure_bounds.rs"
required-features = ["stage_measure"]
# Delivery telemetry (extensions/delivery-telemetry.md): `encode` an observation's CMCD
# report, `decode` one, `verify` the corpus telemetry-conformance/, `gen` (never in CI).
[[bin]]
name = "wai_telemetry"
path = "src/bin/wai_telemetry.rs"
required-features = ["telemetry"]
# Every other feature-gated integration test, declared with its features for the same
# reason as those above: named in a step that lacks them, cargo stops with an error
# instead of compiling the file to an empty binary that reports ok. A test file gated
# on a feature without an entry here fails scripts/check-tests-in-ci.py.
[[test]]
name = "dash_read_bounds"
path = "tests/dash_read_bounds.rs"
required-features = ["http"]
[[test]]
name = "ffi_robustness"
path = "tests/ffi_robustness.rs"
required-features = ["codecs"]
[[test]]
name = "fuzz_smoke"
path = "tests/fuzz_smoke.rs"
required-features = ["codecs"]
[[test]]
name = "int_hyper_synth"
path = "tests/int_hyper_synth.rs"
required-features = ["neural_int"]
[[test]]
name = "int_video"
path = "tests/int_video.rs"
required-features = ["video_int"]
[[test]]
name = "int_video_halfpel"
path = "tests/int_video_halfpel.rs"
required-features = ["video_int"]
[[test]]
name = "int_video_keyframe"
path = "tests/int_video_keyframe.rs"
required-features = ["neural_int", "video_int"]
[[test]]
name = "int_video_sota_keyframe"
path = "tests/int_video_sota_keyframe.rs"
required-features = ["neural_int", "video_int"]
[[test]]
name = "int_world"
path = "tests/int_world.rs"
required-features = ["world_int"]
[[test]]
name = "int_world2"
path = "tests/int_world2.rs"
required-features = ["world_int"]
[[test]]
name = "int_world_shared"
path = "tests/int_world_shared.rs"
required-features = ["world_int", "world_model"]
[[test]]
name = "jpegai_bitstream_calibration"
path = "tests/jpegai_bitstream_calibration.rs"
required-features = ["neural_int"]
[[test]]
name = "jpegai_color_calibration"
path = "tests/jpegai_color_calibration.rs"
required-features = ["neural_int"]
[[test]]
name = "jpegai_cross_platform"
path = "tests/jpegai_cross_platform.rs"
required-features = ["neural_int", "provenance"]
[[test]]
name = "jpegai_dequant_calibration"
path = "tests/jpegai_dequant_calibration.rs"
required-features = ["neural_int", "legacy_int"]
[[test]]
name = "jpegai_derive_calibration"
path = "tests/jpegai_derive_calibration.rs"
required-features = ["neural_int", "legacy_int"]
[[test]]
name = "jpegai_e2e"
path = "tests/jpegai_e2e.rs"
required-features = ["codecs", "neural"]
[[test]]
name = "jpegai_e2e_chain"
path = "tests/jpegai_e2e_chain.rs"
required-features = ["neural_int", "legacy_int"]
[[test]]
name = "jpegai_e2e_chroma"
path = "tests/jpegai_e2e_chroma.rs"
required-features = ["neural_int", "legacy_int"]
[[test]]
name = "jpegai_e2e_dequant"
path = "tests/jpegai_e2e_dequant.rs"
required-features = ["neural_int", "legacy_int"]
[[test]]
name = "jpegai_e2e_frontend"
path = "tests/jpegai_e2e_frontend.rs"
required-features = ["neural_int", "legacy_int"]
[[test]]
name = "jpegai_e2e_hyperlatent"
path = "tests/jpegai_e2e_hyperlatent.rs"
required-features = ["neural_int", "legacy_int"]
[[test]]
name = "jpegai_e2e_synthesis"
path = "tests/jpegai_e2e_synthesis.rs"
required-features = ["neural_int", "legacy_int"]
[[test]]
name = "jpegai_efl_calibration"
path = "tests/jpegai_efl_calibration.rs"
required-features = ["neural_int"]
[[test]]
name = "jpegai_efn_calibration"
path = "tests/jpegai_efn_calibration.rs"
required-features = ["neural_int"]
[[test]]
name = "jpegai_hyper_calibration"
path = "tests/jpegai_hyper_calibration.rs"
required-features = ["neural", "legacy_int"]
[[test]]
name = "jpegai_hyperscale_calibration"
path = "tests/jpegai_hyperscale_calibration.rs"
required-features = ["neural_int", "legacy_int"]
[[test]]
name = "jpegai_icci_calibration"
path = "tests/jpegai_icci_calibration.rs"
required-features = ["neural_int"]
[[test]]
name = "jpegai_icci_net_calibration"
path = "tests/jpegai_icci_net_calibration.rs"
required-features = ["neural_int"]
[[test]]
name = "jpegai_lef_calibration"
path = "tests/jpegai_lef_calibration.rs"
required-features = ["neural_int"]
[[test]]
name = "jpegai_live"
path = "tests/jpegai_live.rs"
required-features = ["codecs", "neural"]
[[test]]
name = "jpegai_lsbs_calibration"
path = "tests/jpegai_lsbs_calibration.rs"
required-features = ["neural_int", "legacy_int"]
[[test]]
name = "jpegai_mans_calibration"
path = "tests/jpegai_mans_calibration.rs"
required-features = ["neural_int", "legacy_int"]
[[test]]
name = "jpegai_mans_golden"
path = "tests/jpegai_mans_golden.rs"
required-features = ["neural"]
[[test]]
name = "jpegai_mcm_calibration"
path = "tests/jpegai_mcm_calibration.rs"
required-features = ["neural", "legacy_int"]
[[test]]
name = "jpegai_postfilter_chain"
path = "tests/jpegai_postfilter_chain.rs"
required-features = ["neural_int"]
[[test]]
name = "jpegai_reconstruct_calibration"
path = "tests/jpegai_reconstruct_calibration.rs"
required-features = ["neural_int", "legacy_int"]
[[test]]
name = "jpegai_reconstruction_binding"
path = "tests/jpegai_reconstruction_binding.rs"
required-features = ["neural_int", "provenance"]
[[test]]
name = "jpegai_scope_ort"
path = "tests/jpegai_scope_ort.rs"
required-features = ["neural"]
[[test]]
name = "jpegai_sigma_index_calibration"
path = "tests/jpegai_sigma_index_calibration.rs"
required-features = ["neural_int", "legacy_int"]
[[test]]
name = "jpegai_synthesis_calibration"
path = "tests/jpegai_synthesis_calibration.rs"
required-features = ["neural", "legacy_int"]
[[test]]
name = "jpegai_uv_calibration"
path = "tests/jpegai_uv_calibration.rs"
required-features = ["neural", "legacy_int"]
[[test]]
name = "neural_cost_limit"
path = "tests/neural_cost_limit.rs"
required-features = ["ffi", "neural", "video_int"]
[[test]]
name = "semantic_path"
path = "tests/semantic_path.rs"
required-features = ["semantic"]
[[test]]
name = "text_decode_bounds"
path = "tests/text_decode_bounds.rs"
required-features = ["codecs"]
[[test]]
name = "media_decode_bounds"
path = "tests/media_decode_bounds.rs"
required-features = ["codecs"]
[[test]]
name = "container_reservations"
path = "tests/container_reservations.rs"
required-features = ["world", "audio_scene", "film", "score", "haptic", "splat4d"]
[[test]]
name = "extension_duration_limits"
path = "tests/extension_duration_limits.rs"
required-features = ["world", "audio_scene", "film", "score", "haptic", "splat4d"]
[[test]]
name = "text_decode_memory"
path = "tests/text_decode_memory.rs"
required-features = ["codecs"]
[[test]]
name = "video_receipt"
path = "tests/video_receipt.rs"
required-features = ["video_receipt"]
[[test]]
name = "world_model"
path = "tests/world_model.rs"
required-features = ["world_model"]
[[test]]
name = "live_events"
path = "tests/live_events.rs"
required-features = ["live_events"]
[[test]]
name = "live_room"
path = "tests/live_room.rs"
required-features = ["live_room"]
[[test]]
name = "capture_take"
path = "tests/capture_take.rs"
required-features = ["capture_take"]
[[test]]
name = "live_compose"
path = "tests/live_compose.rs"
required-features = ["live_compose"]
[[test]]
name = "live_record"
path = "tests/live_record.rs"
required-features = ["live_record"]
[[test]]
name = "live_metering"
path = "tests/live_metering.rs"
required-features = ["live_metering"]
[[test]]
name = "energy_steering"
path = "tests/energy_steering.rs"
required-features = ["energy_steering"]
[[test]]
name = "live_moderation"
path = "tests/live_moderation.rs"
required-features = ["live_moderation"]
[[test]]
name = "live_watermark"
path = "tests/live_watermark.rs"
required-features = ["live_watermark"]
[[test]]
name = "live_ads"
path = "tests/live_ads.rs"
required-features = ["live_ads"]
[[test]]
name = "timed_text"
path = "tests/timed_text.rs"
required-features = ["timed_text"]
[[test]]
name = "world_replay"
path = "tests/world_replay.rs"
required-features = ["world"]