Crate booter[][src]

Expand description

This crate allows a simple means to register and call one time initialization functions, the idea being this could be used in conjunction with static_init or std::mem::MaybeUninit in order to create statics that can be initalized once post-main after Tokio is online and the enviroment configured.

booter::call_on_boot!({
  println("Hello World!");
});
 
fn main() {
  booter::boot();
  booter::assert_booted();
}

Macros

call_on_boot

Register FnOnce to be called on booter::boot

Functions

assert_booted

Development assertion to ensure booter::boot called exactly once. Release builds skip check

boot

Call all functions captured by booter::call_on_boot.