tramli
Constrained flow engine for Rust. State machines that prevent invalid transitions at build time.
Features
- Build-time validation — reachability, DAG check, requires/produces data-flow analysis
- Zero external dependencies
- Intentionally synchronous — state transitions take microseconds; async I/O happens outside the engine
- Type-safe context —
FlowContextstores data keyed byTypeIdwith compile-time safety - Data-flow graph — automatic data dependency analysis via
def.data_flow_graph() - Mermaid generation — state diagram + data-flow diagram from code
Quick start
use TypeId;
use Arc;
use Duration;
use *;
// Define a processor
;
// Build and run
let def = new;
let mut engine = new;
let flow_id = engine.start_flow.unwrap;
Design
- Sync core with external async wrapper pattern (see
docs/async-integration.md) - Part of the tramli multi-language flow engine family (Java, TypeScript, Rust)
License
MIT