Crates / proc-macro2 / Alternatives
Rust crate alternatives · data Oct 24, 2026
Alternatives to proc-macro2
Short answerThe closest alternatives to proc-macro2 on crates.io data are strum (1.9M real downloads a day), pin-project-lite (3.3M real downloads a day), pin-project (1.5M real downloads a day). Of the 8 we list, the most used is pin-project-lite, and 7 shipped a release in the last year. proc-macro2 itself gets 4,890,919 a day with 16,351 dependents.
Every alternative we found
| Alternative | Real downloads a day | vs proc-macro2 | Dependents | Last release | Why it is listed | |
|---|---|---|---|---|---|---|
| strum Widely used | 1,901,257 | 0.39x | 5,075 | 8mo | category Procedural macro helpers, keyword "macros" | side by side |
| pin-project-lite Widely used | 3,270,978 | 0.67x | 1,708 | 8mo | keyword "macros" | compare |
| pin-project Widely used | 1,484,314 | 0.30x | 1,406 | 5mo | keyword "macros" | compare |
| paste Widely used | 1,338,247 | 0.27x | 3,246 | 2.5y | keyword "macros" | compare |
| pastey Established | 636,011 | 0.13x | 331 | 5mo | keyword "macros" | compare |
| derive_more Widely used | 1,604,594 | 0.33x | 3,690 | 10mo | category Procedural macro helpers | compare |
| ctor Established | 686,862 | 0.14x | 848 | 2mo | category Procedural macro helpers | compare |
| inventory Widely used | 449,319 | 0.09x | 1,291 | 17d | category Procedural macro helpers | compare |
How to choose
- Same job, not the same API. Each line is listed because it shares a crates.io category or keyword with proc-macro2; 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 proc-macro2: 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 proc-macro2, 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. 1,901,257 real downloads a day.strumRust crate. Helpful macros for working with enums and strings. Real use: 1.9M downloads a day on quiet days; 5,075 crates depend on it.Read it next →Also worth your time