-
-
Notifications
You must be signed in to change notification settings - Fork 65
Closed
Labels
enhancementNew feature or requestNew feature or requestgood first issueGood for newcomersGood for newcomershelp wantedExtra attention is neededExtra attention is needed
Description
Hi @BurntSushi, I don't currently use the unicode feature but I am looking to do so. bstr would be the only crate in my lockfile that uses lazy_static. There has been a lot of movement in the ecosystem to port over to once_cell. I personally think the API is nicer and the maintenance status is in a better spot.
once_cell has the added benefit of being slated for inclusion into std, which means it has the potential to simply re-export those std types once they are stabilized.
once_cell's MSRV is in the 1.36 range, which is compatible with the 1.60 MSRV bstr now has.
rustc is also suggesting once_cell for statics:
Here's some examples throughout the ecosystem:
- Replace lazy_static with once_cell wasm-bindgen/wasm-bindgen#2962
- Migrate from lazy_static crate to std::sync::LazyLock tikv/rust-prometheus#448
- Replace lazy_static with once_cell tokio-rs/tokio#3187
- Migrate from lazy_static to once_cell tokio-rs/tracing#2147
- Replace lazy_static with once_cell clap-rs/clap#3828
- use std::lazy::SyncLazy instead of lazy_static rust-lang/rustfmt#5251
- Switch lazy_static to once_cell zeromq/zmq.rs#169
- Replace
lazy_staticwithonce_cellrust-onig/rust-onig#169 - Replace
lazy_static!withonce_cell::sync::Lazyimmunant/c2rust#617 - Replace
lazy_staticwithonce_cellrust-lang/crates.io#5044 - Replace lazy_static with once_cell uutils/coreutils#3704
- Migrate most of wasmtime from lazy_static to once_cell bytecodealliance/wasmtime#4368
- Migrate lazy_static to once_cell seanmonstar/reqwest#1565
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requestgood first issueGood for newcomersGood for newcomershelp wantedExtra attention is neededExtra attention is needed