Expand description
Proc macro crate for the UOR Foundation.
Provides the uor! macro (since v0.2.0) and the v0.2.1 ergonomics
macros: uor_ground!, #[derive(ConstrainedType)], #[derive(CompileUnit)],
and the #[uor_grounded] attribute. The v0.2.1 macros wire downstream code
into the foundation’s sealed-constructor minting path so the consumer-facing
one-liners in uor_foundation::enforcement::prelude work end-to-end at
compile time.
§Usage
ⓘ
use uor_foundation::uor;
// Type declaration (named-argument constraint syntax)
let pixel = uor! { type Pixel { ResidueConstraint(modulus: 256, residue: 255); } };
// Term expression
let sum = uor! { add(mul(3, 5), 7) };
// Assertion (ground — checked at compile time)
uor! { assert add(1, 2) = 3; };Macros§
- uor
- The UOR term language DSL macro.
- uor_
ground - The v0.2.1 ground-state DSL macro.
Attribute Macros§
- uor_
grounded - Attribute marker asserting that the function body lowers cleanly at the named Witt level.
Derive Macros§
- Compile
Unit - Derive
CompileUnitfor a struct whose fields name the v0.2.1 builder inputs (builder_root_term,builder_witt_level_ceiling,builder_thermodynamic_budget,builder_target_domains). - Constrained
Type - Derive
ConstrainedTypefor a struct.