link-section 0.17.2

Link-time initialized slices for Rust, with full support for Linux, macOS, Windows, WASM and many more platforms.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use link_section::declarative::{section, in_section};
use link_section::TypedSection;

section! {
    #[section(typed)]
    static FOO: TypedSection<fn()>;
}

in_section! {
    #[in_section(FOO)]
    fn foo() {
        
    }
}

fn main() {
}