rayon

Simple, guaranteed data-race-free work-stealing parallelism for Rust — turn sequential iterators parallel by changing one call.

Library
Cargo
v1.12.0
13,242stars
Apache License 2.0

Repository Health

Pre-computed score based on development activity, maintenance, community, maturity, and trend momentum.How we score it →
60/100Good
Development Activity52
Maintenance24
Community64
Maturity60
Momentum40

Technical Analysis

AI-assessed by reading the actual repository — architecture, code quality, innovation, and documentation.How we score it →
89/100Excellent
Architecture92
Code Quality90
Innovation90
Learning Curve85

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 join and scope primitives 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

Dart
74%
AGPL 3.0

AppFlowy

Productivity · Project Management · Collaboration

75,729

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

View details
66
Repo Health
81
Technical
66
Dependency
Built with
Dart74%
Rust24%
Updated 1 weeks ago
Rust
54%
Other

Cameleer

AI Agents

23

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.

View details
48
Repo Health
65
Technical
76
Dependency
Built with
Rust54%
JavaScript24%
TypeScript15%
Updated 4 weeks ago
TypeScript
55%
Other

Cap

Team Chat · Video Conferencing

20,986

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
65
Dependency
Built with
TypeScript55%
Rust40%
Updated yesterday
TypeScript
88%
MIT

DevTools-X

Developer Tools

1,532

41 offline-first developer utilities in a single 10MB cross-platform desktop app — no Electron, no cloud, no compromise.

View details
51
Repo Health
68
Technical
68
Dependency
Built with
TypeScript88%
Updated 2 months ago
TypeScript
72%
Other

Epicenter

Knowledge Management · Note Taking · Developer Tools

4,761

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.

View details
88
Repo Health
90
Technical
68
Dependency
Built with
TypeScript72%
Svelte15%
Updated today
Rust
100%
Other

Fluree DB

Databases

445

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.

View details
86
Repo Health
74
Technical
65
Dependency
Built with
Rust100%
Updated yesterday
Rust
95%
MIT

Fyrox

Game Development

9,512

A production-ready 2D/3D game engine written in Rust with a built-in scene editor, physics, and hot-reloading game scripts

View details
85
Repo Health
79
Technical
68
Dependency
Built with
Rust95%
Updated yesterday
Rust
89%
Apache 2.0

Graphite

Code Editors · Design Tools

26,876

A free, open source procedural 2D design tool that unifies vector, raster, motion graphics, and generative art in a single node-based nondestructive workflow.

View details
84
Repo Health
77
Technical
70
Dependency
Built with
Rust89%
Updated today
Python
80%
Apache 2.0

headroom

AI Development · Developer Tools

66,835

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.

View details
84
Repo Health
86
Technical
73
Dependency
Built with
Python80%
Rust14%
Updated today

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