mlua-flow-ir
flow.ir async runtime + mlua binding. Layer 3 of the 4-layer flow.ir stack.
Re-exports the Pure Rust core (flow-ir-core) and adds AsyncDispatcher + eval_async (including Fanout join-mode support) + Lua module() binding.
Stack position
flow-ir-lua— Pure Lua DSL (separate repo, ecosystem-neutral)flow-ir-core— Pure Rust schema + sync interpretermlua-flow-ir— this crate: async runtime + mlua bindingmlua-swarm-engine— host concerns (Spawner / Worker / Loop / AuthzPolicy / cp_state persist)
What's in
- All
flow-ir-coreschema types re-exported verbatim (Node/Expr/Dispatcher/EvalError/ …) AsyncDispatchertrait +eval_asyncfor tokio / async-runtime hostsFanoutparallelStepdispatch (All/Any/Race/AllSettledjoin modes) viaeval_asyncmodule(lua)binding that registersflow.evalinto a Lua state
Quick start (sync)
use ;
use ;
let node: Node = from_value.unwrap;
;
let result = eval.unwrap;
assert_eq!;
Async dispatch
use ;
use async_trait;
use Value;
;
Feature flags
| Feature | Default | Meaning |
|---|---|---|
lua51 / lua52 / lua53 / lua54 / luajit / luau |
lua54 on |
Lua version selection, forwarded to mlua. Exactly one must be enabled when the Lua binding (module()) is used — mlua itself enforces this. |
vendored |
on | Links a bundled Lua built from source instead of a system Lua. |
Default = lua54 + vendored, matching every existing consumer.
- Different Lua version:
default-features = false, features = ["luajit", "vendored"] - System Lua instead of vendored: drop
vendoredfrom the feature list - Async-only, no Lua binding:
default-features = false—mluais not compiled in andmodule()is unavailable
License
MIT OR Apache-2.0