Expand description
Lua bridge — parses Lua-authored BluePrints (a Lua-table
representation of mlua_flow_ir::Node) into a Rust Node, plus the
initial ctx when the Lua source also builds one.
This module is parse-only. Execution goes through
crate::service::TaskLaunchService (compile, service::linker::link,
Engine::dispatch_attempt_with), not through this bridge — the
one-shot glue that used to live here (build a throwaway mlua::Lua,
parse, then drive the result straight through an EngineDispatcher)
was retired once TaskLaunchService became the sole production entry
point.
mlua-flow-ir also ships a sync path (flow.eval) that lets a
dispatcher be written on the Lua side, but engine-async ↔ sync
impedance forces a block_on there. That would violate our
discipline, so we do not use it.
Functions§
- parse_
lua_ blueprint - Load a Lua source, evaluate it, and pull out a BluePrint
Node(mlua_flow_ir::Node). The Lua source must ultimatelyreturna table — one that follows the flow.ir schema. - parse_
lua_ blueprint_ with_ ctx - Load a Lua source, and also build the initial
ctx(a Lua table) on the Lua side and convert it to a JSONValue. Returns(BluePrint, initial ctx). The Lua source is expected to return a table of the formreturn { bp = ..., ctx = ... }.