NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
crates.io · #779 most downloaded on crates.io
Derives arbitrary traits
Last release today
06 Oct 2026
Release timing varies
gaps range from 9 days to 1.1 years
Nearly every release is documented
notes for 31 of 32 stable releases
Nothing withdrawn
no release was ever pulled
8 years old
34 releases · first in 2018
Added support for deriving Arbitrary for types with raw identifiers.
Released 2026-10-05.
Arbitrary for types with raw identifiers.derive_arbitrary to syn 3. This raises the MSRV from 1.63.0 to
1.71.0, which is the MSRV of syn 3.derive_arbitrary to include fixes for fully qualified paths.Added formal MSRV policy: "We reserve the right to increment the MSRV on minor releases, however we will strive to only do it deliberately and for goo
Released 2025-08-13.
Arbitrary implementation for core::cmp::Reverse.#[derive(Arbitrary)]
that speed up compilation.One column per quarter.
Released 2024-11-05. --------------------------------------------------------------------------------
Released 2024-11-05.
Added an Arbitrary implementation for PhantomPinned.
Released 2024-10-30.
Arbitrary implementation for PhantomPinned.Unstructured::choose_iter helper method.#[arbitrary(skip)] for enum variants in the derive macro.Arbitrary::try_size_hint trait method.Arbitrary for PhantomData<A> even when A does not implement
Arbitrary and when A is ?Sized.usize's underlying encoding independent of machine word size so that
corpora are more portable.derive(Arbitrary) work for local definitions of struct Option.Added Arbitrary implementations for Arc<[T]> and Rc<[T]>. #160
derive_arbitrary v1.3.1
derive_arbitrary v1.3.1
Released 2023-10-11.
arbitrary_take_rest where <Vec<Vec<u8>>>::arbitrary_take_rest would never
generate vec![vec![]] for example. See
#159 for details.Added the ability to manually specify derived trait bounds for Arbitrary. See #138 for details.
Released 2023-03-13.
Arbitrary. See #138 for
details.syn.bump arbitrary_derive to 1.2.3
bump arbitrary_derive to 1.2.3
Released 2023-01-20.
derive(Arbitrary) will now annotate the generated impls with a #[automatically_derived]
attribute to indicate to e.g. clippy that lints should not fire for the code within the derived
implementation.Ensured that arbitrary and derive_arbitrary versions are synced up so that they don't, e.g., emit generated code that depends on newer versions of arb
Released 2023-01-03.
arbitrary and derive_arbitrary versions are synced up so that
they don't, e.g., emit generated code that depends on newer versions of
arbitrary than the one currently in
use. #134Fixed an issue where std::thread_local! macro invocations in derive code were not fully prefixed, causing confusing build errors in certain situations
std::thread_local! macro invocations in derive code
were not fully prefixed, causing confusing build errors in certain situations.Support custom arbitrary implementation for fields on derive. #129
Fixed a potential panic due to an off-by-one error in the Arbitrary implementation for std::Bound .
Released 2022-09-20.
Arbitrary
implementation for std::ops::Bound<T>.Implemented Arbitrary for std::Bound .
Released 2022-09-08.
Arbitrary for std::ops::Bound<T>.Unstructured::int_in_range could return out-of-range
integers when generating arbitrary signed integers.Implemented Arbitrary for Rc and Arc
Released 2022-08-29.
Arbitrary for Rc<str> and Arc<str>arbitrary::ResultUnstructured::arbitrary_loop method will consume fewer bytes of input
now.Unstructured::int_in_range could return out-of-range
integers.Fixed some potential (but highly unlikely) name-clashes inside derive(Arbitrary)'s generated code. #111
Fixed a warning inside derive(Arbitrary)-generated code. #110
Fixed a stack overflow when using derive(Arbitrary) with recursive types and empty inputs. #109
Released 2022-06-14.
derive(Arbitrary) with recursive types and
empty inputs. #109Added the Unstructured::ratio method to generate a boolean that is true at the given rate.
Released 2022-02-09.
Added the Unstructured::ratio method to generate a boolean that is true at
the given rate.
Added the Unstructured::arbitrary_loop method to call a function an
arbitrary number of times.
Arbitrary impls for HashMaps and HashSets with custom Hashers #87
Arbitrary impls for NonZeroX types #79
See 1.0.0-rc1 and 1.0.0-rc2 for changes since 0.4.7, which was the last main line release.
Released 2020-02-24.
See 1.0.0-rc1 and 1.0.0-rc2 for changes since 0.4.7, which was the last main line release.
The Arbitrary trait is now implemented for &[u8]. #67
The Arbitrary trait is now implemented for &str. #63
Released 2020-11-25.
Arbitrary trait is now implemented for &str. #63Arbitrary trait now has a lifetime parameter, allowing Arbitrary implementations that borrow from the raw input (e.g. the new &str implementaton). The derive(Arbitrary) macro also supports deriving Arbitrary on types with lifetimes now. #63The shrink method on the Arbitrary trait has been removed.
We have found that, in practice, using internal reduction via approaches like cargo fuzz tmin, where the raw input bytes are reduced rather than the T: Arbitrary type constructed from those raw bytes, has the best efficiency-to-maintenance ratio. To the best of our knowledge, no one is relying on or using the Arbitrary::shrink method. If you are using and relying on the Arbitrary::shrink method, please reach out by dropping a comment here and explaining how you're using it and what your use case is. We'll figure out what the best solution is, including potentially adding shrinking functionality back to the arbitrary crate.
Added an optimization to avoid unnecessarily consuming bytes from the underlying data when there is only one possible choice in Unstructured::{int_in_
Released 2020-10-14.
Added an optimization to avoid unnecessarily consuming bytes from the
underlying data when there is only one possible choice in
Unstructured::{int_in_range, choose, etc..}.
Added license files to the derive crate.
Arbitrary implementation for std::time::Duration should now be faster
and produce durations with a more-uniform distribution of nanoseconds.Added the Unstructured::peek_bytes method.
Released 2020-08-22.
Unstructured::peek_bytes method.Test case reduction via cargo fuzz tmin should be much more effective at
reducing the sizes of collections now. (See
#53 and the commit messages
for details.)
Fuzzing with mutation-based fuzzers (like libFuzzer) should be more efficient now. (See #53 and the commit messages for details)
Implement Arbitrary for zero length arrays.
Released 2020-06-18.
Arbitrary for zero length arrays.Arbitrary for Range and RangeInclusive.Fixed the custom derive for enums when used via its full path (like #[derive(arbitrary::Arbitrary)] rather than like #[derive(Arbitrary)]).
Released 2020-04-29.
#[derive(arbitrary::Arbitrary)] rather than like #[derive(Arbitrary)]).Fixed the custom derive when used via its full path (like #[derive(arbitrary::Arbitrary)] rather than like #[derive(Arbitrary)]).
Released 2020-04-28.
#[derive(arbitrary::Arbitrary)] rather than like #[derive(Arbitrary)]).We forgot to release a new version of the derive_arbitrary crate last release. This release fixes that and so the synstructure dependency is finally a
Released 2020-04-17.
derive_arbitrary crate last
release. This release fixes that and so the synstructure dependency is
finally actually removed in the cargo releases.This is technically a breaking change, but we expect that nearly everyone should be able to upgrade without any compilation errors. The only exception…
Released 2020-01-22.
This is technically a breaking change, but we expect that nearly everyone should
be able to upgrade without any compilation errors. The only exception is if you
were implementing the Arbitrary::size_hint method by hand. If so, see the
"changed" section below and the API docs for
Arbitrary::shrink
for details.
arbitary::size_hint::recursion_guard helper
function for guarding against infinite recursion in
size_hint implementations for recursive types.Arbitrary::size_hint signature now takes a depth: usize
parameter. This should be passed along unmodified to any nested calls of other
size_hint methods. If you're implementing size_hint for a recursive type
(like a linked list or tree) or a generic type with type parameters, you
should use the new arbitrary::size_hint::recursion_guard helper
function.size_hint implementations
from #[derive(Arbitrary)] for recursive types.Nothing published for this version
Fixed some links and version numbers in README.
Released 2020-01-14.
Added the "derive" cargo feature, to enable #[derive(Arbitrary)] for custom types. Enabling this feature re-exports functionality from the derive_arbi
Released 2020-01-14.
"derive" cargo feature, to enable #[derive(Arbitrary)] for
custom types. Enabling this feature re-exports functionality from the
derive_arbitrary crate.Arbitrary implements the shrink method for you now.Arbitrary for std types implement shrinking now.Arbitrary::arbitrary_take_rest method allows an Arbitrary
implementation to consume all of the rest of the remaining raw input. It has a
default implementation that forwards to Arbitrary::arbitrary and the custom
derive creates a smart implementation for your custom types.Arbitrary::size_hint method for hinting how many raw bytes an
implementation needs to construct itself. This has a default implementation,
but the custom derive creates a smart implementation for your custom types.Unstructured::choose method to choose one thing among a set of
choices.Unstructured::arbitrary_len method to get an arbitrary length for
a collection of some arbitrary type.Unstructured::arbitrary_iter method to create an iterator of
arbitrary instance of some type.Arbitrary trait was simplified a bit.Unstructured is a concrete type now, not a trait.RingBuffer and FiniteBuffer are removed. Use Unstructured instead.Arbitrary implementation for char.Arbitrary implementation for String.--------------------------------------------------------------------------------
Your coding agent can read these notes before it upgrades. Set up the MCP server →