Round Pipers
A high-performance Rust library for streaming data processing with circular buffers and read-only pipes. Designed for simple developers who want to process data without dealing with complex Rust concepts.
Note there was definitely a lot of AI assistance to produce this. A human artisinally crafted by hand most of the core circular buffer code, and the streaming piping system (src/rw_pipe.rs), but a lot of the boiler plate where it's managing traits, and extracting common functionality around safe code has been guided by human hands but mostly written by various AI agent systems (goose + anthropic, goose + chat gpt, and claude code)
Circular Buffer Pipes (Streaming Data)
use Pipe;
use Arc;
// Create a pipe for streaming f64 values
let pipe = new;
let writer = pipe.clone.get_writer?;
let reader = pipe.clone.get_reader;
// Write data
writer.write?;
// Read data with iterator - no lifetime management needed
for chunk_result in reader.iter_chunks
Read-Only Pipes (Pre-populated Data)
use ReadOnlyPipe;
// Super simple API - just pass your slice
let data = vec!;
let pipe = new?;
let reader = pipe.get_reader;
// Same API as regular pipes - no learning curve
for chunk_result in reader.iter_chunks
Key Features
- Zero-copy data processing with
ndarrayintegration - Thread-safe multiple readers, single writer model
- RAII memory management with automatic pointer advancement
- Unified API across all pipe types
- High-performance circular buffers using Linux
memfd - Multi-dimensional data support for complex shapes
- Sliding window processing with configurable read/consume patterns
Pipe Types
- Circular Buffer Pipes: High-performance streaming with shared memory
- Read-Only Pipes: Zero-copy access to existing data slices
- Write-Only Pipes: Efficient buffer filling and streaming output
Examples
Run the included examples:
# Audio processing pipeline
Requirements
- Linux (uses
memfd_createandmmap)
Design Philosophy
Built for high-performance (zero-copy) streaming data with the goal of minimizing encounters with complex Rust concepts. The API prioritizes ease of use while maintaining zero-copy performance.