osom_lib 0.1.13

Top-level crate that re-exports the osom_lib workspace crates.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use osom_lib::reprc::macros::reprc;

#[reprc]
struct MyStruct {
    a: u32,
    b: u32,
}

#[test]
fn test_reprc() {
    let my_struct = MyStruct { a: 1, b: 2 };
    let ptr = &raw const my_struct as *const [u8; size_of::<MyStruct>()];
    let data = unsafe { *ptr };

    assert!(&data == &[1, 0, 0, 0, 2, 0, 0, 0] || &data == &[2, 0, 0, 0, 1, 0, 0, 0]);
}