Skip to main content

install

Function install 

Source
pub fn install(interp: &mut Interpreter<ScriptCtx>)
Expand description

Install (require PATH) on the given interpreter. Because require has to re-enter evaluation on the same interpreter, we capture an Arc<Mutex<Interpreter>> (or equivalent) via a closure — but since Interpreter<H> is not Send+Sync, we instead install a stub here and let main.rs override it with the real function after the interpreter is constructed.

This stub exists so install_stdlib can be called without a ready interpreter-to-self reference; scripts get a clear error if they call (require) without the real binding having been patched in.