static-alloc 0.1.2

Replacements for `Box`, `Rc`, `Vec`, .. without `alloc`
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
use static_alloc::Slab;

#[global_allocator]
static A: Slab<[u8; 1 << 20]> = Slab::uninit();

#[test]
fn ok_vec() {
    let v = vec![0xdeadbeef_u32; 128];
    println!("{:x?}", v);
    v.into_iter()
        .for_each(|x| assert_eq!(x, 0xdeadbeef_u32));
}