pub fn prepare_globals(
    builtins: Vec<(&'static str, Value)>,
    src_builtins: Vec<(&'static str, &'static str)>,
    source: SourceCode,
    enable_import: bool
) -> Rc<HashMap<&'static str, Value>>
Expand description

Prepare the full set of globals available in evaluated code. These are constructed from the set of builtins supplied by the caller, which are made available globally under the builtins identifier.

A subset of builtins (specified by GLOBAL_BUILTINS) is available globally iff they are set.

Optionally adds the import feature if desired by the caller.