Replace lazy_static with OnceLock inside monero-serai

lazy_static, if no_std environments were used, effectively required always
using spin locks. This resolves the ergonomics of that while adopting Rust std
code.

no_std does still use a spin based solution. Theoretically, we could use
atomics, yet writing our own Mutex wasn't a priority.
This commit is contained in:
Luke Parker
2023-06-28 21:16:33 -04:00
parent 8ced63eaac
commit d25c668ee4
17 changed files with 212 additions and 129 deletions

View File

@@ -30,4 +30,4 @@ dkg = { path = "../../crypto/dkg", default-features = false }
# modular-frost = { path = "../../crypto/frost", default-features = false }
# frost-schnorrkel = { path = "../../crypto/schnorrkel", default-features = false }
monero-generators = { path = "../../coins/monero/generators", default-features = false, features = ["alloc"] }
monero-generators = { path = "../../coins/monero/generators", default-features = false }