Skip to main content

run_jit

Function run_jit 

Source
pub fn run_jit(
    source: &str,
    source_dir: Option<PathBuf>,
    file: Option<&str>,
) -> Result<(), String>
Expand description

Run concatenated source on the Cranelift JIT backend, resolving use imports against source_dir. This is the interpreter-free entry point for embedders (e.g. the game launcher). Cranelift-skipped oversized functions still execute through the primed fallback interpreter, so behaviour matches the tree-walker. A program with no entry, a parse error, or a pre-execution codegen failure falls back to run_named; a mid-run failure is returned as a rendered diagnostic without retrying (output may already be on screen).