Skip to main content

write_bytecode

Function write_bytecode 

Source
pub fn write_bytecode(
    bytecode: &Bytecode,
    strip_debug: bool,
) -> Result<Vec<u8>, SnapshotWriteError>
Expand description

Serialize bytecode into the .mbc container. With strip_debug the debug section is omitted entirely (flags bit 0 cleared).

Output is deterministic: function_debug_info entries are written in ascending constant-index order.