Crates / phf_macros / Alternatives
Rust crate alternatives · data Oct 24, 2026
Alternatives to phf_macros
Short answerThe closest alternatives to phf_macros on crates.io data are hashbrown (8.9M real downloads a day), indexmap (4.9M real downloads a day), smallvec (3.9M real downloads a day). Of the 8 we list, the most used is hashbrown, and 8 shipped a release in the last year. phf_macros itself gets 1,103,308 a day with 31 dependents.
Every alternative we found
| Alternative | Real downloads a day | vs phf_macros | Dependents | Last release | Why it is listed | |
|---|---|---|---|---|---|---|
| hashbrown Widely used | 8,927,960 | 8.09x | 2,468 | 6mo | category Data structures | compare |
| indexmap Widely used | 4,883,122 | 4.43x | 6,422 | 49d | category Data structures | compare |
| smallvec Widely used | 3,868,589 | 3.51x | 4,345 | 1d | category Data structures | compare |
| bytes Foundational | 3,424,140 | 3.10x | 17,656 | 4mo | category Data structures | compare |
| either Widely used | 3,049,603 | 2.76x | 1,488 | 18d | category Data structures | compare |
| slab Established | 3,013,568 | 2.73x | 619 | 9mo | category Data structures | compare |
| equivalent Pulled in | 2,919,252 | 2.65x | 44 | 11d | category Data structures | compare |
| generic-array Established | 2,819,219 | 2.56x | 542 | 2mo | category Data structures | compare |
How to choose
- Same job, not the same API. Each line is listed because it shares a crates.io category or keyword with phf_macros; read its description before you swap.
- More dependents means more answered questions and a smaller chance it disappears.
- Check the last release against how fast you need fixes. For phf_macros: is it still maintained?
Rules
Alternatives = tracked crates (top 1000 by downloads) that share a specific crates.io category (2 points each) or keyword (3 points each) with phf_macros, most similar first; its own parts (same name prefix) and crates it depends on or that depend on it are left out, because those are companions, not substitutes. Real downloads = quiet-day median, crates.io data Oct 24, 2026. Built when we find 3 or more.
Up next
The closest alternative: Widely used and steady. 8,927,960 real downloads a day.hashbrownRust crate. A Rust port of Google's SwissTable hash map. Real use: 8.9M downloads a day on quiet days; 2,468 crates depend on it.Read it next →Also worth your time