Skip to content

Commit 45f21b0

Browse files
committed
Document the feature flags
1 parent 28f0d83 commit 45f21b0

File tree

1 file changed

+21
-3
lines changed

1 file changed

+21
-3
lines changed

README.md

+21-3
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ A Rust implementation of the [xxHash] algorithm.
1515

1616
# Examples
1717

18-
These examples use [`XxHash64`](XxHash64) but the same ideas can be
19-
used for [`XxHash32`](XxHash32) or [`XxHash3_64`](XxHash3_64).
18+
These examples use [`XxHash64`][] but the same ideas can be
19+
used for [`XxHash32`][] or [`XxHash3_64`][].
2020

2121
## Hashing arbitrary data
2222

@@ -45,7 +45,7 @@ let hash = hasher.finish();
4545
assert_eq!(0xeab5_5659_a496_d78b, hash);
4646
```
4747

48-
## In a [`HashMap`](std::collections::HashMap)
48+
## In a [`HashMap`][]
4949

5050
### With a default seed
5151

@@ -80,6 +80,18 @@ hash.insert(42, "the answer");
8080
assert_eq!(hash.get(&42), Some(&"the answer"));
8181
```
8282

83+
# Feature Flags
84+
85+
| name | description |
86+
|------------|---------------------------------------------------------------------------------------------------------|
87+
| xxhash32 | Include the [`XxHash32`][] algorithm |
88+
| xxhash64 | Include the [`XxHash64`][] algorithm |
89+
| xxhash3_64 | Include the [`XxHash3_64`][] algorithm |
90+
| random | Create random instances of the hashers |
91+
| serialize | Serialize and deserialize hasher state with Serde |
92+
| std | Use the Rust standard library. Enable this if you want SIMD support in [`XxHash3_64`][] |
93+
| alloc | Use the Rust allocator library. Enable this if you want to create [`XxHash3_64`][] with dynamic secrets |
94+
8395
# Benchmarks
8496

8597
See benchmarks in the [comparison][] README.
@@ -96,3 +108,9 @@ See benchmarks in the [comparison][] README.
96108
6. Ensure tests pass.
97109
7. Push to the branch (`git push origin my-new-feature`)
98110
8. Create a new Pull Request
111+
112+
113+
[`Hashmap`]: std::collections::HashMap
114+
[`XxHash32`]: crate::XxHash32
115+
[`XxHash64`]: crate::XxHash64
116+
[`XxHash3_64`]: crate::XxHash3_64

0 commit comments

Comments
 (0)