Expand description
§chipi-core
Core library for the chipi instruction decoder generator.
§Crate structure
parser: parses.chipiinstruction-spec files into a raw AST. Seetypes::DecoderDef.validate: validates and lowers the AST into a language-agnostic IR. Seetypes::ValidatedDef.tree: builds an optimal decision tree for instruction dispatch.backend: language-specific code generation backends.config: internal generation and dispatch config types.codegen: Rust decoder/disassembler code generation.lut_gen: Rust emulator dispatch LUT generation.instr_gen: Rust instruction newtype generation.bindings: parser and lowerer for*.bindings.chipiconfigs.
Re-exports§
pub use config::Dispatch;
Modules§
- backend
- Code generation backends.
- bindings
*.bindings.chipiconfiguration format.- codegen
- Rust code generation from validated definitions and decision trees.
- codegen_
binja - Binary Ninja Architecture plugin code generation.
- codegen_
cpp - C++ code generation from validated definitions and decision trees.
- codegen_
ida - IDA Pro processor module code generation.
- codegen_
python - Shared Python code generation helpers.
- config
- Internal configuration types consumed by the code generation pipeline.
- error
- Error types and reporting for parsing and validation.
- format_
parser - Character-level parser for format string internals.
- instr_
gen - Instruction type generation - produces a newtype with field accessor methods.
- lut_gen
- Function-pointer LUT generation. Consumes a validated definition and a dispatch tree.
- parser
- DSL parsing for instruction definitions.
- tree
- Decision tree construction for optimal instruction dispatch.
- types
- Core type definitions for the intermediate representation.
- validate
- Semantic validation for instruction definitions.
Functions§
- generate_
from_ str - Parse source text and generate Rust decoder code.
Returns the generated Rust code as a
String. - parse
- Parse a
.chipifile from a file path and return the decoder definition. - parse_
str - Parse source text directly without reading from a file.