small-ctor

Minimal, dependency free implementation of the ctor crate

APACHE-2.0 License

Downloads
4.8K
Stars
14
Committers
1

small-ctor

Minimal, dependency free implementation of the ctor crate.

Supports Rust 1.46 and later on Linux, Windows and macOS. Other platforms best effort.

struct MyPlugin;

#[small_ctor::ctor]
unsafe fn register_plugin() {
    PLUGINS.register(MyPlugin);
}

License and Links