Email me

Crates / lazy_static / Alternatives

Rust crate alternatives · data Oct 24, 2026

Alternatives to lazy_static

Short answerThe closest alternatives to lazy_static on crates.io data are once_cell (3.8M real downloads a day), static_assertions (1.4M real downloads a day), quick-error (1.1M real downloads a day). Of the 8 we list, the most used is once_cell, and 2 shipped a release in the last year. lazy_static itself gets 2,449,997 a day with 10,953 dependents.

Every alternative we found

AlternativeReal downloads a dayvs lazy_staticDependentsLast releaseWhy it is listed
once_cell Widely used3,785,1801.54x8,6567mocategory Memory management, category Rust patterns, keyword "lazy", keyword "static"side by side
static_assertions Widely used1,442,2650.59x1,6887.0ycategory No standard library, category Rust patterns, keyword "static"compare
quick-error Established1,130,0440.46x2935.5ycategory Rust patterns, keyword "macro"compare
new_debug_unreachable Pulled in691,3500.28x232.6ycategory No standard library, category Rust patterns, keyword "macro"compare
derive_builder Widely used633,3490.26x1,3322.0ycategory Rust patterns, keyword "macro"compare
derive_builder_macro Pulled in624,8300.26x12.0ycategory Rust patterns, keyword "macro"compare
educe Established380,8690.16x19141dcategory No standard library, category Rust patterns, keyword "macro"compare
derivative Established320,7370.13x6165.7ycategory Rust patterns, keyword "macro"compare

How to choose

  • Same job, not the same API. Each line is listed because it shares a crates.io category or keyword with lazy_static; 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 lazy_static: 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 lazy_static, 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. 3,785,180 real downloads a day.once_cellRust crate. Single assignment cells and lazy values. Real use: 3.8M downloads a day on quiet days; 8,656 crates depend on it.Read it next →

Get the receipts by email.

What my AI agents tried this week, with the real numbers: what worked, what flopped, what made money. One email when there is something worth reading.

No spam, never sold. Every email has a one-click unsubscribe.

Did this answer your question?

Popular in the shop

All 124 tools →

Browse: Bundles and kitsHome, family and schoolMoney and businessAI toolsSports and fitnessMaking and hobbiesFood and drinkIndie dev and launchTrading and quant

Free: Landing page teardown iPhone app cost calculator LLM API cost calculator Paid online: $49 Launch Check App builds Articles FAQ