Globals 🌎🔥⚠️
Painless globals in Rust for people who don't mind being totally unsafe about it. Library writers (especially in web assembly) are many times forced to write global data because they don't have a single point of entry. This library will never be multi-thread safe (there are much better alternatives for multithreaded), but that may not be a problem given your use case.
use at your own risk of undefined behavior ☠
[]
= "0.0.2"
add something into global state
let f = Foo
let handle = unsafe ;
get something from global state
let f = unsafe ;
let f = unsafe ;
remove something from global state
let f = unsafe ;
get all things of a certain type
let fs = unsafe ;
for f in fs.iter
get a singleton of a type
Type must implement Default
let f = unsafe ;
let f = unsafe ;