open-standards/wai/wai-pack/Cargo.toml
Transaction Science 6b62aa482b wai-pack-gpu: per-call error scopes; the backends claimed are the one shown (#438 review S6, S7, N12)
- #438 review S7. Device errors were collected in one uncaptured-error sink per
  device, and `settled()` took them all, so under `--jobs N` one thread could consume
  another call's validation or out-of-memory error and that call returned its output
  as Ok. Each `run` now pushes its own Validation and OutOfMemory error scopes and
  pops them after its read-back, refusing the call on either; wgpu 30's scopes are
  thread-local with its `std` feature, which this crate enables.
- #438 review S6. The crate docs, both Cargo.toml comments and the CHANGELOG said the
  kernels are exact on Metal, Vulkan and DX12; they were shown on Metal only. They now
  say so, that Vulkan and DX12 were not run and nothing is claimed for them, and that
  qualification at open is the gate on any adapter.
- #438 review N12. The CHANGELOG entry says a verifier before this revision refuses a
  claim carrying `fabrics`; it also states the meter's new class, its sampled sole use,
  the share of more than 0, and the `npu` term.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-24 21:11:34 -04:00

63 lines
2.9 KiB
TOML

[package]
name = "wai-pack"
version = "0.1.0"
edition = "2024"
rust-version = "1.97"
license = "Apache-2.0"
description = "The reference packager of WAI's packaging extension: a declared policy and its digest, scene-cut segmentation with a bounded lookahead, staged packages of refinement layers and stills, live windows, simulated delivery, and the conformance corpus that pins them."
repository = "https://git.transaction.science/Transaction-Science/open-standards"
publish = false
# Its own workspace and Cargo.lock, like the other crates beside wai-rs.
[workspace]
[lib]
name = "wai_pack"
[[bin]]
name = "wai-pack"
path = "src/bin/wai_pack.rs"
[dependencies]
# The standard's crate: canonical JSON and the capability registry (ungated); the
# integer video encoder and decoder (video_int); the stage index and the package receipt
# (video_package); HTTP delivery's codecs union and floor (http); staged measurement's
# counted bytes and output digest (stage_measure); the measurement claim and its figure
# view (receipt_claims); the model meter (energy_meter); and a still's writer and reader
# (png_still, src/png.rs re-exports them). No codec library is linked.
wai = { path = "../wai-rs", default-features = false, features = ["video_int", "video_package", "http", "stage_measure", "receipt_claims", "energy_meter", "png_still"] }
# Stages on a GPU (feature `gpu`, packaging §11.6): the motion search, SSE and BLAKE3's
# chunk function as WGSL kernels, in a crate of its own with its own lockfile, as
# wai-ops-gpu is. Off by default: a build without it places every stage on the CPU.
wai-pack-gpu = { path = "../wai-pack-gpu", optional = true }
ed25519-dalek = "2"
# TOML 1.0 (the 0.8 line; later lines read TOML 1.1, which a policy must not use).
toml = { version = "0.8", default-features = false, features = ["parse"] }
serde_json = "1"
blake3 = "1"
sha2 = "0.10"
# Inflate, for the verifier's reader of a still (wai's png_still, which src/png.rs
# re-exports): an implementation apart from the packer's own deflate, so a still is
# decoded by code that did not write it.
[features]
default = []
# A GPU backend for the stages §11.6 lets a GPU run (wai-pack-gpu, through wgpu; shown exact on Metal).
gpu = ["dep:wai-pack-gpu"]
# The fabric meter on macOS (src/fabric_meter.rs): the kernel's account of the process's
# CPU energy, and the GPU rail's energy attributed by GPU time, without privileges.
fabric-meter = []
# Release builds check integer overflow as debug builds do, so the release tests in CI
# catch a wrapped product (a field read as u16 and doubled) rather than run past it.
[dev-dependencies]
# An inflater independent of the reader's own, to read the writer's stills back in a test.
miniz_oxide = "0.8"
[profile.release]
overflow-checks = true
# R3 of the design: no float decides anything. The library and the CLI deny float
# arithmetic outright.
[lints.clippy]
float_arithmetic = "deny"