#constructor #attributes #free #plugin

macro small_ctor

A minimal, dependency free version of the ctor crate

2 releases

0.1.1 Jul 2, 2023
0.1.0 Jan 22, 2022

#342 in Procedural macros

Download history 52/week @ 2023-11-20 2/week @ 2023-11-27 20/week @ 2023-12-04 8/week @ 2023-12-11 5/week @ 2023-12-18 9/week @ 2024-01-01 10/week @ 2024-01-29 2/week @ 2024-02-12 11/week @ 2024-02-19 35/week @ 2024-02-26 14/week @ 2024-03-04

62 downloads per month

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