hashbrown

Rust port of Google's SwissTable hash map, the engine behind std's HashMap

Library
Cargo
v0.17.1
2,979stars
Apache License 2.0

Repository Health

Pre-computed score based on development activity, maintenance, community, maturity, and trend momentum.How we score it →
78/100Good
Development Activity76
Maintenance60
Community76
Maturity60
Momentum40

Technical Analysis

AI-assessed by reading the actual repository — architecture, code quality, innovation, and documentation.How we score it →
81/100Excellent
Architecture85
Code Quality88
Innovation82
Learning Curve70

hashbrown is a Rust implementation of Google’s SwissTable hash map design, built as a drop-in replacement for the standard library’s HashMap and HashSet. Since Rust 1.36 the standard library itself has adopted this implementation internally, but the standalone crate remains essential for #[no_std] environments — embedded systems and kernels — where the standard library isn’t available.

Compared to a naive hash table, hashbrown uses SIMD-accelerated lookups to scan multiple entries in parallel, only one byte of per-entry overhead instead of eight, and allocates no memory for empty maps, delivering roughly 2x the throughput of the pre-SwissTable standard library HashMap.

What You Get

  • Drop-in HashMap and HashSet types API-compatible with the Rust standard library’s collections
  • SIMD-accelerated lookups that scan multiple hash table slots in parallel
  • Only one byte of per-entry metadata overhead versus eight bytes in naive designs
  • #[no_std] compatibility (with a global allocator) for embedded systems and kernels
  • Optional serde, rayon parallel-iterator, and custom-equivalence (Equivalent trait) integrations via Cargo features

Common Use Cases

  • Using a fast, low-overhead hash map in #[no_std] embedded or kernel code where std collections aren’t available
  • Squeezing extra performance out of hot-path hash map lookups in latency-sensitive Rust services
  • Building custom hashing-based data structures on top of hashbrown’s lower-level raw table API
  • Serializing/deserializing hash maps with serde support enabled via the serde feature flag

Under The Hood

Architecture - The crate’s core is a raw SIMD-aware hash table (src/raw and table.rs, ~3,200 lines) that implements SwissTable’s group-probing scheme, with HashMap/HashSet built as thin, std-API-compatible wrappers over that raw table; foldhash is used as the fast default hasher, replacing SipHash for non-adversarial workloads. Tech Stack - Nearly pure Rust (99%+), gated behind Cargo feature flags for nightly (unstable optimizations), serde, rayon parallel iterators, raw-entry, and allocator-api2 support, with a CI matrix (ci/ directory, Cross.toml) validating multiple targets and toolchains including no_std configurations. Code Quality - Extensive integration tests (tests/set.rs, tests/serde.rs, tests/rayon.rs, tests/hasher.rs, tests/hasher_unwind.rs, tests/equivalent_trait.rs) plus dedicated benchmark suites (benches/) validate both correctness and performance; the project is one of the most heavily reviewed crates in the Rust ecosystem given its role inside std itself. API Design - The public API deliberately mirrors std::collections::HashMap/HashSet method-for-method, so migrating existing code is close to a drop-in import swap, while advanced users can drop to the raw table API for custom hashing schemes.

Used by 8 apps in this directory

Rust
64%
Apache 2.0

agentgateway

AI Development · Developer Tools

4,420

An open source AI-native proxy that secures, observes, and governs agent-to-LLM, agent-to-tool, and agent-to-agent communication through MCP, A2A, and unified LLM routing.

View details
88
Repo Health
82
Technical
72
Dependency
Built with
Rust64%
Go24%
Updated yesterday
TypeScript
55%
Other

Cap

Team Chat · Video Conferencing

20,986

Open source Loom alternative with GPU-accelerated recording, instant share links, AI summaries, and full self-hosting via Docker Compose.

View details
89
Repo Health
81
Technical
65
Dependency
Built with
TypeScript55%
Rust40%
Updated yesterday
Rust
95%
MIT

Fyrox

Game Development

9,512

A production-ready 2D/3D game engine written in Rust with a built-in scene editor, physics, and hot-reloading game scripts

View details
85
Repo Health
79
Technical
68
Dependency
Built with
Rust95%
Updated yesterday
Rust
96%
Apache 2.0

InfluxDB

Databases · Analytics

31,705

Open-source time-series database built for real-time ingest, fast SQL queries, and embedded Python automation — powered by Apache Arrow and Parquet.

View details
86
Repo Health
76
Technical
72
Dependency
Built with
Rust96%
Updated yesterday
Rust
100%
Other

Meilisearch

Search

59,012

Lightning-fast hybrid search engine with AI-powered semantic and full-text retrieval for modern applications.

View details
90
Repo Health
88
Technical
68
Dependency
Built with
Rust100%
Updated 5 days ago
Rust
72%
MIT

monty

AI Development · Developer Tools

8,079

Run LLM-generated Python code safely inside your agent—no containers, no CPython, no compromise—with sub-microsecond startup.

View details
87
Repo Health
83
Technical
73
Dependency
Built with
Rust72%
Python23%
Updated yesterday
Rust
91%
Apache 2.0

Murr

Databases

107

A RocksDB-based NVMe/S3 cache purpose-built for AI inference workloads — a faster Redis replacement optimized for batch, low-latency, zero-copy reads and writes between data pipelines and inference apps.

View details
63
Repo Health
72
Technical
75
Dependency
Built with
Rust91%
Updated 1 months ago
Rust
97%
MPL 2.0

Sonic

Databases · Search

21,315

Fast, lightweight, schema-less search backend in Rust — microsecond queries, 30MB RAM, no document storage required.

View details
88
Repo Health
88
Technical
73
Dependency
Built with
Rust97%
Updated 3 days ago

Join founders buildingwith open source

Opinionated takes, migration guides, cost-saving tips, and insights from the open source ecosystem.

Subscribe on Substack
Join 750+ subscribers

Search