2 releases
| new 0.1.1 | Apr 18, 2026 |
|---|---|
| 0.1.0 | Apr 13, 2026 |
#626 in Algorithms
Used in 5 crates
78KB
1.5K
SLoC
vyre-spec
Frozen data contracts for the vyre GPU compute IR.
What this crate is
vyre-spec is the leaf crate of the vyre ecosystem. It contains only frozen
data types: IR scalar and operation types, algebraic laws, conformance
categories, verification evidence, engine invariants, and the I1..I15
intrinsic catalog. Zero dependencies. Every vyre consumer transitively depends
on this crate, so backend vendors may depend on vyre-spec alone to prove
conformance without pulling in the compiler or the conform runtime.
What you get
Category— operation classification (A,C, etc.)AlgebraicLaw— declarative laws (commutative, associative, identity, distributive, monotonic, bounded, custom predicates, and more)OpSpec— frozen operation specificationOpSignature— input/output type signature for an IR operationDataType— IR types (U32,I32,U64,Vec2U32,Vec4U32,Bool,Bytes,F32)Convention— calling conventions for op dispatchIntrinsicTable— hardware intrinsic lookup tablesEngineInvariant/Invariant/InvariantId— engine-level invariant declarations and theI1..I15catalogVerification— verification result typesLayer— conformance layer declarations (L0–L8)BackendAvailability— per-backend availability predicatesGoldenSample/KatVector/AdversarialInput— test vectors and hostile witnessesBinOp/UnOp/AtomicOp— operation descriptorsLawCatalog/LAW_CATALOG— static registry of all declared lawsINVARIANTS/by_id/by_category— static invariant registry and lookups
Stability
All public enums are marked #[non_exhaustive]. The surface of this crate is
frozen under a 5-year stability contract. Any breaking change to a public type
or exported constant requires a major version bump. Patch and minor releases
add only new variants, new constants, or documentation fixes.
Usage
use vyre_spec::{AlgebraicLaw, DataType, OpSignature};
let sig = OpSignature {
inputs: vec![DataType::U32, DataType::U32],
output: DataType::U32,
};
let law = AlgebraicLaw::Commutative;
assert_eq!(sig.output, DataType::U32);
See also
vyre(the compiler) — https://crates.io/crates/vyrevyre-conform(the immune system) — https://crates.io/crates/vyre-conform- Book: the vyre book at https://github.com/santhsecurity/vyre
License
MIT OR Apache-2.0
Dependencies
~0.2–0.8MB
~18K SLoC