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 main parser-authoring workflow:
#[derive(vihaco_parser::Parse)]on the instruction enum, the head/token/delimiters/parse_with attributes, and theParsetrait fromvihaco-parser-core.- Advanced Parser Customization
Module-level orchestration: device headers, the
ParsedModuletwo-pass design,Resolveimpls, sugar expansion, string interning, and label resolution.
- Advanced Parser Customization
Module-level orchestration: device headers, the
- 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.