Cargo Features

[dependencies]
hashbrown = { version = "0.14.3", default-features = false, features = ["nightly", "rustc-internal-api", "rustc-dep-of-std", "raw", "inline-more", "ahash", "rayon", "serde", "rkyv", "allocator-api2", "equivalent"] }
default = ahash, allocator-api2, inline-more

These default features are set whenever hashbrown is added without default-features = false somewhere in the dependency tree.

nightly rustc-dep-of-std?

Enables allocator_api of bumpalo and nightly of optional allocator-api2

Support for allocators that use allocator-api2

rustc-internal-api rustc-dep-of-std?
rustc-dep-of-std = alloc, compiler_builtins, core, nightly, rustc-internal-api
raw

Affects hashbrown::raw

inline-more default

Enables usage of #[inline] on far more functions than by default in this crate. This may lead to a performance increase but often comes at a compile time cost.

Features from optional dependencies

In crates that don't use the dep: syntax, optional dependencies automatically become Cargo features. These features may have been created by mistake, and this functionality may be removed in the future.

alloc rustc-dep-of-std?

Enables rustc-std-workspace-alloc

ahash default

Enables ahash

For the default hasher

Affects map::DefaultHashBuilder

rayon implicit feature

Enables rayon

For external trait impls

Affects hashbrown::raw.rayon, hashbrown::hash_map.rayon, hashbrown::hash_set.rayon, hashbrown::hash_table.rayon

serde implicit feature

Enables serde

serde:

A generic serialization/deserialization framework

rkyv implicit feature

Enables rkyv

rkyv:

Zero-copy deserialization framework for Rust

core rustc-dep-of-std?

Enables rustc-std-workspace-core

When built as part of libstd

compiler_builtins rustc-dep-of-std?
allocator-api2 default
equivalent implicit feature

Enables equivalent

Equivalent trait which can be shared with other hash table implementations.