| 1 |
[package] |
| 2 |
name = "hashbrown" |
| 3 |
version = "0.16.1" |
| 4 |
authors = ["Amanieu d'Antras <[email protected]>"] |
| 5 |
description = "A Rust port of Google's SwissTable hash map" |
| 6 |
license = "MIT OR Apache-2.0" |
| 7 |
repository = "https://github.com/rust-lang/hashbrown" |
| 8 |
readme = "README.md" |
| 9 |
keywords = ["hash", "no_std", "hashmap", "swisstable"] |
| 10 |
categories = ["data-structures", "no-std"] |
| 11 |
exclude = [".github", "/ci/*"] |
| 12 |
edition = "2021" |
| 13 |
rust-version = "1.65.0" |
| 14 |
|
| 15 |
[dependencies] |
| 16 |
# For the default hasher |
| 17 |
foldhash = { version = "0.2.0", default-features = false, optional = true } |
| 18 |
|
| 19 |
# For external trait impls |
| 20 |
rayon = { version = "1.9.0", optional = true } |
| 21 |
serde_core = { version = "1.0.221", default-features = false, optional = true } |
| 22 |
|
| 23 |
# When built as part of libstd |
| 24 |
core = { version = "1.0.0", optional = true, package = "rustc-std-workspace-core" } |
| 25 |
alloc = { version = "1.0.0", optional = true, package = "rustc-std-workspace-alloc" } |
| 26 |
|
| 27 |
# Support for allocators that use allocator-api2 |
| 28 |
allocator-api2 = { version = "0.2.9", optional = true, default-features = false, features = [ |
| 29 |
"alloc", |
| 30 |
] } |
| 31 |
|
| 32 |
# Equivalent trait which can be shared with other hash table implementations. |
| 33 |
# NB: this is a public dependency because `Equivalent` is re-exported! |
| 34 |
equivalent = { version = "1.0", optional = true, default-features = false } |
| 35 |
|
| 36 |
# serde v1.0.220 is the first version that released with `serde_core`. |
| 37 |
# This is required to avoid conflict with other `serde` users which may require an older version. |
| 38 |
[target.'cfg(any())'.dependencies] |
| 39 |
serde = { version = "1.0.220", default-features = false, optional = true } |
| 40 |
|
| 41 |
[dev-dependencies] |
| 42 |
lazy_static = "1.4" |
| 43 |
rand = { version = "0.9.0", features = ["small_rng"] } |
| 44 |
rayon = "1.2" |
| 45 |
fnv = "1.0.7" |
| 46 |
serde_test = "1.0" |
| 47 |
bumpalo = { version = "3.13.0", features = ["allocator-api2"] } |
| 48 |
|
| 49 |
[target.'cfg(unix)'.dev-dependencies] |
| 50 |
libc = "0.2.155" |
| 51 |
|
| 52 |
[features] |
| 53 |
default = ["default-hasher", "inline-more", "allocator-api2", "equivalent", "raw-entry"] |
| 54 |
|
| 55 |
# Enables use of nightly features. This is only guaranteed to work on the latest |
| 56 |
# version of nightly Rust. |
| 57 |
nightly = ["foldhash?/nightly", "bumpalo/allocator_api"] |
| 58 |
|
| 59 |
# Enables the RustcEntry API used to provide the standard library's Entry API. |
| 60 |
rustc-internal-api = [] |
| 61 |
|
| 62 |
# Internal feature used when building as part of the standard library. |
| 63 |
rustc-dep-of-std = [ |
| 64 |
"nightly", |
| 65 |
"core", |
| 66 |
"alloc", |
| 67 |
"rustc-internal-api", |
| 68 |
] |
| 69 |
|
| 70 |
# Enables serde support. |
| 71 |
serde = ["dep:serde_core", "dep:serde"] |
| 72 |
|
| 73 |
# Enables the deprecated RawEntry API. |
| 74 |
raw-entry = [] |
| 75 |
|
| 76 |
# Provides a default hasher. Currently this is foldhash but this is subject to |
| 77 |
# change in the future. Note that the default hasher does *not* provide HashDoS |
| 78 |
# resistance, unlike the one in the standard library. |
| 79 |
default-hasher = ["dep:foldhash"] |
| 80 |
|
| 81 |
# Enables usage of `#[inline]` on far more functions than by default in this |
| 82 |
# crate. This may lead to a performance increase but often comes at a compile |
| 83 |
# time cost. |
| 84 |
inline-more = [] |
| 85 |
|
| 86 |
[package.metadata.docs.rs] |
| 87 |
features = ["nightly", "rayon", "serde", "raw-entry"] |
| 88 |
rustdoc-args = ["--generate-link-to-definition"] |