A Rust library providing a comprehensive toolkit of concurrent data structures, synchronization primitives, and memory management utilities.
Crossbeam is a Rust library that provides a comprehensive set of tools for concurrent programming, including atomic operations, concurrent data structures, synchronization primitives, and memory management utilities. It solves the problem of building safe, efficient, and scalable multithreaded applications by offering high-performance components that complement Rust's standard concurrency features.
Rust developers building high-performance, parallel systems such as task schedulers, concurrent data structures, real-time applications, or any software requiring fine-grained multithreading and lock-free algorithms.
Developers choose Crossbeam for its battle-tested, modular components that are optimized for performance and safety, its support for `no_std` environments, and its role as a de facto standard for advanced concurrency in the Rust ecosystem, often surpassing the capabilities of Rust's standard library.
Tools for concurrent programming in Rust
Crossbeam provides a wide range of composable components like channels, queues, and atomics through subcrates, allowing developers to pick only what they need, as shown in the Crates section of the README.
Many utilities, such as `AtomicCell` and `Backoff`, are marked for no_std use, making Crossbeam versatile for embedded and systems programming without standard library dependencies.
Features like work-stealing deques and MPMC queues are optimized for low-latency and high-throughput scenarios, essential for building task schedulers and message-passing systems.
The `epoch` module offers a garbage collector for building lock-free data structures, simplifying memory reclamation in concurrent code without manual overhead.
Advanced primitives like epoch GC and sharded locks require deep concurrency knowledge, which can be daunting and error-prone for developers new to these concepts.
Components like `crossbeam-skiplist` are experimental and not included in the main crate, indicating potential instability and breaking changes in future releases.
Pulling in multiple subcrates can increase compile times and binary size compared to using minimal stdlib features for simple concurrency needs.
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.