rayon
Simple work-stealing parallelism for Rust
1.12.0
507M downloads/mo
#212 most downloaded on crates.io
rayon-rs/rayon
What this package is like to depend on
Last release 4 months ago
14 Apr 2026
Release timing varies
gaps range from 3 weeks to 1.4 years
Some releases are documented
notes for 22 of 40 stable releases
Nothing withdrawn
no release was ever pulled
11 years old
40 releases · first in 2015
1 release in the last 12 months
see the full history below
Release timeline
40 releases · Dec 2015 to Apr 2026Releases
latest 40-
1.12.014 Apr 2026Release notes
Open source →- Fixed a bug in parallel
Range<char>when the end is 0xE000, just past the surrogate boundary, which was unsafely producing invalidcharvalues. - The new method
ParallelSlice::par_array_windowsworks likepar_windowsbut with a constant length, producing&[T; N]items.
- Fixed a bug in parallel
-
1.11.012 Aug 2025Release notes
Open source →- The minimum supported
rustcis now 1.59. - Added a fallback when threading is unsupported.
- The new
ParallelIterator::take_anyandskip_anymethods work like unorderedIndexedParallelIterator::takeandskip, counting items in whatever order they are visited in parallel. - The new
ParallelIterator::take_any_whileandskip_any_whilemethods work like unorderedIterator::take_whileandskip_while, which previously had no parallel equivalent. The "while" condition may be satisfied from anywhere in the parallel iterator, affecting all future items regardless of position. - The new
yield_nowandyield_localfunctions will cooperatively yield execution to Rayon, either trying to execute pending work from the entire pool or from just the local deques of the current thread, respectively.
- The minimum supported
-
1.10.024 Mar 2024Release notes
Open source →- The new methods
ParallelSlice::par_chunk_byandParallelSliceMut::par_chunk_by_mutwork like the slice methodschunk_byandchunk_by_mutadded in Rust 1.77.
- The new methods
-
1.9.027 Feb 2024Release notes
Open source →- The new methods
IndexedParallelIterator::by_exponential_blocksandby_uniform_blocksallow processing items in smaller groups at a time. - The new
iter::walk_tree,walk_tree_prefix, andwalk_tree_postfixfunctions enable custom parallel iteration over tree-like structures. - The new method
ParallelIterator::collect_vec_listreturns items as a linked list of vectors, which is an efficient mode of parallel collection used by many of the internal implementations ofcollect. - The new methods
ParallelSliceMut::par_split_inclusive_mut,ParallelSlice::par_split_inclusive, andParallelString::par_split_inclusiveall work like a normal split but keeping the separator as part of the left slice. - The new
ParallelString::par_split_ascii_whitespacesplits only on ASCII whitespace, which is faster than including Unicode multi-byte whitespace. OsStringnow implementsFromParallelIterator<_>andParallelExtend<_>for a few item types similar to the standardFromIteratorandExtend.- The internal
Patterntrait for string methods is now implemented for[char; N]and&[char; N], matching any of the given characters.
- The new methods
-
1.8.117 Jan 2024Release notes
Open source →- Fixed an overflow panic on high-contention workloads, for a counter that was meant to simply wrap. This panic only occurred with debug assertions enabled, and was much more likely on 32-bit targets.
-
1.8.020 Sep 2023Release notes
Open source →- Implemented a new thread scheduler, RFC 5, which uses targeted wakeups for new work and for notifications of completed stolen work, reducing wasteful CPU usage in idle threads.
- Implemented
IntoParallelIterator for Range<char>andRangeInclusive<char>with the same iteration semantics as Rust 1.45. - Relaxed the lifetime requirements of the initial
scopeclosure.
Contributors
Thanks to all of the contributors for this release!
- @CAD97
- @cuviper
- @kmaork
- @nikomatsakis
- @SuperFluffy
-
1.7.004 Mar 2023Release notes
Open source →- Tuples up to length 12 now implement
IntoParallelIterator, creating aMultiZipiterator that produces items as similarly-shaped tuples. - The
--cfg=rayon_unstablesupporting code forrayon-futuresis removed. - The minimum supported
rustcis now 1.31.
Contributors
Thanks to all of the contributors for this release!
- @cuviper
- @c410-f3r
- @silwol
- Tuples up to length 12 now implement
-
1.6.109 Dec 2022Release notes
Open source →- Simplified
par_bridgeto only pull one item at a time from the iterator, without batching. Threads that are waiting for iterator items will now block appropriately rather than spinning CPU. (Thanks @njaard!) - Added protection against recursion in
par_bridge, so iterators that also invoke rayon will not cause mutex recursion deadlocks.
- Simplified
-
1.6.018 Nov 2022Release notes
Open source →- The new
ParallelIterator::copied()converts an iterator of references into copied values, likeIterator::copied(). ParallelExtendis now implemented for the unit().- Internal updates were made to improve test determinism, reduce closure type sizes, reduce task allocations, and update dependencies.
- The minimum supported
rustcis now 1.28.
Contributors
Thanks to all of the contributors for this release!
- @Aaron1011
- @cuviper
- @ralfbiedert
- The new
-
1.5.313 May 2022Release notes
Open source →- The new
ParallelSliceMut::par_sort_by_cached_keyis a stable sort that caches the keys for each item -- a parallel version ofslice::sort_by_cached_key.
- The new
-
1.5.214 Apr 2022Nothing published for this version
-
1.5.118 May 2021Nothing published for this version
-
1.5.021 Oct 2020Release notes
Open source →- FIFO spawns are now supported using the new
spawn_fifo()andscope_fifo()global functions, and their correspondingThreadPoolmethods.- Normally when tasks are queued on a thread, the most recent is processed first (LIFO) while other threads will steal the oldest (FIFO). With FIFO spawns, those tasks are processed locally in FIFO order too.
- Regular spawns and other tasks like
joinare not affected. - The
breadth_firstconfiguration flag, which globally approximated this effect, is now deprecated. - For more design details, please see RFC 1.
ThreadPoolBuildercan now take a customspawn_handlerto control how threads will be created in the pool.ThreadPoolBuilder::build_scoped()uses this to create a scoped thread pool, where the threads are able to use non-static data.- This may also be used to support threading in exotic environments, like
WebAssembly, which don't support the normal
std::thread.
ParallelIteratorhas 3 new methods:find_map_any(),find_map_first(), andfind_map_last(), likeIterator::find_map()with ordering constraints.- The new
ParallelIterator::panic_fuse()makes a parallel iterator halt as soon as possible if any of its threads panic. Otherwise, the panic state is not usually noticed until the iterator joins its parallel tasks back together. IntoParallelIteratoris now implemented for integralRangeInclusive.- Several internal
Folders now have optimizedconsume_iterimplementations. rayon_core::current_thread_index()is now re-exported inrayon.- The minimum
rustcis now 1.26, following the update policy defined in RFC 3.
Contributors
Thanks to all of the contributors for this release!
- @cuviper
- @didroe
- @GuillaumeGomez
- @huonw
- @janriemer
- @kornelski
- @nikomatsakis
- @seanchen1991
- @yegeun542
- FIFO spawns are now supported using the new
-
1.4.129 Sep 2020Release notes
Open source →- The new
flat_map_iterandflatten_itermethods can be used to flatten sequential iterators, which may perform better in cases that don't need the nested parallelism offlat_mapandflatten. - The new
par_drainmethod is a parallel version of the standarddrainfor collections, removing items while keeping the original capacity. Collections that implement this throughParallelDrainRangesupport draining items from arbitrary index ranges, whileParallelDrainFullalways drains everything. - The new
positionsmethod finds all items that match the given predicate and returns their indices in a new iterator.
- The new
-
1.4.024 Aug 2020Release notes
Open source →ParallelIteratoradded theupdatemethod which applies a function to mutable references, inspired byitertools.IndexedParallelIteratoradded thechunksmethod which yields vectors of consecutive items from the base iterator, inspired byitertools.Stringnow implementsFromParallelIterator<Cow<str>>andParallelExtend<Cow<str>>, inspired bystd.()now implementsFromParallelIterator<()>, inspired bystd.- The new
ThreadPoolBuilderreplaces and deprecatesConfiguration.- Errors from initialization now have the concrete
ThreadPoolBuildErrortype, rather thanBox<Error>, and this type implementsSendandSync. ThreadPool::newis deprecated in favor ofThreadPoolBuilder::build.initializeis deprecated in favor ofThreadPoolBuilder::build_global.
- Errors from initialization now have the concrete
- Examples have been added to most of the parallel iterator methods.
- A lot of the documentation has been reorganized and extended.
Breaking changes
- Rayon now requires rustc 1.13 or greater.
IndexedParallelIterator::lenandParallelIterator::opt_lennow operate on&selfinstead of&mut self.IndexedParallelIterator::collect_intois nowcollect_into_vec.IndexedParallelIterator::unzip_intois nowunzip_into_vecs.- Rayon no longer exports the deprecated
Configurationandinitializefrom rayon-core.
Contributors
Thanks to all of the contributors for this release!
- @Bilkow
- @cuviper
- @Enet4
- @ignatenkobrain
- @iwillspeak
- @jeehoonkang
- @jwass
- @Kerollmops
- @KodrAus
- @kornelski
- @MaloJaffre
- @nikomatsakis
- @obv-mikhail
- @oddg
- @phimuemue
- @stjepang
- @tmccombs
- bors[bot]
-
1.3.115 Jun 2020Nothing published for this version
-
1.3.022 Dec 2019Nothing published for this version
-
1.2.121 Nov 2019Nothing published for this version
-
1.2.031 Aug 2019Release notes
Open source →- The following core APIs are being stabilized:
rayon::spawn()-- spawns a task into the Rayon thread pool; as it is contained in the global scope (rather than a user-created scope), the task cannot capture anything from the current stack frame.ThreadPool::join(),ThreadPool::spawn(),ThreadPool::scope()-- convenience APIs for launching new work within a thread pool.
- The various iterator adapters are now tagged with
#[must_use] - Parallel iterators now offer a
for_each_withadapter, similar tomap_with. - We are adopting a new approach to handling the remaining unstable
APIs (which primarily pertain to futures integration). As awlays,
unstable APIs are intended for experimentation, but do not come with
any promise of compatibility (in other words, we might change them
in arbitrary ways in any release). Previously, we designated such
APIs using a Cargo feature "unstable". Now, we are using a regular
#[cfg]flag. This means that to see the unstable APIs, you must doRUSTFLAGS='--cfg rayon_unstable' cargo build. This is intentionally inconvenient; in particular, if you are a library, then your clients must also modify their environment, signaling their agreement to instability.
- The following core APIs are being stabilized:
-
1.1.013 Jun 2019Release notes
Open source →Rayon 0.8.0
- Added the
map_withandfold_withcombinators, which help for passing along state (like channels) that cannot be shared between threads but which can be cloned on each thread split. - Added the
while_somecombinator, which helps for writing short-circuiting iterators. - Added support for "short-circuiting" collection: e.g., collecting
from an iterator producing
Option<T>orResult<T, E>into aOption<Collection<T>>orResult<Collection<T>, E>. - Support
FromParallelIteratorforCow. - Removed the deprecated weight APIs.
- Simplified the parallel iterator trait hierarchy by removing the
BoundedParallelIteratorandExactParallelIteratortraits, which were not serving much purpose. - Improved documentation.
- Added some missing
Sendimpls. - Fixed some small bugs.
Rayon-core 1.1.0
- We now have more documentation.
- Renamed the (unstable) methods
spawn_asyncandspawn_future_async-- which spawn tasks that cannot hold references -- to simplyspawnandspawn_future, respectively. - We are now using the coco library for our deque.
- Individual thread pools can now be configured in "breadth-first" mode, which causes them to execute spawned tasks in the reverse order that they used to. In some specific scenarios, this can be a win (though it is not generally the right choice).
- Added top-level functions:
current_thread_index, for querying the index of the current worker thread within its thread pool (previously available asthread_pool.current_thread_index());current_thread_has_pending_tasks, for querying whether the current worker that has an empty task deque or not. This can be useful when deciding whether to spawn a task.
- The environment variables for controlling Rayon are now
RAYON_NUM_THREADSandRAYON_LOG. The older variables (e.g.,RAYON_RS_NUM_CPUSare still supported but deprecated).
Rayon-demo
- Added a new game-of-life benchmark.
Contributors
Thanks to the following contributors:
- @ChristopherDavenport
- @SuperFluffy
- @antoinewdg
- @crazymykl
- @cuviper
- @glandium
- @julian-seward1
- @leodasvacas
- @leshow
- @lilianmoraru
- @mschmo
- @nikomatsakis
- @stjepang
- Added the
-
1.0.302 Nov 2018Release notes
Open source →ParallelExtendis now implemented for tuple pairs, enabling nestedunzip()andpartition_map()operations. For instance,(A, (B, C))items can be unzipped into(Vec<A>, (Vec<B>, Vec<C>)).ParallelExtend<(A, B)>works likeunzip().ParallelExtend<Either<A, B>>works likepartition_map().
ParallelIteratornow has a methodmap_init()which calls aninitfunction for a value to pair with items, likemap_with()but dynamically constructed. That value type has no constraints, not evenSendorSync.- The new
for_each_init()is a variant of this for simple iteration. - The new
try_for_each_init()is a variant for fallible iteration.
- The new
Contributors
Thanks to all of the contributors for this release!
- @cuviper
- @dan-zheng
- @dholbert
- @ignatenkobrain
- @mdonoughe
-
1.0.217 Jul 2018Release notes
Open source →This release is a targeted performance fix for #343, an issue where rayon threads could sometimes enter into a spin loop where they would be unable to make progress until they are pre-empted.
-
1.0.116 Mar 2018Release notes
Open source →- Added more documentation for
rayon::iter::split(). - Corrected links and typos in documentation.
Contributors
Thanks to all of the contributors for this release!
- @cuviper
- @HadrienG2
- @matthiasbeyer
- @nikomatsakis
- Added more documentation for
-
1.0.015 Feb 2018Nothing published for this version
-
0.9.009 Nov 2017Nothing published for this version
-
0.8.228 Jun 2017Release notes
Open source →ParallelSliceMutnow has six parallel sorting methods with the same variations as the standard library.par_sort,par_sort_by, andpar_sort_by_keyperform stable sorts in parallel, using the default order, a custom comparator, or a key extraction function, respectively.par_sort_unstable,par_sort_unstable_by, andpar_sort_unstable_by_keyperform unstable sorts with the same comparison options.- Thanks to @stjepang!
-
0.8.114 Jun 2017Nothing published for this version
-
0.8.013 Jun 2017Nothing published for this version
-
0.7.130 May 2017Nothing published for this version
-
0.7.006 Apr 2017Nothing published for this version
-
0.6.021 Dec 2016Nothing published for this version
-
0.5.004 Nov 2016Nothing published for this version
-
0.4.325 Oct 2016Release notes
Open source →- Parallel iterators now offer an adaptive weight scheme,
which means that explicit weights should no longer
be necessary in most cases! Thanks @cuviper!
- We are considering removing weights or changing the weight mechanism before 1.0. Examples of scenarios where you still need weights even with this adaptive mechanism would be great. Join the discussion at https://github.com/rayon-rs/rayon/issues/111.
- New (unstable) scoped threads API, see
rayon::scopefor details.- You will need to supply the cargo feature
unstable.
- You will need to supply the cargo feature
- The various demos and benchmarks have been consolidated into one
program,
rayon-demo. - Optimizations in Rayon's inner workings. Thanks @emilio!
- Update
num_cpusto 1.0. Thanks @jamwt! - Various internal cleanup in the implementation and typo fixes. Thanks @cuviper, @Eh2406, and @spacejam!
- Parallel iterators now offer an adaptive weight scheme,
which means that explicit weights should no longer
be necessary in most cases! Thanks @cuviper!
-
0.4.214 Sep 2016 -
0.4.114 Sep 2016Release notes
Open source →- New
chaincombinator for parallel iterators. Option,Result, as well as many more collection types now have parallel iterators.- New mergesort demo.
- Misc fixes.
Thanks to @cuviper, @edre, @jdanford, @frewsxcv for their contributions!
- New
-
0.4.016 May 2016Nothing published for this version
-
0.3.124 Feb 2016Nothing published for this version
-
0.3.024 Feb 2016Nothing published for this version
-
0.2.025 Jan 2016Nothing published for this version
-
0.0.110 Dec 2015Nothing published for this version