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,398 stars
Apache License 2.0

Repository Health

Pre-computed score based on development activity, maintenance, community, maturity, and trend momentum. How we score it →
56 /100 Fair
Development Activity 40
Maintenance 20
Community 64
Maturity 60
Momentum 40

Technical Analysis

AI-assessed by reading the actual repository — architecture, code quality, innovation, and documentation. How we score it →
89 /100 Excellent
Architecture 92
Code Quality 90
Innovation 90
Learning Curve 85

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 22 apps in this directory

TypeScript
68%
MIT

Hoppscotch

Developer Tools

80,676

A lightweight, offline-capable API development ecosystem for testing HTTP, GraphQL, WebSocket, MQTT, and SSE endpoints across web, desktop, and CLI.

View details
91
Repo Health
83
Technical
62
Dependency
Built with
TypeScript 68%
Vue 24%
Updated 6 days ago
TypeScript
63%
Apache 2.0

Laminar

AI Development · Monitoring

3,434

Open-source observability platform purpose-built for AI agents — trace, evaluate, debug, and monitor at scale with SQL access and real-time replay.

View details
86
Repo Health
76
Technical
65
Dependency
Built with
TypeScript 63%
Rust 35%
Updated 5 days ago
Rust
48%
MIT

Meetily

AI Assistants · Productivity

32,103

Privacy-first AI meeting assistant that transcribes and summarizes your meetings entirely on your local machine — no cloud, no data leakage.

View details
87
Repo Health
72
Technical
67
Dependency
Built with
Rust 48%
TypeScript 29%
Updated 6 days ago
Rust
100%
Other

Meilisearch

Search

59,644

Lightning-fast hybrid search engine with AI-powered semantic and full-text retrieval for modern applications.

View details
90
Repo Health
88
Technical
67
Dependency
Built with
Rust 100%
Updated 6 days ago
Python
66%
Other

Morphik

AI Development · Databases · Search

3,717

Morphik is an AI-native ingestion and retrieval engine that lets developers store, search, and reason over visually rich documents — scanned PDFs, manuals, slides, and video — without duct-taping together OCR, an embedding model, and a vector database.

View details
64
Repo Health
71
Technical
67
Dependency
Built with
Python 66%
TypeScript 23%
Updated 1 weeks ago
Rust
93%
Apache 2.0

Murr

Databases

117

A RocksDB-based NVMe/S3 cache purpose-built for AI inference workloads — a faster Redis replacement optimized for batch, low-latency, zero-copy reads and writes between data pipelines and inference apps.

View details
73
Repo Health
72
Technical
75
Dependency
Built with
Rust 93%
Updated 1 weeks ago
TypeScript
89%
GPL 3.0

NoteGen

AI Assistants · Knowledge Management · Note Taking

12,914

Capture anything first, then let AI transform your scattered records into polished, structured Markdown notes with RAG-powered knowledge retrieval.

View details
87
Repo Health
74
Technical
67
Dependency
Built with
TypeScript 89%
Updated 6 days ago
Python
55%
Other

PostHog

Ab Testing Experimentation · Analytics · Developer Tools

40,397

The all-in-one open source product platform combining analytics, session replay, feature flags, error tracking, AI observability, and a built-in data warehouse in a single self-hostable stack.

View details
92
Repo Health
80
Technical
65
Dependency
Built with
Python 55%
TypeScript 36%
Updated 5 days ago
Java
93%
Apache 2.0

QuestDB

Analytics · Databases

17,466

A high-performance, open-source time-series database built for financial market data, IoT telemetry, and real-time analytics, combining a zero-GC Java/C++ core with SIMD-accelerated SQL and a WAL-to-Parquet storage engine.

View details
91
Repo Health
86
Technical
67
Dependency
Built with
Java 93%
Updated 5 days ago

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