include_nasm_bin!() { /* proc-macro */ }
Expand description
Assembles a file with NASM into raw binary and includes the output as a reference to a byte array.
The file is located relative to the current file (similarly to how modules
are found). This macro will yield an expression of type &'static [u8; N]
which is the contents of the assembled file.
Dependencies
This macro requires NASM to be installed.
Examples
ⓘ
let boot_code = include_nasm_bin!("boot.asm");