Skip to main content

Instruction

Derive Macro Instruction 

#[derive(Instruction)]
{
    // Attributes available to this derive:
    #[instruction]
    #[opcode]
    #[vihaco]
}
Expand description

Derive the bytecode-instruction traits (OpCode, FromBytesWithOpcode, WriteBytes) for an instruction enum.

Generated code is rooted at whichever crate the consumer actually depends on (vihaco facade or vihaco-abi directly), resolved at expansion time. Override with #[vihaco(crate = ::some::path)] on the deriving type.