A powerful, actor-based workflow execution engine built in Rust
π Documentation | π Quick Start | π‘ Examples | π§ API Reference
Reflow is a modular, high-performance workflow execution engine that uses the actor model for concurrent, message-passing computation. It enables you to build complex data processing pipelines, real-time systems, and distributed workflows with multi-language scripting support and cross-platform deployment.
π Actor-Based Architecture - Isolated, concurrent actors communicate via message passing
π Multi-Language Support - JavaScript (Deno), Python, and WebAssembly runtimes
π Visual Workflows - Graph-based workflow representation with history and undo
β‘ High Performance - Rust-powered execution with zero-copy optimizations
π Cross-Platform - Native execution + WebAssembly for browsers
π Real-Time Processing - Built-in networking, WebSockets, and live data streams
π¦ Extensible - Rich component library + custom component creation
π οΈ Developer Friendly - Hot reloading, debugging tools, and comprehensive APIs
# Install Rust (if not already installed)
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
# Clone and build Reflow
git clone https://github.com/reflow-project/reflow.git
cd reflow
cargo build --releaseuse reflow_network::{Graph, Network};
use reflow_components::prelude::*;
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
// Create a new graph
let mut graph = Graph::new("MyWorkflow", true, HashMap::new());
// Add actors to the graph
graph.add_node("source", "DataSource", json!({
"data": [1, 2, 3, 4, 5]
}));
graph.add_node("processor", "MapActor", json!({
"function": "x => x * 2"
}));
graph.add_node("sink", "Logger", json!({}));
// Connect the actors
graph.add_connection("source", "output", "processor", "input", json!({}));
graph.add_connection("processor", "output", "sink", "input", json!({}));
// Execute the workflow
let network = Network::from_graph(graph).await?;
network.execute().await?;
Ok(())
}Output:
[INFO] sink: 2
[INFO] sink: 4
[INFO] sink: 6
[INFO] sink: 8
[INFO] sink: 10
Reflow's architecture is built around three core concepts:
βββββββββββββββββββ Messages βββββββββββββββββββ Messages βββββββββββββββββββ
β Actor A ββββββββββββββββββΆβ Actor B ββββββββββββββββββΆβ Actor C β
β (JavaScript) β β (Python) β β (Rust) β
β β β β β β
β βββββββββββββββ β β βββββββββββββββ β β βββββββββββββββ β
β βInput Ports β β β βInput Ports β β β βInput Ports β β
β βOutput Ports β β β βOutput Ports β β β βOutput Ports β β
β βββββββββββββββ β β βββββββββββββββ β β βββββββββββββββ β
βββββββββββββββββββ βββββββββββββββββββ βββββββββββββββββββ
- Actors: Isolated units of computation that process messages
- Messages: Strongly-typed data passed between actors
- Graphs: Visual representation of actor connections and data flow
This workspace contains multiple crates that work together:
reflow_network- Core actor runtime and message routingreflow_components- Standard library of reusable actorsactor_macro- Procedural macros for actor creation
reflow_js- JavaScript/Deno runtime integrationreflow_py- Python runtime integrationreflow_wasm- WebAssembly runtime and browser support
reflow_script- Multi-language script executionreflow_server- HTTP server and API endpoints
examples/- Working examples and tutorialsdocs/- Comprehensive documentation
// ETL pipeline with error handling
source β validate β transform β load β audit// Live data processing
websocket β parse β aggregate β alert β dashboard// Sensor data workflow
mqtt β decode β filter β analyze β store β notify// Audio/video pipeline
upload β decode β process β encode β publishExplore working examples in the examples/ directory:
Demonstrates how to create and deploy actors as WebAssembly modules.
# Clone the repository
git clone https://github.com/reflow-project/reflow.git
cd reflow
# Build all crates
cargo build
# Run tests
cargo test
# Build with optimizations
cargo build --release# Install wasm-pack
curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh
# Build WebAssembly package
cd crates/reflow_network
wasm-pack build --target web# Install development dependencies
cargo install cargo-watch
cargo install flamegraph
# Run with hot reloading
cargo watch -x run
# Performance profiling
cargo flamegraph --bin reflow-exampleReflow is designed for high-performance execution:
- Zero-copy message passing where possible
- Parallel actor execution with work-stealing schedulers
- Memory pooling for frequently allocated objects
- SIMD optimizations for numeric processing
- Async I/O throughout the system
Benchmark results on modern hardware:
- 1M+ messages/second processing throughput
- Sub-millisecond actor-to-actor latency
- Linear scaling with CPU core count
We welcome contributions! Please see our Contributing Guide for details.
- π Bug Reports - Found an issue? Let us know!
- π Documentation - Help improve our guides and examples
- π Components - Build reusable actors for the community
- π Language Bindings - Add support for more runtimes
- β‘ Performance - Optimization opportunities
- π§ͺ Testing - Expand our test coverage
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Make your changes and add tests
- Ensure all tests pass (
cargo test) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
- GitHub Discussions - Ask questions and share ideas
This project is licensed under the MIT License - see the LICENSE file for details.
Built with β€οΈ using:
- Rust - Systems programming language
- Tokio - Asynchronous runtime
- Deno - JavaScript/TypeScript runtime
- WebAssembly - Portable binary format
β Star us on GitHub if you find Reflow useful! β