asm_array!() { /* proc-macro */ }Expand description
Assemble source text at compile time, producing a fixed-size array [u8; N].
Unlike asm_bytes! which returns &'static [u8], this macro returns a
[u8; N] value that can be used where a fixed-size array is needed.
§Syntax
ⓘ
asm_array!(ARCH, "assembly source")§Examples
ⓘ
use asm_rs_macros::asm_array;
const NOP: [u8; 1] = asm_array!(x86_64, "nop");
const RET: [u8; 1] = asm_array!(x86_64, "ret");