microsoft / windows-drivers-rs

Platform that enables Windows driver development in Rust. Developed by Surface.
Apache License 2.0
1.49k stars 65 forks source link

Remove all lazy_static instances #192

Open wmmc88 opened 2 months ago

wmmc88 commented 2 months ago
          > Lazy is now stable if I'm not mistaken. Not something that needs to be fixed right this instant though.

Its available in stable as of 1.80.0 (released 5 days ago). Although not formally stated (or enforced) I've been trying to keep support for Stable and Stable-1.

There are also other places in the repo where lazy_static is used, that aren't supported by std::sync::Lazy. (ex. LazyLock is not available in no_std, so in those situations, we should migrate to once_cell w/ the racy feature)

_Originally posted by @wmmc88 in https://github.com/microsoft/windows-drivers-rs/pull/186#discussion_r1697631038_