1## Unreleased
2
3Released YYYY-MM-DD.
4
5### Added
6
7* TODO (or remove section if none)
8
9### Changed
10
11* TODO (or remove section if none)
12
13### Deprecated
14
15* TODO (or remove section if none)
16
17### Removed
18
19* TODO (or remove section if none)
20
21### Fixed
22
23* TODO (or remove section if none)
24
25### Security
26
27* TODO (or remove section if none)
28
29--------------------------------------------------------------------------------
30
31## 1.0.3
32
33Released 2021-11-20.
34
35### Fixed
36
37* Fixed documentation for `Unstructured::fill_bytes`. We forgot to update this
38  way back in [#53](https://github.com/rust-fuzz/arbitrary/pull/53) when the
39  behavior changed.
40
41--------------------------------------------------------------------------------
42
43## 1.0.2
44
45Released 2021-08-25.
46
47### Added
48
49* `Arbitrary` impls for `HashMap`s and `HashSet`s with custom `Hasher`s
50  [#87](https://github.com/rust-fuzz/arbitrary/pull/87)
51
52--------------------------------------------------------------------------------
53
54## 1.0.1
55
56Released 2021-05-20.
57
58### Added
59
60* `Arbitrary` impls for `NonZeroX` types [#79](https://github.com/rust-fuzz/arbitrary/pull/79)
61* `Arbitrary` impls for all arrays using const generics [#55](https://github.com/rust-fuzz/arbitrary/pull/55)
62* `Arbitrary` impls for `Ipv4Addr` and `Ipv6Addr` [#84](https://github.com/rust-fuzz/arbitrary/pull/84)
63
64### Fixed
65
66* Use fewer bytes for `Unstructured::int_in_range()` [#80](https://github.com/rust-fuzz/arbitrary/pull/80)
67* Use correct range for `char` generation [#83](https://github.com/rust-fuzz/arbitrary/pull/83)
68
69--------------------------------------------------------------------------------
70
71## 1.0.0
72
73Released 2020-02-24.
74
75See 1.0.0-rc1 and 1.0.0-rc2 for changes since 0.4.7, which was the last main
76line release.
77
78--------------------------------------------------------------------------------
79
80## 1.0.0-rc2
81
82Released 2021-02-09.
83
84### Added
85
86* The `Arbitrary` trait is now implemented for `&[u8]`. [#67](https://github.com/rust-fuzz/arbitrary/pull/67)
87
88### Changed
89
90* Rename `Unstructured#get_bytes` to `Unstructured#bytes`. [#70](https://github.com/rust-fuzz/arbitrary/pull/70)
91* Passing an empty slice of choices to `Unstructured#choose` returns an error. Previously it would panic. [71](https://github.com/rust-fuzz/arbitrary/pull/71)
92
93--------------------------------------------------------------------------------
94
95## 1.0.0-rc1
96
97Released 2020-11-25.
98
99### Added
100
101* The `Arbitrary` trait is now implemented for `&str`. [#63](https://github.com/rust-fuzz/arbitrary/pull/63)
102
103### Changed
104
105* The `Arbitrary` 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. [#63](https://github.com/rust-fuzz/arbitrary/pull/63)
106
107### Removed
108
109* The `shrink` method on the `Arbitrary` trait has been removed.
110
111  We have found that, in practice, using [internal reduction](https://drmaciver.github.io/papers/reduction-via-generation-preview.pdf) 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](https://github.com/rust-fuzz/arbitrary/issues/62) 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.
112
113--------------------------------------------------------------------------------
114
115## 0.4.7
116
117Released 2020-10-14.
118
119### Added
120
121* Added an optimization to avoid unnecessarily consuming bytes from the
122  underlying data when there is only one possible choice in
123  `Unstructured::{int_in_range, choose, etc..}`.
124
125* Added license files to the derive crate.
126
127### Changed
128
129* The `Arbitrary` implementation for `std::time::Duration` should now be faster
130  and produce durations with a more-uniform distribution of nanoseconds.
131
132--------------------------------------------------------------------------------
133
134## 0.4.6
135
136Released 2020-08-22.
137
138### Added
139
140* Added the `Unstructured::peek_bytes` method.
141
142### Changed
143
144* Test case reduction via `cargo fuzz tmin` should be much more effective at
145  reducing the sizes of collections now. (See
146  [#53](https://github.com/rust-fuzz/arbitrary/pull/53) and the commit messages
147  for details.)
148
149* Fuzzing with mutation-based fuzzers (like libFuzzer) should be more efficient
150  now. (See [#53](https://github.com/rust-fuzz/arbitrary/pull/53) and the commit
151  messages for details)
152
153--------------------------------------------------------------------------------
154
155## 0.4.5
156
157Released 2020-06-18.
158
159### Added
160
161* Implement `Arbitrary` for zero length arrays.
162* Implement `Arbitrary` for `Range` and `RangeInclusive`.
163
164--------------------------------------------------------------------------------
165
166## 0.4.4
167
168Released 2020-04-29.
169
170### Fixed
171
172* Fixed the custom derive for enums when used via its full path (like
173  `#[derive(arbitrary::Arbitrary)]` rather than like `#[derive(Arbitrary)]`).
174
175
176## 0.4.3
177
178Released 2020-04-28.
179
180### Fixed
181
182* Fixed the custom derive when used via its full path (like
183  `#[derive(arbitrary::Arbitrary)]` rather than like `#[derive(Arbitrary)]`).
184
185--------------------------------------------------------------------------------
186
187## 0.4.2
188
189Released 2020-04-17.
190
191### Changed
192
193* We forgot to release a new version of the `derive_arbitrary` crate last
194  release. This release fixes that and so the `synstructure` dependency is
195  finally actually removed in the cargo releases.
196
197--------------------------------------------------------------------------------
198
199## 0.4.1
200
201Released 2020-03-18.
202
203### Removed
204
205* Removed an internal dependency on the `synstructure` crate when the `derive`
206  feature is enabled. This should not have any visible downstream effects other
207  than faster build times!
208
209--------------------------------------------------------------------------------
210
211## 0.4.0
212
213Released 2020-01-22.
214
215This is technically a breaking change, but we expect that nearly everyone should
216be able to upgrade without any compilation errors. The only exception is if you
217were implementing the `Arbitrary::size_hint` method by hand. If so, see the
218"changed" section below and the [API docs for
219`Arbitrary::shrink`](https://docs.rs/arbitrary/0.4.0/arbitrary/trait.Arbitrary.html#method.size_hint)
220for details.
221
222### Added
223
224* Added [the `arbitary::size_hint::recursion_guard` helper
225  function][recursion_guard] for guarding against infinite recursion in
226  `size_hint` implementations for recursive types.
227
228### Changed
229
230* The `Arbitrary::size_hint` signature now takes a `depth: usize`
231  parameter. This should be passed along unmodified to any nested calls of other
232  `size_hint` methods. If you're implementing `size_hint` for a recursive type
233  (like a linked list or tree) or a generic type with type parameters, you
234  should use [the new `arbitrary::size_hint::recursion_guard` helper
235  function][recursion_guard].
236
237### Fixed
238
239* Fixed infinite recursion in generated `size_hint` implementations
240  from `#[derive(Arbitrary)]` for recursive types.
241
242[recursion_guard]: https://docs.rs/arbitrary/0.4.0/arbitrary/size_hint/fn.recursion_guard.html
243
244--------------------------------------------------------------------------------
245
246## 0.3.2
247
248Released 2020-01-16.
249
250### Changed
251
252* Updated the custom derive's dependencies.
253
254--------------------------------------------------------------------------------
255
256## 0.3.2
257
258Released 2020-01-15.
259
260### Fixed
261
262* Fixed an over-eager assertion condition in `Unstructured::int_in_range` that
263  would incorrectly trigger when given valid ranges of length one.
264
265--------------------------------------------------------------------------------
266
267## 0.3.1
268
269Released 2020-01-14.
270
271### Fixed
272
273* Fixed some links and version numbers in README.
274
275--------------------------------------------------------------------------------
276
277## 0.3.0
278
279Released 2020-01-14.
280
281### Added
282
283* Added the `"derive"` cargo feature, to enable `#[derive(Arbitrary)]` for
284  custom types. Enabling this feature re-exports functionality from the
285  `derive_arbitrary` crate.
286* The custom derive for `Arbitrary` implements the shrink method for you now.
287* All implementations of `Arbitrary` for `std` types implement shrinking now.
288* Added the `Arbitrary::arbitrary_take_rest` method allows an `Arbitrary`
289  implementation to consume all of the rest of the remaining raw input. It has a
290  default implementation that forwards to `Arbitrary::arbitrary` and the custom
291  derive creates a smart implementation for your custom types.
292* Added the `Arbitrary::size_hint` method for hinting how many raw bytes an
293  implementation needs to construct itself. This has a default implementation,
294  but the custom derive creates a smart implementation for your custom types.
295* Added the `Unstructured::choose` method to choose one thing among a set of
296  choices.
297* Added the `Unstructured::arbitrary_len` method to get an arbitrary length for
298  a collection of some arbitrary type.
299* Added the `Unstructured::arbitrary_iter` method to create an iterator of
300  arbitrary instance of some type.
301
302### Changed
303
304* The `Arbitrary` trait was simplified a bit.
305* `Unstructured` is a concrete type now, not a trait.
306* Switched to Rust 2018 edition.
307
308### Removed
309
310* `RingBuffer` and `FiniteBuffer` are removed. Use `Unstructured` instead.
311
312### Fixed
313
314* Better `Arbitrary` implementation for `char`.
315* Better `Arbitrary` implementation for `String`.
316
317--------------------------------------------------------------------------------
318
319## 0.2.0
320
321--------------------------------------------------------------------------------
322
323## 0.1.0
324