1[package]
2name = "ahash"
3version = "0.8.7"
4authors = ["Tom Kaitchuck <Tom.Kaitchuck@gmail.com>"]
5license = "MIT OR Apache-2.0"
6description = "A non-cryptographic hash function using AES-NI for high performance"
7documentation = "https://docs.rs/ahash"
8repository = "https://github.com/tkaitchuck/ahash"
9keywords = ["hash", "hasher", "hashmap", "aes", "no-std"]
10categories = ["algorithms", "data-structures", "no-std"]
11edition = "2018"
12readme = "README.md"
13build = "./build.rs"
14exclude = ["/smhasher", "/benchmark_tools"]
15rust-version = "1.60.0"
16
17[lib]
18name = "ahash"
19path = "src/lib.rs"
20test = true
21doctest = true
22bench = true
23doc = true
24
25[features]
26default = ["std", "runtime-rng"]
27
28# Enabling this will enable `AHashMap` and `AHashSet`.
29std = []
30
31# Runtime random key generation using getrandom.
32runtime-rng = ["getrandom"]
33
34# This is an alternative to runtime key generation which does compile time key generation if runtime-rng is not available.
35# (If runtime-rng is enabled this does nothing.)
36# If this is on (and runtime-rng is off) it implies the produced binary will not be identical.
37# If this is disabled and runtime-rng is unavailable constant keys are used.
38compile-time-rng = ["const-random"]
39
40# Do not use any random number generator (either at compile time or runtime)
41# If either runtime-rng or compile-time-rng are enabled this does nothing.
42no-rng = []
43
44# in case this is being used on an architecture lacking core::sync::atomic::AtomicUsize and friends
45atomic-polyfill = [ "dep:atomic-polyfill", "once_cell/atomic-polyfill"]
46
47# Nightly-only support for AES intrinsics on 32-bit ARM
48nightly-arm-aes = []
49
50[[bench]]
51name = "ahash"
52path = "tests/bench.rs"
53harness = false
54
55[[bench]]
56name = "map"
57path = "tests/map_tests.rs"
58harness = false
59
60[profile.test]
61opt-level = 2
62lto = 'fat'
63
64[profile.release]
65opt-level = 3
66debug = false
67lto = 'fat'
68debug-assertions = false
69codegen-units = 1
70
71[profile.bench]
72opt-level = 3
73debug = false
74lto = 'fat'
75debug-assertions = false
76codegen-units = 1
77
78[build-dependencies]
79version_check = "0.9.4"
80
81[dependencies]
82const-random = { version = "0.1.17", optional = true }
83serde = { version = "1.0.117", optional = true }
84cfg-if = "1.0"
85atomic-polyfill = { version="1.0.1", optional=true}
86getrandom = { version = "0.2.7", optional = true }
87zerocopy = { version = "0.7.31", default-features = false, features = ["simd"] }
88
89[target.'cfg(not(all(target_arch = "arm", target_os = "none")))'.dependencies]
90once_cell = { version = "1.18.0", default-features = false, features = ["alloc"] }
91
92[dev-dependencies]
93no-panic = "0.1.10"
94criterion = {version = "0.3.2", features = ["html_reports"] }
95seahash = "4.0"
96fnv = "1.0.5"
97fxhash = "0.2.1"
98hex = "0.4.2"
99rand = "0.8.5"
100serde_json = "1.0.59"
101hashbrown = "0.12.3"
102
103[package.metadata.docs.rs]
104rustc-args = ["-C", "target-feature=+aes"]
105rustdoc-args = ["-C", "target-feature=+aes"]
106features = ["std"]
107