Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Parallelism

Rust provides excellent support for safe parallel programming, which can lead to large performance improvements. There are a variety of ways to introduce parallelism into a program and the best way for any program will depend greatly on its design.

Having said that, an in-depth treatment of parallelism is beyond the scope of this book.

If you are interested in thread-based parallelism, the documentation for the rayon and crossbeam crates is a good place to start. Rust Atomics and Locks is also an excellent resource.

If you are interested in fine-grained data parallelism, this blog post is a good overview of the state of SIMD support in Rust as of November 2025.