Skip to main content

parse_lua_blueprint_with_ctx

Function parse_lua_blueprint_with_ctx 

Source
pub fn parse_lua_blueprint_with_ctx(
    lua_src: &str,
) -> Result<(Node, Value), EngineError>
Expand description

Load a Lua source, and also build the initial ctx (a Lua table) on the Lua side and convert it to a JSON Value. Returns (BluePrint, initial ctx). The Lua source is expected to return a table of the form return { bp = ..., ctx = ... }.