scattered-collect 0.2.1

Link-time collections for Rust (distributed slices, registries)
Documentation
//! Example for `ScatteredSlice`.
#![cfg_attr(linktime_used_linker, feature(used_with_arg))]

use scattered_collect::{gather, scatter, slice::ScatteredSlice};

#[derive(Debug, Eq, PartialEq, Ord, PartialOrd)]
struct MyId(u32);

/// A scattered slice of `u32`.
#[gather]
static COLLECTION: ScatteredSlice<MyId>;

#[scatter(COLLECTION)]
const _: MyId = MyId(1);

#[scatter(COLLECTION)]
const _: MyId = MyId(2);

#[scatter(COLLECTION)]
const _: MyId = MyId(3);

fn main() {
    println!("COLLECTION: {:?}", &*COLLECTION);
}