cuprated::statics

Macro define_init_lazylock_statics

Source
macro_rules! define_init_lazylock_statics {
    ($(
        $( #[$attr:meta] )*
        $name:ident: $t:ty = $init_fn:expr;
    )*) => { ... };
}
Expand description

Define all the statics that should be always be initialized early on.

This wraps all statics inside a LazyLock and generates a init_lazylock_statics function that must/should be used by main() early on.