Skip to main content

compile_app

Function compile_app 

Source
pub fn compile_app(
    name: &str,
    program: &Program,
    locate: &dyn Fn(Span) -> SourceLocation,
) -> Result<Vec<u8>, CodegenError>
Expand description

Compiles program to an object file whose main runs it, with locate saying where each span is, for the errors the app may report.

§Errors

When the program has errors, or Cranelift can’t compile it for this system.