Expand description
Arb’s computational substrate: arithmetic expressions are compiled to a
fusevm::Chunk and executed on the fusevm VM (Cranelift JIT for hot chunks).
This is what “arb runs on fusevm” means concretely — every computed value in
a spec flows through fusevm bytecode, not a bespoke evaluator.
x is the pipeline input scalar; a bareword identifier (amount, latency)
is a field of the current record, resolved by the caller’s closure. Both are
baked into the chunk as constants per evaluation, so no VM slot state is
assumed across run().
Comparisons (== != < <= > >=) lower to fusevm’s Num* ops and yield a
boolean; eval_pred reads the result via Value::is_truthy for where.
Enums§
Functions§
- eval
- Evaluate as a number with no field resolver (field refs -> NaN).
- eval_
ctx - Lower
eto a fusevm chunk (withxand resolved fields baked in), run it on the VM, and return the resulting number.resolvemaps a field name to its numeric value. - eval_
pred - Evaluate as a predicate with no field resolver.
- eval_
pred_ ctx - Evaluate
eas a predicate — compiled to fusevm, run on the VM, read as a boolean viaValue::is_truthy.resolvemaps a field name to its value. - parse
- Parse an expression: numbers,
x,+ - * / %, comparisons (== != < <= > >=), unary-, and parentheses.