Expand description
flow.ir async runtime + mlua binding.
Layer 3 of the 4-layer flow.ir stack:
flow-ir-lua— Pure Lua DSL (separate repo, ecosystem-neutral)flow-ir-core— Pure Rust schema + sync interpreter (no mlua, no async)mlua-flow-ir— this crate: re-export offlow-ir-core+AsyncDispatcher+eval_async+fanout_eval+ Luamodule()bindingmlua-swarm-engine— host concerns (Spawner / Worker / Loop / AuthzPolicy / cp_state persist)
All schema types (Node / Expr / JoinMode / EvalError / Dispatcher)
are re-exported verbatim from flow-ir-core so callers can keep a single
import path:
use mlua_flow_ir::{eval, eval_async, AsyncDispatcher, Dispatcher, EvalError, Expr, Node};Enums§
- Eval
Error - Evaluation error.
- Expr
- flow.ir Expr op.
- Join
Mode - Fanout join semantics (Promise / futures combinators).
- Node
- flow.ir Node kind.
Traits§
- Async
Dispatcher - Async dispatcher trait — async 版
Dispatcher。 - Dispatcher
- Dispatcher callback: resolves a
Step.refagainst the provided input, returns the step’s raw output value.
Functions§
- eval
- Evaluate a
Nodeagainst a context value, using the given dispatcher forStepresolution. - eval_
async - Evaluate a
Nodeagainst a context value asynchronously, using the given async dispatcher forStepresolution. - eval_
expr - Evaluate an
Expragainst a context value, returning the resolved JSON value. - is_
truthy - JSON value の truthy 判定 (= flow.ir Branch cond / Loop cond で使う)。 Bool は値そのまま、 null/false 以外は truthy (Lua / JS と整合)。
- module
- Register the flow module table with Lua.
- read_
path - Read a path from a JSON value. Supports simple
$.a.b.cform. - write_
path - Write a value at the path location inside ctx, returning the updated ctx.
outmust be aPathExpr.