Load step 8 was enforced at `graph::load` only. `interp::run` took any `&Graph`, and a lowering's graph, a parsed one or a struct literal reached it without step 8: in the default build, `lower::int_synth` then `run` decoded the gradient set to its committed digest while `graph::load` of the same bytes refused it at Load(8). - `graph::Loaded` holds a graph that passed every load step; its field is private and only `graph::load` makes one. `run` takes `&Loaded`. - A `Graph`, parsed, lowered or built in place, is data. A compile_fail example (E0308) on `Loaded` shows a lowered graph cannot be passed to `run`. - The goldens load every lowered graph from its bytes before running it, so their `uncertified` gate now guards something. - tests/step8.rs, in every build: each lowered int_synth graph is refused at Load(8) without the switch and loads with it. - Cargo.toml says who enables the switch, and that no decoder may. Co-Authored-By: Claude Opus 5.5 <[email protected]>
46 lines
1.7 KiB
TOML
46 lines
1.7 KiB
TOML
# The reference implementation of `wai-ops/1`, the integer operator set
|
|
# (`extensions/integer-operators.md`): the `WHG1` graph form, the load and run-time
|
|
# plans, the interpreter, the stage operators, the canonical lowerings of the
|
|
# registered integer network forms, and the conformance vectors of
|
|
# `../ops-conformance/`.
|
|
#
|
|
# `no_std` with `alloc`, and no dependencies, so that a model checker can include
|
|
# its sources by `#[path]` the way `wai-verify` includes the other integer sources.
|
|
[package]
|
|
name = "wai-ops"
|
|
version = "0.1.0"
|
|
edition = "2024"
|
|
rust-version = "1.97"
|
|
license = "Apache-2.0"
|
|
publish = false
|
|
description = "WAI integer operator set wai-ops/1: WHG1 graphs, plans, interpreter, stage operators, lowerings and conformance vectors"
|
|
|
|
[lib]
|
|
name = "wai_ops"
|
|
path = "src/lib.rs"
|
|
|
|
# The vector and lowering tool. It reads and writes files, so it is `std`; the
|
|
# library it drives is not.
|
|
[[bin]]
|
|
name = "wai-ops"
|
|
path = "src/bin/wai-ops.rs"
|
|
required-features = ["uncertified"]
|
|
|
|
[features]
|
|
# Load step 8 (the bounds pass and the profile verdict, §10.5) is not built yet.
|
|
# Without this switch a graph cannot complete its load, and since the interpreter
|
|
# runs only a graph `graph::load` returned, the default build decodes nothing; with
|
|
# it, step 8 is skipped, so the vectors and the lowerings run before the certifier
|
|
# exists. The tests, the conformance tool and its browser-engine build (`node/`)
|
|
# enable it, and no decoder may. wai-ops is a workspace of its own, so no other
|
|
# crate's features unify with it. The switch goes when the certifier lands.
|
|
uncertified = []
|
|
|
|
[lints.rust]
|
|
unexpected_cfgs = { level = "warn", check-cfg = ["cfg(kani)"] }
|
|
|
|
[dependencies]
|
|
# none
|
|
|
|
[profile.release]
|
|
debug = false
|