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