Flume

A safe, blazingly fast multi-producer, multi-consumer channel for Rust

Library
Cargo
v0.12.0
3,063stars
MIT OR Apache-2.0

Repository Health

Pre-computed score based on development activity, maintenance, community, maturity, and trend momentum.How we score it →
55/100Fair
Development Activity56
Maintenance12
Community52
Maturity60
Momentum40

Technical Analysis

AI-assessed by reading the actual repository — architecture, code quality, innovation, and documentation.How we score it →
78/100Good
Architecture80
Code Quality82
Innovation76
Learning Curve75

Flume is a Rust channel library offering a drop-in, ergonomic alternative to std::sync::mpsc with true multi-producer, multi-consumer (MPMC) semantics. It supports unbounded, bounded, and rendezvous queues, is implemented with zero unsafe code, and works across both synchronous threads and async runtimes.

Benchmarks consistently show flume outperforming the standard library’s channel and, in many workloads, crossbeam-channel as well, while keeping its dependency footprint and compile times minimal. A select!-like macro lets code wait on multiple channels at once, and senders/receivers are Clone + Send + Sync for flexible fan-in/fan-out patterns.

What You Get

  • Unbounded, bounded, and rendezvous channel variants behind one consistent API
  • Zero unsafe code in the core implementation, verified by the crate’s own claims and structure
  • Native async support (futures-sink/futures-core) so the same channel works in sync threads and async tasks
  • A select!-style macro (select feature) for waiting on multiple channels simultaneously
  • Cloneable, Send + Sync Sender and Receiver handles for straightforward fan-in/fan-out concurrency patterns
  • An eventual-fairness feature for randomized selection among ready channels to avoid starvation

Common Use Cases

  • Worker pool fan-in - multiple producer threads send results to a single consumer that aggregates them
  • Async task coordination - bridge sync producer threads with an async consumer task (or vice versa) without manual signaling
  • Drop-in std::sync::mpsc replacement - swap in flume for existing std::sync::mpsc code to get MPMC support and better throughput
  • Event/command buses - use select! across several channels to implement a simple actor-style event loop

Under The Hood

Architecture - Flume centers on a shared internal queue guarded by an efficient signaling mechanism (src/signal.rs) that can wake either a parked OS thread or a polled async task, letting src/lib.rs expose a single Sender/Receiver API that works transparently across sync and async contexts; src/async.rs implements the Sink/Stream adapters, and src/select.rs implements the multi-channel select! macro used to wait on several receivers/senders at once.

Tech Stack - Pure Rust (2018 edition, MSRV 1.78), with a deliberately small dependency set: spin for an optional spinlock mode, and optional futures-sink/futures-core/fastrand gated behind the async, select, and eventual-fairness Cargo features respectively, keeping the default build lean and fast to compile.

Code Quality - The tests/ directory contains focused integration tests per behavior (mpsc.rs, async.rs, select.rs, same_channel.rs, zero.rs, golang.rs for Go-channel-style semantics), and benches/ includes Criterion-based benchmarks comparing against std::sync::mpsc and crossbeam-channel; the README explicitly advertises ‘no unsafe code anywhere in the codebase,’ a strong safety signal for a low-level concurrency primitive.

API Design - The public surface mirrors std::sync::mpsc closely (unbounded(), bounded(n), .send(), .recv(), .iter()) so existing code can often switch to flume with minimal changes, while adding async variants (.send_async(), .recv_async()) and a select! macro for more advanced coordination — a design that trades a slightly larger API surface for meaningfully more capability than the standard library channel.

Used by 5 apps in this directory

TypeScript
55%
Other

Cap

Team Chat · Video Conferencing

20,986

Open source Loom alternative with GPU-accelerated recording, instant share links, AI summaries, and full self-hosting via Docker Compose.

View details
89
Repo Health
81
Technical
65
Dependency
Built with
TypeScript55%
Rust40%
Updated yesterday
Java
34%
Apache 2.0

Enso

Analytics · Data Engineering · Low Code Platforms

7,437

A visual and textual programming platform for data prep and analysis where the node graph and the underlying Enso code are always perfectly in sync, built by an Alteryx co-founder on a GraalVM engine.

View details
70
Repo Health
90
Technical
62
Dependency
Built with
Java34%
TypeScript27%
Scala26%
Updated 1 weeks ago
Rust
69%
Other

GitButler

Developer Tools · Devops · AI Development

21,531

Git, but better — a modern version control client with stacked branches, parallel workflows, unlimited undo, and first-class support for AI-powered development.

View details
89
Repo Health
84
Technical
68
Dependency
Built with
Rust69%
TypeScript18%
Svelte12%
Updated today
Rust
93%
Apache 2.0

helix-db

Databases

5,803

A graph-vector database built from scratch in Rust that unifies graph traversal, vector search, key-value, and relational storage into a single platform for AI applications.

View details
85
Repo Health
80
Technical
81
Dependency
Built with
Rust93%
Updated today
Rust
100%
Other

Meilisearch

Search

59,012

Lightning-fast hybrid search engine with AI-powered semantic and full-text retrieval for modern applications.

View details
90
Repo Health
88
Technical
68
Dependency
Built with
Rust100%
Updated 5 days ago

Join founders buildingwith open source

Opinionated takes, migration guides, cost-saving tips, and insights from the open source ecosystem.

Subscribe on Substack
Join 750+ subscribers

Search