#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

#845 in Procedural macros

Download history 268/week @ 2024-08-16 152/week @ 2024-08-23 120/week @ 2024-08-30 211/week @ 2024-09-06 147/week @ 2024-09-13 167/week @ 2024-09-20 354/week @ 2024-09-27 271/week @ 2024-10-04 177/week @ 2024-10-11 271/week @ 2024-10-18 236/week @ 2024-10-25 463/week @ 2024-11-01 356/week @ 2024-11-08 172/week @ 2024-11-15 163/week @ 2024-11-22 204/week @ 2024-11-29

980 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