Skip to main content

aot_load_bundle

Function aot_load_bundle 

Source
pub fn aot_load_bundle(
    source: &str,
    cache_dir: &Path,
) -> Vec<(String, Box<dyn NativeFn>)>
Expand description

Load every native-annotated function in source as a compiled-native crate::vm::NativeFn (HOTSWAP §Axis-3): the run path installs these via Vm::install_aot_native, so an annotated function dispatches to rustc -O3 machine code from its first call. Uses the persistent cache, so a bundle pre-built by largo build --native-functions is a cache hit — no rustc on the run path. A function outside the scalar subset / failing to build is skipped (stays on VM+JIT).