#constructor #ctor #attributes

macro small_ctor

A minimal, dependency free version of the ctor crate

3 releases

0.1.2 Aug 1, 2024
0.1.1 Jul 2, 2023
0.1.0 Jan 22, 2022

#766 in Procedural macros

Download history 131/week @ 2024-07-29 146/week @ 2024-08-05 346/week @ 2024-08-12 163/week @ 2024-08-19 172/week @ 2024-08-26 122/week @ 2024-09-02 195/week @ 2024-09-09 147/week @ 2024-09-16 177/week @ 2024-09-23 359/week @ 2024-09-30 286/week @ 2024-10-07 142/week @ 2024-10-14 286/week @ 2024-10-21 292/week @ 2024-10-28 537/week @ 2024-11-04 216/week @ 2024-11-11

1,334 downloads per month
Used in procspawn

Apache-2.0

17KB
229 lines

small-ctor

Build Status rustc 1.46.0 Crates.io License Documentation

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);
}

No runtime deps