rayon
Simple, guaranteed data-race-free work-stealing parallelism for Rust — turn sequential iterators parallel by changing one call.
Repository Health
Technical Analysis
Rayon is a lightweight data-parallelism library for Rust that makes it trivial to convert sequential computations into parallel ones. In most cases you simply swap a .iter() call for .par_iter() and Rayon handles dividing the work across a global work-stealing thread pool, dynamically adapting to the runtime workload for maximum throughput.
Built on top of rayon-core, Rayon’s APIs guarantee data-race freedom through Rust’s type system: if your code compiles, it typically produces the same results it did sequentially. Beyond parallel iterators, it exposes lower-level join and scope primitives and configurable thread pools for cases that need finer control.
What You Get
- Parallel iterators (
par_iter,par_iter_mut,into_par_iter) that mirror the standard iterator API - Low-level
joinandscopeprimitives for building custom parallel task trees - Configurable thread pools via
ThreadPoolBuilder, including customization of the global pool - Parallel sorting (
par_sort) and parallel collection extension (par_extend) - A prelude module that brings all the necessary traits into scope with one import
Common Use Cases
- Parallelizing CPU-bound map/filter/reduce pipelines over large slices or vectors
- Speeding up numeric and scientific computations across all available cores
- Sorting large datasets in parallel with
par_sort - Fanning out independent recursive work (e.g. divide-and-conquer algorithms) via
join
Under The Hood
Architecture — Rayon is split into two crates: the user-facing rayon crate (parallel iterators over std types in src/iter, src/slice, src/str, src/collections, plus the prelude) and rayon-core, which houses the runtime — the work-stealing registry.rs, job.rs, latch.rs, the sleep module for idle-thread parking, and the join, scope, spawn, broadcast, and thread_pool primitives. Parallel iterators build a lazy computation graph of producers/consumers that is only executed when a terminal method is called, at which point work is split recursively and fed to the global work-stealing pool.
Tech Stack — Pure Rust (99.98% of the codebase), edition 2024, requiring rustc 1.85+. The runtime depends on crossbeam-deque and crossbeam-utils for lock-free work-stealing deques and synchronization; the public API re-exports either. Optional wasm_sync powers a spin-lock fallback on the browser main thread for wasm32 targets. The workspace also contains rayon-demo for benchmarks and visualizations.
Code Quality — Mature and disciplined. The workspace enforces strict lints (unsafe-op-in-unsafe-fn, unreachable-pub, private-bounds, and rust_2018_idioms all denied/warned). Testing is thorough: 16 integration test files under tests/ cover panic safety, unwind behavior, cross-pool usage, unzip edge cases, and large workloads (octillion.rs), alongside compile_fail tests that assert the type system rejects unsound usage. Roughly 2,300 commits over a decade of maintenance by 160 contributors.
API Design — Exceptionally ergonomic. The core design goal — swap iter() for par_iter() — makes adoption nearly friction-free, and the rayon::prelude::* import brings every needed trait into scope in one line. Naming deliberately mirrors the standard library’s iterator methods, so existing Rust knowledge transfers directly. Documentation is strong: extensive rustdoc with runnable examples, a README quick-start, and a FAQ. The join/scope escape hatches keep advanced control available without complicating the common path.
Used by 21 apps in this directory
AppFlowy
Productivity · Project Management · Collaboration
The open-source AI workspace that puts your data, your rules — with local LLMs, CRDT collaboration, and full self-hosting built in.
Cameleer
AI Agents
A local-first desktop workspace for managing AI agents in an enterprise-style workflow — agent directory, Kanban task tracking, workspace chat, and a full runtime/audit log of agent actions and tool approvals.
Cap
Team Chat · Video Conferencing
Open source Loom alternative with GPU-accelerated recording, instant share links, AI summaries, and full self-hosting via Docker Compose.
DevTools-X
Developer Tools
41 offline-first developer utilities in a single 10MB cross-platform desktop app — no Electron, no cloud, no compromise.
Epicenter
Knowledge Management · Note Taking · Developer Tools
A local-first monorepo led by Whispering, an open-source speech-to-text app, built on an MIT toolkit that turns your data into plain Markdown and SQLite files you own instead of a database you rent.
Fluree DB
Databases
A temporal, verifiable graph database with git-like branching, integrated vector/text/geo search, and RDF/SPARQL/JSON-LD/openCypher support — benchmarked at 10.4x faster than the next database on the full Wikidata dump.
Fyrox
Game Development
A production-ready 2D/3D game engine written in Rust with a built-in scene editor, physics, and hot-reloading game scripts
Graphite
Code Editors · Design Tools
A free, open source procedural 2D design tool that unifies vector, raster, motion graphics, and generative art in a single node-based nondestructive workflow.
headroom
AI Development · Developer Tools
Compress everything your AI agent reads — tool outputs, logs, RAG chunks, and files — before it reaches the LLM, achieving 60–95% fewer tokens with the same answers.