NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
crates.io · #229 most downloaded on crates.io
Core APIs for Rayon
Last release 1 years ago
12 Aug 2025
Release timing varies
gaps range from 3 weeks to 1.6 years
Most releases are documented
notes for 23 of 27 stable releases
1 version withdrawn
withdrawn after publishing
10 years old
28 releases · first in 2017
The old name still exists as a deprecated function for compatibility.
rustc is now 1.80.iter::repeatn has been renamed to iter::repeat_n to match the name
stabilized in the standard library. The old name still exists as a deprecated
function for compatibility.in_place_scope when the default global registry uses the
current thread, like on WebAssembly without threading support.binary_heap::Iter no longer requires a temporary allocation.IntoParallelIterator for Box<[T]> and its references.FromParallelIterator<_> for Box<str> via String.chore: Release rayon-core version 1.12.1
chore: Release rayon-core version 1.12.1
One column per quarter.
"web_spin_lock" crate feature makes mutexes spin on the main
browser thread in WebAssembly, rather than suffer an error about forbidden
atomics.wait if they were to block in that context. Thanks @RReverser!chore: Release rayon version 1.12.0
chore: Release rayon version 1.12.0
Range<char> when the end is 0xE000, just past the
surrogate boundary, which was unsafely producing invalid char values.ParallelSlice::par_array_windows works like par_windows
but with a constant length, producing &[T; N] items.The minimum supported rustc is now 1.59.
rustc is now 1.59.ParallelIterator::take_any and skip_any methods work like
unordered IndexedParallelIterator::take and skip, counting items in
whatever order they are visited in parallel.ParallelIterator::take_any_while and skip_any_while methods work
like unordered Iterator::take_while and skip_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.yield_now and yield_local functions 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.Fixed miri-reported UB for SharedReadOnly tags protected by a call.
Fixed a race condition with threads going to sleep while a broadcast starts.
The new methods ParallelSlice::par_chunk_by and ParallelSliceMut::par_chunk_by_mut work like the slice methods chunk_by and chunk_by_mut added in Rust
ParallelSlice::par_chunk_by and
ParallelSliceMut::par_chunk_by_mut work like the slice methods chunk_by
and chunk_by_mut added in Rust 1.77.Fixed a use-after-free race in job notification.
The new ParallelSlice::par_rchunks() and par_rchunks_exact() iterate slice chunks in reverse, aligned the against the end of the slice if the length i
ParallelSlice::par_rchunks() and par_rchunks_exact() iterate
slice chunks in reverse, aligned the against the end of the slice if the
length is not a perfect multiple of the chunk size. The new
ParallelSliceMut::par_rchunks_mut() and par_rchunks_exact_mut() are the
same for mutable slices.ParallelIterator::try_* methods now support std::ops::ControlFlow and
std::task::Poll items, mirroring the unstable Try implementations in the
standard library.ParallelString pattern-based methods now support &[char] patterns,
which match when any character in that slice is found in the string.max_num_threads().cargo miri.Thanks to all of the contributors for this release!
The new in_place_scope and in_place_scope_fifo are variations of scope and scope_fifo, running the initial non-Send callback directly on the current t
in_place_scope and in_place_scope_fifo are variations of scope
and scope_fifo, running the initial non-Send callback directly on the
current thread, rather than moving execution to the thread pool.IntoParallelIterator.FromParallelIterator make it possible to collect
complicated nestings of items.
FromParallelIterator<(A, B)> for (FromA, FromB) works like unzip.FromParallelIterator<Either<L, R>> for (A, B) works like partition_map.Range and RangeInclusive.FromParallelIterator and ParallelExtend for
Vec<T> now uses MaybeUninit<T> internally to avoid creating any
references to uninitialized data.ParallelBridge fixed a bug with threads missing available work.Thanks to all of the contributors for this release!
chore: Release rayon version 1.9.0
chore: Release rayon version 1.9.0
IndexedParallelIterator::by_exponential_blocks and
by_uniform_blocks allow processing items in smaller groups at a time.iter::walk_tree, walk_tree_prefix, and walk_tree_postfix
functions enable custom parallel iteration over tree-like structures.ParallelIterator::collect_vec_list returns items as a linked
list of vectors, which is an efficient mode of parallel collection used by
many of the internal implementations of collect.ParallelSliceMut::par_split_inclusive_mut,
ParallelSlice::par_split_inclusive, and
ParallelString::par_split_inclusive all work like a normal split but
keeping the separator as part of the left slice.ParallelString::par_split_ascii_whitespace splits only on ASCII
whitespace, which is faster than including Unicode multi-byte whitespace.OsString now implements FromParallelIterator<_> and ParallelExtend<_>
for a few item types similar to the standard FromIterator and Extend.Pattern trait for string methods is now implemented for
[char; N] and &[char; N], matching any of the given characters.chore: Release rayon version 1.8.1
chore: Release rayon version 1.8.1
chore: Release rayon version 1.8.0
chore: Release rayon version 1.8.0
IntoParallelIterator for Range<char> and RangeInclusive<char>
with the same iteration semantics as Rust 1.45.scope closure.Thanks to all of the contributors for this release!
Fixed a use-after-free race in calls blocked between two rayon thread pools.
Vec now drops any partial writes while unwinding,
rather than just leaking them. If dropping also panics, Rust will abort.
IndexedParallelIterator::step_by() adapts an iterator to step
through items by the given count, like Iterator::step_by().ParallelSlice::par_chunks_exact() and mutable equivalent
ParallelSliceMut::par_chunks_exact_mut() ensure that the chunks always have
the exact length requested, leaving any remainder separate, like the slice
methods chunks_exact() and chunks_exact_mut().Thanks to all of the contributors for this release!
chore: Release rayon version 1.7.0
chore: Release rayon version 1.7.0
IntoParallelIterator, creating a
MultiZip iterator that produces items as similarly-shaped tuples.--cfg=rayon_unstable supporting code for rayon-futures is removed.rustc is now 1.31.Thanks to all of the contributors for this release!
Simplified par_bridge to only pull one item at a time from the iterator, without batching. Threads that are waiting for iterator items will now block
par_bridge to 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!)par_bridge, so iterators that also
invoke rayon will not cause mutex recursion deadlocks.The new ParallelIterator::copied() converts an iterator of references into copied values, like Iterator::copied().
ParallelIterator::copied() converts an iterator of references into
copied values, like Iterator::copied().ParallelExtend is now implemented for the unit ().rustc is now 1.28.Thanks to all of the contributors for this release!
The breadth_first configuration flag, which globally approximated this effect, is now deprecated.
spawn_fifo() and scope_fifo()
global functions, and their corresponding ThreadPool methods.
join are not affected.breadth_first configuration flag, which globally approximated this
effect, is now deprecated.ThreadPoolBuilder can now take a custom spawn_handler to 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.std::thread.ParallelIterator has 3 new methods: find_map_any(), find_map_first(),
and find_map_last(), like Iterator::find_map() with ordering constraints.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.IntoParallelIterator is now implemented for integral RangeInclusive.Folders now have optimized consume_iter implementations.rayon_core::current_thread_index() is now re-exported in rayon.rustc is now 1.26, following the update policy defined in RFC 3.Thanks to all of the contributors for this release!
The new flat_map_iter and flatten_iter methods can be used to flatten sequential iterators, which may perform better in cases that don't need the nest
flat_map_iter and flatten_iter methods can be used to flatten
sequential iterators, which may perform better in cases that don't need the
nested parallelism of flat_map and flatten.par_drain method is a parallel version of the standard drain for
collections, removing items while keeping the original capacity. Collections
that implement this through ParallelDrainRange support draining items from
arbitrary index ranges, while ParallelDrainFull always drains everything.positions method finds all items that match the given predicate and
returns their indices in a new iterator.The new ThreadPoolBuilder replaces and deprecates Configuration.
ParallelIterator added the update method which applies a function to
mutable references, inspired by itertools.IndexedParallelIterator added the chunks method which yields vectors of
consecutive items from the base iterator, inspired by itertools.String now implements FromParallelIterator<Cow<str>> and
ParallelExtend<Cow<str>>, inspired by std.() now implements FromParallelIterator<()>, inspired by std.ThreadPoolBuilder replaces and deprecates Configuration.
ThreadPoolBuildError
type, rather than Box<Error>, and this type implements Send and Sync.ThreadPool::new is deprecated in favor of ThreadPoolBuilder::build.initialize is deprecated in favor of ThreadPoolBuilder::build_global.IndexedParallelIterator::len and ParallelIterator::opt_len now operate on
&self instead of &mut self.IndexedParallelIterator::collect_into is now collect_into_vec.IndexedParallelIterator::unzip_into is now unzip_into_vecs.Configuration and initialize from
rayon-core.Thanks to all of the contributors for this release!
Nothing published for this version
Nothing published for this version
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.#[must_use]for_each_with adapter, similar to
map_with.#[cfg] flag. This means that to see the unstable APIs, you must do
RUSTFLAGS='--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.Removed the deprecated weight APIs.
map_with and fold_with combinators, which help for
passing along state (like channels) that cannot be shared between
threads but which can be cloned on each thread split.while_some combinator, which helps for writing short-circuiting iterators.Option<T> or Result<T, E> into a
Option<Collection<T>> or Result<Collection<T>, E>.FromParallelIterator for Cow.BoundedParallelIterator and ExactParallelIterator traits,
which were not serving much purpose.Send impls.spawn_async and
spawn_future_async -- which spawn tasks that cannot hold
references -- to simply spawn and spawn_future, respectively.current_thread_index, for querying the index of the current worker thread within
its thread pool (previously available as thread_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.RAYON_NUM_THREADS and RAYON_LOG. The older variables (e.g.,
RAYON_RS_NUM_CPUS are still supported but deprecated).Thanks to the following contributors:
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
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.
Added more documentation for rayon::split().
rayon::iter::split().Thanks to all of the contributors for this release!
Nothing published for this version
Nothing published for this version
Your coding agent can read these notes before it upgrades. Set up the MCP server →