Skip to main content

build_engine

Function build_engine 

Source
pub fn build_engine(ctx: String) -> (Engine, Scope<'static>)
Expand description

Build a Rhai engine with all RLM context functions registered.

The ctx string is stored as a Rhai variable in the returned Scope. Registered functions operate on a thread-local copy of the context so Rhai closures can call them without borrowing issues.