Skip to content
Tools for concurrent programming in Rust
Rust Other
  1. Rust 98.9%
  2. Other 1.1%
Branch: master
Clone or download

Latest commit

bors and taiki-e Merge #527
527: Check all feature combinations works properly on CI r=stjepang a=taiki-e

This adds a check for all feature combinations to CI.

*This originally suggested by @jonhoo in #504 (comment)

Co-authored-by: Taiki Endo <>
Latest commit 2f1ed42 Jun 5, 2020


Type Name Latest commit message Commit time
Failed to load latest commit information.
.github/workflows Attempt to fix permission error Jun 5, 2020
ci Attempt to fix permission error Jun 5, 2020
crossbeam-channel Clippy May 28, 2020
crossbeam-deque Clippy May 28, 2020
crossbeam-epoch Fix clippy warnings Jun 5, 2020
crossbeam-queue Propagate nightly feature Jun 5, 2020
crossbeam-skiplist Clippy crossbeam-skiplist May 28, 2020
crossbeam-utils Merge #525 #528 Jun 5, 2020
src Deny warnings for doc tests May 24, 2020
tests Apply rust 2018 idioms May 22, 2020
.gitignore Merge remaining subcrates Nov 5, 2018 Undo bump of rand as it bumps MSRV Feb 17, 2020
Cargo.toml Upgrade all dependencies May 27, 2020
LICENSE-MIT Add copyright notice Apr 22, 2019 Separate licenses with `OR` instead of `/` May 23, 2020
bors.toml Enable tests on Windows on CI May 25, 2020


Build Status License Cargo Documentation Rust 1.36+ chat

This crate provides a set of tools for concurrent programming:


  • AtomicCell, a thread-safe mutable memory location.(no_std)
  • AtomicConsume, for reading from primitive atomic types with "consume" ordering.(no_std)

Data structures

  • deque, work-stealing deques for building task schedulers.
  • ArrayQueue, a bounded MPMC queue that allocates a fixed-capacity buffer on construction.
  • SegQueue, an unbounded MPMC queue that allocates small buffers, segments, on demand.

Memory management

  • epoch, an epoch-based garbage collector.(alloc)

Thread synchronization

  • channel, multi-producer multi-consumer channels for message passing.
  • Parker, a thread parking primitive.
  • ShardedLock, a sharded reader-writer lock with fast concurrent reads.
  • WaitGroup, for synchronizing the beginning or end of some computation.


  • Backoff, for exponential backoff in spin loops.(no_std)
  • CachePadded, for padding and aligning a value to the length of a cache line.(no_std)
  • scope, for spawning threads that borrow local variables from the stack.

Features marked with (no_std) can be used in no_std environments.
Features marked with (alloc) can be used in no_std environments, but only if alloc and nightly are enabled.


The main crossbeam crate just re-exports tools from smaller subcrates:

  • crossbeam-channel provides multi-producer multi-consumer channels for message passing.
  • crossbeam-deque provides work-stealing deques, which are primarily intended for building task schedulers.
  • crossbeam-epoch provides epoch-based garbage collection for building concurrent data structures.
  • crossbeam-queue provides concurrent queues that can be shared among threads.
  • crossbeam-utils provides atomics, synchronization primitives, scoped threads, and other utilities.

There is one more experimental subcrate that is not yet included in crossbeam:


Add this to your Cargo.toml:

crossbeam = "0.7"


Crossbeam supports stable Rust releases going back at least six months, and every time the minimum supported Rust version is increased, a new minor version is released. Currently, the minimum supported Rust version is 1.36.


Crossbeam welcomes contribution from everyone in the form of suggestions, bug reports, pull requests, and feedback. 💛

If you need ideas for contribution, there are several ways to get started:


We also have the RFCs repository for more high-level discussion, which is the place where we brainstorm ideas and propose substantial changes to Crossbeam.

You are welcome to participate in any open issues or pull requests.

Learning resources

If you'd like to learn more about concurrency and non-blocking data structures, there's a list of learning resources in our wiki, which includes relevant blog posts, papers, videos, and other similar projects.

Another good place to visit is merged RFCs. They contain elaborate descriptions and rationale for features we've introduced to Crossbeam, but keep in mind that some of the written information is now out of date.


The Crossbeam project adheres to the Rust Code of Conduct. This describes the minimum behavior expected from all contributors.


Licensed under either of

at your option.

Some Crossbeam subcrates have additional licensing notices. Take a look at other readme files in this repository for more information.


Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

You can’t perform that action at this time.