#initialization #register #call #boot #called #function

booter

A simple solution to register and call one-time initialization functions

2 stable releases

1.1.2 Sep 14, 2021
1.1.1 Jun 18, 2021
1.0.2 May 23, 2021
0.1.0 May 12, 2021

#44 in #called

MIT license

4KB
65 lines

Booter

License Cargo Documentation

This crate allows a simple means to register FnOnce functions to be called on boot.

booter::call_on_boot!({
  println!("Hello World!");
});

fn main() {
  booter::boot();
  booter::assert_booted();
}

lib.rs:

This crate allows a simple means to register FnOnce functions to be called on boot

booter::call_on_boot!({
  println!("Hello World!");
});

fn main() {
  booter::boot();
  booter::assert_booted();
}

Dependencies

~1.5MB
~38K SLoC