crossbeam

A collection of tools for lock-free and concurrent programming in Rust: channels, deques, epoch-based GC, and more

Library
Cargo
v0.8.5
8,566stars
MIT OR Apache-2.0

Repository Health

Pre-computed score based on development activity, maintenance, community, maturity, and trend momentum.How we score it →
89/100Excellent
Development Activity96
Maintenance96
Community64
Maturity60
Momentum40

Technical Analysis

AI-assessed by reading the actual repository — architecture, code quality, innovation, and documentation.How we score it →
81/100Excellent
Architecture85
Code Quality88
Innovation80
Learning Curve72

crossbeam is the umbrella crate for a family of Rust concurrency primitives maintained under the crossbeam-rs organization, re-exporting crossbeam-channel (MPMC channels), crossbeam-deque (work-stealing deques for task schedulers), crossbeam-epoch (epoch-based garbage collection for lock-free data structures), and crossbeam-queue (bounded/unbounded lock-free queues) behind a single dependency and a curated set of module paths (channel, deque, epoch, queue, sync, atomic, utils).

Beyond re-exporting its sibling crates, the crate also provides scoped-thread support (crossbeam::scope) that lets threads safely borrow non-'static data from the stack, plus synchronization primitives like ShardedLock and WaitGroup. It is no_std-compatible at its core (with alloc/std features layered on top), making it usable in a wide range of environments from application code down to lower-level systems programming.

What You Get

  • MPMC channels (crossbeam::channel) as a fast alternative/superset of std::sync::mpsc
  • Work-stealing deques (crossbeam::deque) for building custom task schedulers
  • Epoch-based garbage collection (crossbeam::epoch) for building lock-free data structures safely
  • Bounded and unbounded lock-free queues (ArrayQueue, SegQueue) via crossbeam::queue
  • Scoped threads (crossbeam::scope) that can safely borrow stack-local, non-'static data
  • Additional primitives: AtomicCell, CachePadded, Backoff, ShardedLock, and WaitGroup

Common Use Cases

  • Replacing std::sync::mpsc with crossbeam-channel for faster, more flexible multi-producer multi-consumer messaging
  • Building custom work-stealing task schedulers or thread pools on top of crossbeam::deque
  • Implementing lock-free data structures that need safe memory reclamation via crossbeam::epoch
  • Spawning threads that borrow local stack data without needing Arc/'static bounds, via crossbeam::scope
  • Coordinating parallel computation completion with WaitGroup or reducing cache contention with CachePadded

Under The Hood

Architecture crossbeam is a Cargo workspace umbrella crate: the root crossbeam package (src/lib.rs, 79 lines) contains almost no logic of its own — it is a curated set of pub use re-exports that stitch together crossbeam-channel, crossbeam-deque, crossbeam-epoch, crossbeam-queue, and crossbeam-utils into a single coherent module namespace (channel, deque, epoch, queue, sync, atomic, utils), with the real implementations living in each dedicated sibling crate within the same workspace.

Tech Stack Written in Rust with #![no_std] at the core, layering alloc and std features on top so the same crate works in embedded/no-std contexts as well as full applications. Feature flags (std, alloc) propagate down to each sub-crate’s own features, giving fine-grained control over how much of the standard library a build depends on. The workspace uses loom (referenced via cfg(crossbeam_loom)) for concurrency model-checking in CI, alongside standard cargo test.

Code Quality Because the umbrella crate is mostly re-exports, code quality is best assessed at the sibling-crate level, where each (crossbeam-channel, crossbeam-epoch, etc.) has its own extensive test suites including loom-based concurrency testing — a strong signal of rigor for lock-free/unsafe code. Workspace-wide Clippy lints (missing_debug_implementations, unreachable_pub, rust_2018_idioms) are enforced consistently across all member crates via [workspace.lints].

API Design The umbrella crate’s entire value proposition is API ergonomics: instead of adding four or five separate crossbeam-* dependencies and remembering their names, consumers add one crossbeam dependency and get a single, well-organized module namespace (crossbeam::channel, crossbeam::deque, etc.) with doc comments in lib.rs linking directly to each primitive. This consolidation, combined with mature and widely-used sibling crates, makes the learning curve mostly about learning Rust concurrency concepts rather than the crate’s own API surface.

Used by 10 apps in this directory

Dart
74%
AGPL 3.0

AppFlowy

Productivity · Project Management · Collaboration

76,354

The open-source AI workspace that puts your data, your rules — with local LLMs, CRDT collaboration, and full self-hosting built in.

View details
67
Repo Health
81
Technical
67
Dependency
Built with
Dart74%
Rust24%
Updated 6 days ago
Rust
53%
Other

Cap

Team Chat · Video Conferencing

21,859

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
64
Dependency
Built with
Rust53%
TypeScript43%
Updated yesterday
Rust
72%
Other

iii

Developer Tools · Devops

18,679

Compose, extend, and observe every backend service in real time using three primitives: Workers, Functions, and Triggers.

View details
85
Repo Health
85
Technical
68
Dependency
Built with
Rust72%
TypeScript17%
Updated 2 days ago
Rust
46%
MIT

Meetily

Productivity · AI Assistants

30,423

Privacy-first AI meeting assistant that transcribes and summarizes your meetings entirely on your local machine — no cloud, no data leakage.

View details
61
Repo Health
72
Technical
71
Dependency
Built with
Rust46%
TypeScript30%
Updated yesterday
Rust
100%
Other

Meilisearch

Search

59,200

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

View details
89
Repo Health
88
Technical
68
Dependency
Built with
Rust100%
Updated 4 days ago
Rust
71%
Apache 2.0

Rivet

AI Agents · Developer Tools

6,116

Stateful actors as a primitive for AI agents, real-time collaboration, and durable execution — with in-memory state, WebSockets, queues, and scheduling built in.

View details
86
Repo Health
81
Technical
65
Dependency
Built with
Rust71%
TypeScript25%
Updated yesterday
Rust
68%
AGPL 3.0

RustDesk

Networking

122,777

Open-source, self-hosted remote desktop built in Rust — your data, your infrastructure, no third-party cloud.

View details
93
Repo Health
84
Technical
71
Dependency
Built with
Rust68%
Dart23%
Updated yesterday
Rust
97%
MPL 2.0

Sonic

Databases · Search

21,335

Fast, lightweight, schema-less search backend in Rust — microsecond queries, 30MB RAM, no document storage required.

View details
88
Repo Health
88
Technical
70
Dependency
Built with
Rust97%
Updated 3 days ago
Rust
71%
MIT

Trieve

AI Development · Search · Developer Tools

2,717

All-in-one self-hostable platform for hybrid search, RAG, recommendations, and analytics built on Rust and Qdrant.

View details
43
Repo Health
74
Technical
64
Dependency
Built with
Rust71%
Updated 7 months 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