| Crates.io | streamweave |
| lib.rs | streamweave |
| version | 0.8.3 |
| created_at | 2025-11-29 15:13:47.553078+00 |
| updated_at | 2026-01-12 06:23:33.963147+00 |
| description | Composable, async, stream-first computation in pure Rust |
| homepage | https://github.com/Industrial/streamweave |
| repository | https://github.com/Industrial/streamweave |
| max_upload_size | |
| id | 1956843 |
| size | 4,959,890 |
Composable, async, stream-first computation in pure Rust
Build fully composable, async data pipelines using a fluent API.
StreamWeave is a general-purpose Rust framework built around the concept of streaming data, with a focus on simplicity, composability, and performance.
High-Performance Streaming: Process 2-6 million messages per second with in-process zero-copy execution. Perfect for high-throughput data processing pipelines.
futures::StreamStreamWeave breaks computation into three primary building blocks:
| Component | Description |
|---|---|
| Producer | Starts a stream of data |
| Transformer | Transforms stream items (e.g., map/filter) |
| Consumer | Consumes the stream, e.g. writing, logging |
All components can be chained together fluently. These components can be used in both the Pipeline API (for simple linear flows) and the Graph API (for complex topologies with fan-in/fan-out patterns).
StreamWeave provides two APIs for building data processing workflows:
| Feature | Pipeline API | Graph API |
|---|---|---|
| Use Case | Simple linear flows | Complex topologies |
| Topology | Single path: Producer → Transformer → Consumer | Multiple paths, fan-in/fan-out |
| Routing | Sequential processing | Configurable routing strategies |
| Complexity | Lower complexity, easier to use | Higher flexibility, more powerful |
| Best For | ETL pipelines, simple transformations | Complex workflows, parallel processing, data distribution |
Add StreamWeave to your Cargo.toml:
[dependencies]
streamweave = "0.8.0"
use streamweave::PipelineBuilder;
use streamweave_array::ArrayProducer;
use streamweave_transformers::MapTransformer;
use streamweave_vec::VecConsumer;
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
let pipeline = PipelineBuilder::new()
.producer(ArrayProducer::new(vec![1, 2, 3, 4, 5]))
.transformer(MapTransformer::new(|x: i32| x * 2))
.consumer(VecConsumer::new());
let ((), result) = pipeline.run().await?;
println!("Result: {:?}", result.collected);
Ok(())
}
For more examples and detailed documentation, see the package documentation below.
StreamWeave is organized as a monorepo with 39 packages, each providing specific functionality. Each package has its own README with detailed documentation, examples, and API reference.
These are the foundational packages that other packages depend on:
Core system functionality:
Standard I/O and file system operations:
Data format parsing and serialization:
Database integration:
Network protocol integration:
Various data source and sink implementations:
Comprehensive transformer implementations:
Observability and integration capabilities:
./bin/docs)StreamWeave includes comprehensive examples demonstrating all major features. See the examples directory for:
Run any example with:
cargo run --example <example_name> --features <required_features>
Contributions are welcome! Please see our Contributing Guide for details.
This project is licensed under the Creative Commons Attribution-ShareAlike 4.0 International License.
See [LICENSE](LICENSE) for details.