#[macro_export]
macro_rules! ctor {
($name: ident, $fn: ident) => {
#[cfg_attr(
any(target_os = "none", target_os = "linux"),
unsafe(link_section = ".init_array")
)]
#[cfg_attr(target_os = "macos", unsafe(link_section = "__DATA,__mod_init_func"))]
#[used]
static $name: extern "C" fn() = $fn;
};
}