| What it is | Compile-time perfect-hash lookup tables for Rust | SwissTable-based HashMap and HashSet for Rust, the implementation behind the standard library's | Rust hash map and set that keep insertion order and index entries |
| Kind | Open source | Open source | Open source |
| Trust | 0.59 | 0.62 | 0.46 |
| Stars | 2242 | 3022 | 2502 |
| Last commit | 2026-11-28 | 2026-11-28 | 2026-09-05 |
| Licence | MIT | Apache-2.0 OR MIT | Apache-2.0 OR MIT |
| Pricing | Free and open source | Free and open source | Free and open source |
| Free tier | Yes | Yes | Yes |
| Self-hostable | — | — | — |
| Ways to run it | — | — | — |
| SOC 2 | — | — | — |
| HIPAA | — | — | — |
| SSO | — | — | — |
| API | — | — | — |
| Plugins | — | — | — |
| MCP server | — | — | — |
| Company | rust-phf | The Rust Project | indexmap-rs |
| Features | - compile-time static maps and sets
- perfect hashing with CHD, experimental ptrhash
- macros or build-script code generation
- no_std support
| - 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
| - IndexMap and IndexSet keep insertion order
- Look entries up by key or by numerical index
- Fast iteration over densely stored entries
- shift_remove keeps relative order; swap_remove is faster
- Works in no_std environments
|
| Limitations | | - Its default hasher, foldhash, doesn't resist HashDoS as well as SipHash; use another hasher when that matters.
| - Insertion order isn't kept after swap_remove or other methods that explicitly reorder entries.
|