1 | [package] |
2 | name = "hashbrown" |
3 | version = "0.15.2" |
4 | authors = ["Amanieu d'Antras <amanieu@gmail.com>" ] |
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.1.2" , default-features = false, optional = true } |
18 | |
19 | # For external trait impls |
20 | rayon = { version = "1.2" , optional = true } |
21 | serde = { version = "1.0.25" , 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 | compiler_builtins = { version = "0.1.2" , optional = true } |
26 | alloc = { version = "1.0.0" , optional = true, package = "rustc-std-workspace-alloc" } |
27 | |
28 | # Support for allocators that use allocator-api2 |
29 | allocator-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. |
34 | equivalent = { version = "1.0" , optional = true, default-features = false } |
35 | |
36 | [dev-dependencies] |
37 | lazy_static = "1.4" |
38 | rand = { version = "0.8.3" , features = ["small_rng" ] } |
39 | rayon = "1.2" |
40 | fnv = "1.0.7" |
41 | serde_test = "1.0" |
42 | doc-comment = "0.3.1" |
43 | bumpalo = { version = "3.13.0" , features = ["allocator-api2" ] } |
44 | |
45 | [features] |
46 | default = ["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. |
50 | nightly = ["allocator-api2?/nightly" , "bumpalo/allocator_api" ] |
51 | |
52 | # Enables the RustcEntry API used to provide the standard library's Entry API. |
53 | rustc-internal-api = [] |
54 | |
55 | # Internal feature used when building as part of the standard library. |
56 | rustc-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. |
66 | raw-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. |
71 | default-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. |
76 | inline-more = [] |
77 | |
78 | [package.metadata.docs.rs] |
79 | features = ["nightly" , "rayon" , "serde" , "raw-entry" ] |
80 | rustdoc-args = ["--generate-link-to-definition" ] |
81 | |