link-section 0.17.0

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
use link_section::{section, in_section};

#[section(typed)]
static SECTION: link_section::TypedSection<u32>;

// Currently returns different errors between nightly and stable
// #[in_section(SECTION)]
// fn bad_item() {
//     println!("bad_item");
// }

#[in_section(SECTION)]
static BAD_ITEM: u64 = 1;

fn main() {
}