pub fn process_instruction_macros() -> Result<()>Expand description
Processes all instruction macros in the crate when called from build.rs.
Items annotated with #[instruction] or #[instruction_execution] are found anywhere in the
crate’s Rust files, including inline modules and function bodies, and attributes may be
path-qualified like #[ab_riscv_macros::instruction]. Attributes are recognized by the last
segment of their path in the source code, there is no name resolution.
§Limitations
The following usages are skipped silently, and the corresponding macro then fails to include a file that was never generated:
- renamed imports of the macros, like
#[foo]afteruse ab_riscv_macros::instruction as foo; - items inside macro invocations (like
macro_rules!or a function-like macro call), whose contents are not parsed - attributes produced by other macros (like
cfg_attr) - files where no such attribute is written at the start of a line (indentation is fine)