Expand description
VM-only Hara execution surface.
This crate intentionally exposes artifact verification, preparation and execution, but no source or HALC compiler entry points.
Modules§
- disassemble
- Deterministic human-readable disassembler. Used in tests and in benchmark diagnostics.
- validate
- Program validation: one abstract-interpretation pass over the code vector before any execution. After validation the machine indexes without re-checking, and malformed programs never reach a panic.
Structs§
- Function
Prototype - A compiled function. The entry function has arity and capture count 0;
fn/defnforms contribute the remaining prototypes. - Machine
- A synchronous interpreter for one function of a validated
Program. - Prepared
Call - A stable global function cell plus a validated argument-call stub.
- Program
- A compiled program: a constant pool plus function prototypes.
- Validation
Error - A program rejected by the validator before execution.
- VmError
- A runtime failure with the failing instruction and its source position.
- VmFiber
- Host-independent lifetime for resumable bytecode execution. The machine owns every frame, local, operand and handler needed to continue.
Enums§
- Instruction
- One VM instruction.
- Value
- VmFiber
State - VmOutcome
- Terminal state of a machine run. Suspension variants belong to the later async milestone; adding them does not change instruction dispatch, only the set of exit points.
Functions§
- decode_
program - Decodes, authenticates, and validates a persistent VM program.
- disassemble
- Renders a program with instruction offsets, operands, constant previews, jump destinations, and source positions where available.
- execute
- execute_
program - Executes a validated program’s entry function.
- execute_
program_ with_ globals - Executes a program against a caller’s namespace registry: globals intern into it and resolve from it, with no env bridge, snapshot, or refresh (issue #223).
- load
- prepare_
call - Resolves a callable Var once and prepares a validated direct-argument stub.
- validate
- Validates a whole program. See
notes/rust-bytecode-vm.md§9 for the rule list.
Type Aliases§
- Function
Id - Index of a function prototype inside
Program::functions.