Bytecode as Rust enums
#[derive(Instruction)] turns an enum into an opcode
set with inferred (or fixed) encoding width. Nest enums to compose
several component instruction families under one machine type.
Execute, then observe
Components consume a resolved Message and return typed
Effects. Observers react to those effects with
#[observe], keeping execution and delivery cleanly
separated.
From source text to module
#[derive(Parse)] generates a
chumsky parser for
your instruction syntax; a two-pass resolver expands sugar, interns
strings, and resolves labels into a runtime module.
§Install
vihaco is a Cargo workspace of focused crates. vihaco is
the foundation — add the others as your project needs them. There is no
umbrella crate and no published release yet, so depend on the git repo:
[dependencies]
vihaco = { git = "https://github.com/QuEraComputing/vihaco" }
vihaco-cpu = { git = "https://github.com/QuEraComputing/vihaco" } # optional: a ready-made CPU component
vihaco-parser = { git = "https://github.com/QuEraComputing/vihaco" } # optional: #[derive(Parse)] for source text Requires Rust edition 2024.
Continue to the Quick Start →Continue to the Quick Start, work through the Guides, or browse the API Reference.