Async-Flow
"Τὰ πάντα ῥεῖ καὶ οὐδὲν μένει" — Heraclitus
Async abstractions for flow-based programming (FBP) in Rust. This crate can be used to implement dataflow systems consisting of interconnected blocks that process arbitrary messages.
[!TIP] 🚧 We are building in public. This is presently under heavy construction.
[Features] | [Prerequisites] | [Installation] | [Examples] | [Reference] | [Development]
✨ Features
- Provides primitives for flow-based programming (FBP) based on Tokio.
- Constructs dataflow systems by connecting reusable components called blocks.
- Compatible with the inventory of blocks provided by the Flows.rs project.
- Supports opting out of any feature using comprehensive feature flags.
- Adheres to the Rust API Guidelines in its naming conventions.
- No licensing headaches: 100% free and unencumbered public domain software.
🛠️ Prerequisites
- Rust 1.85+ (2024 edition)
⬇️ Installation
Installation via Cargo
👉 Examples
Importing the Library
use *;
Implementing Blocks
Implementing a split_string block
use ;
/// A block that splits input strings based on a delimiter.
async
Implementing an add_ints block
use ;
/// A block that outputs the sums of input numbers.
async
📚 Reference
Glossary
-
System: A collection of blocks that are connected together. Systems are the top-level entities in dataflow programs.
-
Block: An encapsulated system component that processes messages. Blocks are the autonomous units of computation in a system.
-
Port: A named connection point on a block that sends or receives messages. Ports are the only interfaces through which blocks communicate with each other.
-
Message: A unit of data that flows between blocks in a system, from port to port. Any Rust type that implements the
Send + Sync + 'statictraits can be used as a message.
👨💻 Development