Skip to content

Commit 5ce7f4b

Browse files
committed
Introduce a changelog
1 parent 9bd1943 commit 5ce7f4b

File tree

1 file changed

+85
-0
lines changed

1 file changed

+85
-0
lines changed

CHANGELOG.md

+85
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
# Changelog
2+
3+
All notable changes to this project will be documented in this file.
4+
5+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
6+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7+
8+
## [2.0.0] - Unreleased
9+
10+
[2.0.0]: https://github.com/shepmaster/twox-hash/tree/v2.0.0
11+
12+
This release is a complete rewrite of the crate, including
13+
reorganization of the code. The XXH3 algorithm now matches the 0.8
14+
release of the reference C xxHash implementation.
15+
16+
### Added
17+
18+
- `XxHash32::oneshot` and `XxHash64::oneshot` can perform hashing with
19+
zero allocation and generally improved performance. If you have code
20+
that creates a hasher and hashes a slice of bytes exactly once, you
21+
are strongly encouraged to use the new functions. This might look
22+
like:
23+
24+
```rust
25+
// Before
26+
let mut hasher = XxHash64::new(); // or XxHash32, or with seeds
27+
some_bytes.hash(&mut hasher);
28+
let hash = hasher.finish();
29+
30+
// After
31+
let hash = XxHash64::oneshot(some_bytes);
32+
```
33+
34+
- There is a feature flag for each hashing implementation. It is
35+
recommended that you opt-out of the crate's default features and
36+
only select the implementations you need to improve compile speed.
37+
38+
### Changed
39+
40+
- The crates minimum supported Rust version (MSRV) is now 1.81.
41+
42+
- Functional and performance comparisons are made against the
43+
reference C xxHash library version 0.8.2, which includes a stable
44+
XXH3 algorithm.
45+
46+
- Support for randomly-generated hasher instances is now behind the
47+
`random` feature flag. It was previously combined with the `std`
48+
feature flag.
49+
50+
### Removed
51+
52+
- The deprecated type aliases `XxHash` and `RandomXxHashBuilder` have
53+
been removed. Replace them with `XxHash64` and
54+
`xxhash64::RandomState` respectively.
55+
56+
- `RandomXxHashBuilder32` and `RandomXxHashBuilder64` are no longer
57+
available at the top-level of the crate. Replace them with
58+
`xxhash32::RandomState` and ``xxhash64::RandomState` respectively.
59+
60+
- `Xxh3Hash64` and `xx3::Hash64` have been renamed to `XxHash3_64` and
61+
`xxhash3_64::Hasher` respectively.
62+
63+
- The free functions `xxh3::hash64`, `xxh3::hash64_with_seed`, and
64+
`xxh3::hash64_with_secret` are now associated functions of
65+
`xxhash3_64::Hasher`: `oneshot`, `oneshot_with_seed` and
66+
`oneshot_with_secret`. Note that the argument order has changed.
67+
68+
- Support for the [digest][] crate has been removed. The digest crate
69+
is for **cryptographic** hash functions and xxHash is
70+
**non-cryptographic**.
71+
72+
- `XxHash32` and `XxHash64` no longer implement `Copy`. This prevents
73+
accidentally mutating a duplicate instance of the state instead of
74+
the original state. `Clone` is still implemented so you can make
75+
deliberate duplicates.
76+
77+
- The XXH3 128-bit variant is not yet re-written. Work is in progress
78+
for this.
79+
80+
- We no longer provide support for randomly-generated instances of the
81+
XXH3 64-bit variant. The XXH3 algorithm takes both a seed and a
82+
secret as input and deciding what to randomize is non-trivial and
83+
can have negative impacts on performance.
84+
85+
[digest]: https://docs.rs/digest/latest/digest/

0 commit comments

Comments
 (0)