Crates / cfg-expr / Alternatives
Rust crate alternatives · data Oct 24, 2026
Alternatives to cfg-expr
Short answerThe closest alternatives to cfg-expr on crates.io data are autocfg (3.8M real downloads a day), version_check (3M real downloads a day), rustc-hash (3M real downloads a day). Of the 8 we list, the most used is syn, and 5 shipped a release in the last year. cfg-expr itself gets 348,087 a day with 22 dependents.
Every alternative we found
| Alternative | Real downloads a day | vs cfg-expr | Dependents | Last release | Why it is listed | |
|---|---|---|---|---|---|---|
| autocfg Pulled in | 3,840,273 | 11.03x | 82 | 5mo | keyword "rustc" | compare |
| version_check Established | 3,006,541 | 8.64x | 170 | 2.2y | keyword "rustc" | compare |
| rustc-hash Widely used | 2,998,135 | 8.61x | 3,505 | 4mo | keyword "rustc" | compare |
| semver Widely used | 2,771,038 | 7.96x | 4,141 | 7mo | keyword "cargo" | compare |
| rustc_version Established | 2,120,948 | 6.09x | 699 | 2.2y | keyword "rustc" | compare |
| rust-ini Established | 307,457 | 0.88x | 260 | 14mo | keyword "cfg" | compare |
| syn Foundational | 8,378,886 | 24.07x | 18,848 | 12d | category Parser implementations | compare |
| serde_json Foundational | 4,294,696 | 12.34x | 113,141 | 13d | category Parser implementations | compare |
How to choose
- Same job, not the same API. Each line is listed because it shares a crates.io category or keyword with cfg-expr; 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 cfg-expr: 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 cfg-expr, 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: Few direct dependents and steady. 3,840,273 real downloads a day.autocfgRust crate. Automatic cfg for Rust compiler features. Real use: 3.8M downloads a day on quiet days; 82 crates depend on it.Read it next →Also worth your time