# hashbrown

> SwissTable-based HashMap and HashSet for Rust, the implementation behind the standard library's

Source: https://talira.ai/catalog/hashbrown-ewttdp0d
Every listing: https://talira.ai/catalog.md

- Kind: Open source
- Types: Library
- Categories: [libraries / data structures / hashes](https://talira.ai/categories/libraries/data-structures/hashes), [languages / rust](https://talira.ai/categories/languages/rust)
- Licence: Apache-2.0 OR MIT[^2][^3]
- Pricing: Free and open source[^1]
- Free tier: yes[^1]
- Backed by: [The Rust Project](https://talira.ai/orgs/rust-project.md)

hashbrown provides the implementation of Rust's standard library HashMap and HashSet, outside the standard library's stability guarantees. It began as a Rust port of Google's SwissTable hash map and is a drop-in replacement for the standard types: about twice as fast as the old standard HashMap, 1 byte of overhead per entry, SIMD lookups, no allocation for empty maps, and no_std support with a global allocator. It's a Rust Project crate.

## Links

- GitHub: https://github.com/rust-lang/hashbrown
- Docs: https://rust-lang.github.io/hashbrown

## Problems it solves

- a faster hash map for Rust than the standard one
- use HashMap and HashSet in a no_std Rust crate
- a Rust hash map with lower memory overhead per entry

## Features

- Drop-in replacement for the standard HashMap and HashSet
- foldhash as the default hasher
- 1 byte of overhead per entry and no allocation for empty maps
- SIMD lookups across several entries at once
- no_std support (with a global allocator), plus optional serde and rayon support

## Limitations

- Its default hasher, foldhash, doesn't resist HashDoS as well as SipHash; use another hasher when that matters.[^1]

## Trust

Overall: 0.62 out of 1.
Signals: maintenance 0.88, adoption 0.70, momentum 0.45, community 0.86, backing 0.30, extensibility 0.00.

- last commit 2 days ago
- 42 commits in the last 90 days
- latest release v0.17.2 8 days ago
- 3.0k GitHub stars
- 142 contributors
- backed by The Rust Project

## Alternatives

- [rustc-hash](https://talira.ai/catalog/rustc-hash-90ymt30n.md): The fast, non-cryptographic FxHasher that rustc uses, with FxHashMap and FxHashSet
- [Rust-PHF](https://talira.ai/catalog/rust-phf-45g8awr0.md): Compile-time perfect-hash lookup tables for Rust
- [indexmap](https://talira.ai/catalog/indexmap-jmq3c2ec.md): Rust hash map and set that keep insertion order and index entries

## Sources

[^1]: https://github.com/rust-lang/hashbrown (checked 28 Nov 2026)
[^2]: https://github.com/rust-lang/hashbrown/blob/main/LICENSE-APACHE (checked 28 Nov 2026)
[^3]: https://github.com/rust-lang/hashbrown/blob/main/LICENSE-MIT (checked 28 Nov 2026)
