Skip to main content

reload_script

Function reload_script 

Source
pub fn reload_script<H: ScriptHost + Resource<Mutability = Mutable>>(
    world: &mut World,
    source: &str,
    uri: &str,
    map: &SourceMap,
) -> Option<Result<(), ScriptError>>
Expand description

Hot-reload orchestration entry: swap the loaded program on the live host resource via ScriptHost::replace (compile-first, atomic, full rollback on eval failure - the host owns the atomicity). Returns None when no host is installed (script-less app).