Skip to main content

emit

Function emit 

Source
pub fn emit(program: &Program) -> Result<StoryData, CodegenError>
Expand description

Compile a resolved LIR Program into StoryData for the runtime.

Returns Err(CodegenError) only for a defect in the LIR itself โ€” see CodegenError. A well-formed Program (the only kind brink-ir::lir::lower ever hands back) always succeeds.

Equivalent to emit_with_options with EmitOptions::default() โ€” emit_debug_info: false, reproducing every byte this function has ever emitted (the D6 byte-identical guarantee, docs/debugger-spec.md ยง1.2).