Rust crate alternatives · data Oct 24, 2026
Alternatives to indoc
Short answerThe closest alternatives to indoc on crates.io data are unindent (380K real downloads a day), aho-corasick (3.3M real downloads a day), strsim (3M real downloads a day). Of the 8 we list, the most used is aho-corasick, and 4 shipped a release in the last year. indoc itself gets 810,408 a day with 1,667 dependents.
Every alternative we found
| Alternative | Real downloads a day | vs indoc | Dependents | Last release | Why it is listed | |
|---|---|---|---|---|---|---|
| unindent Established | 379,604 | 0.47x | 100 | 20mo | category Text processing, keyword "heredoc", keyword "literal" | compare |
| aho-corasick Established | 3,331,047 | 4.11x | 655 | 3mo | category Text processing, keyword "string" | compare |
| strsim Established | 2,956,166 | 3.65x | 733 | 2.6y | category Text processing, keyword "string" | compare |
| convert_case Widely used | 1,687,092 | 2.08x | 1,213 | 58d | category Text processing, keyword "string" | compare |
| bstr Established | 1,252,630 | 1.55x | 676 | 2mo | category Text processing, keyword "string" | compare |
| compact_str Established | 712,106 | 0.88x | 575 | 3mo | category Text processing, keyword "string" | compare |
| widestring Established | 308,184 | 0.38x | 319 | 12mo | category No standard library, category Text processing, keyword "string" | compare |
| maplit Established | 266,928 | 0.33x | 819 | 7.2y | category Rust patterns, keyword "literal" | compare |
How to choose
- Same job, not the same API. Each line is listed because it shares a crates.io category or keyword with indoc; 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 indoc: 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 indoc, 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 losing ground. 379,604 real downloads a day.unindentRust crate. Remove a column of leading whitespace from a string. Real use: 380K downloads a day on quiet days; 100 crates depend on it.Read it next →Also worth your time