#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

#767 in Procedural macros

Download history 119/week @ 2024-07-27 157/week @ 2024-08-03 315/week @ 2024-08-10 193/week @ 2024-08-17 157/week @ 2024-08-24 131/week @ 2024-08-31 197/week @ 2024-09-07 145/week @ 2024-09-14 178/week @ 2024-09-21 359/week @ 2024-09-28 264/week @ 2024-10-05 168/week @ 2024-10-12 282/week @ 2024-10-19 291/week @ 2024-10-26 457/week @ 2024-11-02

1,232 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