6 ms·
Yes, Rust supports annotating your types with a `#[repr(...)]` attribute to control how it gets laid out in memory. There's a "C" repr that gives you representa
by pitterpatter 2y ago
Yes, Rust supports annotating your types with a `#[repr(...)]` attribute to control how it gets laid out in memory. There's a "C" repr that gives you representations interoperable with C.
https://doc.rust-lang.org/reference/type-layout.html#the-c-representation https://doc.rust-lang.org/reference/type-layout.html#the-c-r...