If it's per-core you should look into making `#[thread_local]` statics work, which remove some of the restrictions.
`static mut` is not always safe even in a single-threaded environment, because of reentrance - see also https://github.com/rust-lang/rust/issues/53639.