Crates / once_cell / Alternatives
Rust crate alternatives · data Oct 24, 2026
Alternatives to once_cell
Short answerThe closest alternatives to once_cell on crates.io data are lazy_static (2.4M real downloads a day), static_assertions (1.4M real downloads a day), zerovec-derive (2.6M real downloads a day). Of the 8 we list, the most used is zerovec-derive, and 7 shipped a release in the last year. once_cell itself gets 3,785,180 a day with 8,656 dependents.
Every alternative we found
| Alternative | Real downloads a day | vs once_cell | Dependents | Last release | Why it is listed | |
|---|---|---|---|---|---|---|
| lazy_static Foundational | 2,449,997 | 0.65x | 10,953 | 23d | category Memory management, category Rust patterns, keyword "lazy", keyword "static" | side by side |
| static_assertions Widely used | 1,442,265 | 0.38x | 1,688 | 7.0y | category Rust patterns, keyword "static" | side by side |
| zerovec-derive Pulled in | 2,561,390 | 0.68x | 6 | 2d | category Memory management, category Rust patterns | compare |
| zerovec Pulled in | 2,516,803 | 0.66x | 60 | 2d | category Memory management, category Rust patterns | compare |
| bumpalo Established | 1,968,716 | 0.52x | 546 | 5mo | category Memory management, category Rust patterns | compare |
| id-arena Pulled in | 640,306 | 0.17x | 65 | 9mo | category Memory management, category Rust patterns | compare |
| jiff-static Pulled in | 646,337 | 0.17x | 1 | 18d | keyword "static" | compare |
| heapless Widely used | 576,658 | 0.15x | 1,162 | 6mo | keyword "static" | side by side |
How to choose
- Same job, not the same API. Each line is listed because it shares a crates.io category or keyword with once_cell; 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 once_cell: 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 once_cell, 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: Foundational and steady. 2,449,997 real downloads a day.lazy_staticRust crate. A macro for declaring lazily evaluated statics in Rust. Real use: 2.4M downloads a day on quiet days; 10,953 crates depend on it.Read it next →Also worth your time