Crate

once_cell

Single-assignment cells for lazy and global initialization in Rust.

What it is

once_cell provides OnceCell and Lazy types for values initialized exactly once. Lazy<T> initializes on first access; OnceCell<T> allows explicit one-time setting. The standard library adopted these patterns as std::sync::OnceLock and std::sync::LazyLock in Rust 1.70.

Why it is commonly used

Used to initialize global state lazily without static mut or mutex overhead — connection pools, compiled regex, configuration, and any singleton that is expensive to construct but must be shared across threads.

867
Repositories
88%
Actively maintained
761
Updated ≤ 30 days
3.5M
Total stars
747
Owners

Counted from the Cargo.toml manifests of the 867 indexed repositories that declare once_cell as a dependency — not download counts. Dependency data last verified 2026-08-13.

Browse 867 repositories using once_cell in Repos →
Often used with

Crates that show up unusually often in once_cell projects. The most distinctive pairings rank first — crates these projects use far more than the average indexed Rust project does, not just crates that are popular everywhere. Each percentage is the share of once_cell projects that also use it.

Used by these organizations
50 of 867 repositories · ranked by stars · 761 pushed in the last 30 days
RuView90kactive

π RuView turns commodity WiFi signals into real-time spatial intelligence, vital sign monitoring, and presence detection — all without a single pixel of video.

hyperswitch43kactive

Open source, composable payments platform | PCI compliant | SaaS and Self-host options | Enables connectivity to multiple payment, payout, fraud, vault and tokenization providers | Uplifts authorization with intelligent routing and revenue recovery | Reduce payment processing costs with cost observability | Reduces payment ops with reconciliation

servo38kactive

Servo aims to empower developers with a lightweight, high-performance alternative for embedding web technologies in applications.

⑂ 3.7k3.1k
meetily29kmaintenance

Privacy first, AI meeting assistant with 4x faster Parakeet/Whisper live transcription, speaker diarization, and Ollama summarization built on Rust. 100% local processing. no cloud required. Meetily (Meetly Ai - https://meetily.ai) is the #1 Self-hosted, Open-source Ai meeting note taker for macOS & Windows.

Graphite27kactive

Community-built comprehensive 2D content creation appplication for graphic design, digital art, and interactive real-time motion graphics powered by a node-based procedural graphics engine

neon23kmaintenance

Neon: Serverless Postgres. We separated storage and compute to offer autoscaling, code-like database branching, and scale to zero.

⑂ 1.1k552
Ciphey22kactive

⚡ Automatically decrypt encryptions without knowing the key or cipher, decode encodings, and crack hashes ⚡

← Browse all repos