Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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-r...



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: