Guides
These guides explain how to build on top of vihaco: how to define an
instruction set, parse source text into it, resolve execution input, execute
components, observe their effects, and compose everything into a machine.
For the type-by-type API reference, see the generated rustdoc.
Recommended reading order
- Defining Instructions With
vihacoStart with instruction enums and width inference.- Advanced Instruction Usage Explicit opcodes, explicit widths, and machine-level wrapper instructions.
- Parser Integration for Component Instructions
The
Parsetrait and the legacy parser attributes retained for existing instruction enums.- Pattern Parser Generator The recommended parser-authoring workflow for new syntax: declarative, compile-time-checked patterns for instruction, value, and type enums and structs.
- Advanced Parser Customization
Module-level orchestration: device headers, the
ParsedModuletwo-pass design,Resolveimpls, sugar expansion, string interning, and label resolution.
- Using Messages With
vihacoHow a runtime resolves execution input and supplies messages to components. - Building Components With
vihacoConnect instructions, messages, effects, and#[component(...)]. - Observing Effects With
#[observe]How#[observe]works — on standalone observers and on components that also react to effects. - Defining A Composite With
vihacoCompose components and observers with the transitional#[composite]wiring.