pub struct LutTarget {
pub input: String,
pub output: String,
pub handler_mod: String,
pub ctx_type: String,
pub dispatch: Dispatch,
pub groups: HashMap<String, Vec<String>>,
pub lut_mod: Option<String>,
pub instr_type: Option<String>,
pub raw_expr: Option<String>,
pub instr_type_output: Option<String>,
pub subdecoder_groups: HashMap<String, HashMap<String, Vec<String>>>,
}Expand description
A single emulator dispatch LUT generation target.
Fields§
§input: StringPath to the input .chipi file.
Supports $VAR expansion and relative paths (resolved from the TOML file’s directory).
output: StringOutput file path for the LUT dispatch code.
Supports $VAR expansion (e.g. $OUT_DIR/lut.rs).
handler_mod: StringRust module path where handler functions live.
ctx_type: StringMutable context type passed to every handler.
dispatch: DispatchDispatch strategy.
groups: HashMap<String, Vec<String>>Instruction groups: group name -> list of instruction names. Instructions in a group share one const-generic handler function.
lut_mod: Option<String>Rust module path where the generated OP_* constants live. Required when using groups so stubs can import the constants.
instr_type: Option<String>Override the type of the second handler parameter (default: width-derived u8/u16/u32).
Set to a wrapper type like "crate::cpu::Instruction".
raw_expr: Option<String>Expression to extract the raw integer from the instr local.
Default: "instr.0" when instr_type is set, "opcode" otherwise.
instr_type_output: Option<String>Output file path for the instruction newtype with field accessors.
Supports $VAR expansion.
If set, generates a pub struct Name(pub u32) with accessor methods.
subdecoder_groups: HashMap<String, HashMap<String, Vec<String>>>Sub-decoder groups: sub-decoder name -> { group name -> [instruction names] }.
Instructions in a group share one const-generic handler function.
If a sub-decoder is listed here, a dispatch_{snake_name} function is generated.