Crates / compact_str / Alternatives
Rust crate alternatives · data Oct 24, 2026
Alternatives to compact_str
Short answerThe closest alternatives to compact_str on crates.io data are bstr (1.3M real downloads a day), widestring (308K real downloads a day), aho-corasick (3.3M real downloads a day). Of the 8 we list, the most used is aho-corasick, and 6 shipped a release in the last year. compact_str itself gets 712,106 a day with 575 dependents.
Every alternative we found
| Alternative | Real downloads a day | vs compact_str | Dependents | Last release | Why it is listed | |
|---|---|---|---|---|---|---|
| bstr Established | 1,252,630 | 1.76x | 676 | 2mo | category Encoding, category Text processing, keyword "string" | side by side |
| widestring Established | 308,184 | 0.43x | 319 | 12mo | category Encoding, category Text processing, keyword "string" | compare |
| aho-corasick Established | 3,331,047 | 4.68x | 655 | 3mo | category Text processing, keyword "string" | compare |
| strsim Established | 2,956,166 | 4.15x | 733 | 2.6y | category Text processing, keyword "string" | compare |
| strum_macros Widely used | 1,935,017 | 2.72x | 2,140 | 8mo | category Parsing tools, keyword "string" | compare |
| strum Widely used | 1,901,257 | 2.67x | 5,075 | 8mo | category Parsing tools, keyword "string" | compare |
| convert_case Widely used | 1,687,092 | 2.37x | 1,213 | 58d | category Text processing, keyword "string" | compare |
| zeroize_derive Pulled in | 979,424 | 1.38x | 26 | 4mo | category Memory management, keyword "memory" | compare |
How to choose
- Same job, not the same API. Each line is listed because it shares a crates.io category or keyword with compact_str; 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 compact_str: 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 compact_str, 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: Established and steady. 1,252,630 real downloads a day.bstrRust crate. A string type that is not required to be valid UTF-8. Real use: 1.3M downloads a day on quiet days; 676 crates depend on it.Read it next →Also worth your time