this post was submitted on 20 Nov 2025
27 points (100.0% liked)
Rust
7501 readers
30 users here now
Welcome to the Rust community! This is a place to discuss about the Rust programming language.
Wormhole
Credits
- The icon is a modified version of the official rust logo (changing the colors to a gradient and black background)
founded 2 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
https://doc.rust-lang.org/reference/abi.html#the-no_mangle-attribute https://doc.rust-lang.org/nomicon/other-reprs.html#reprc
Does
no_mangleandrepr(c)do that?Those are good to know, thanks. But as far as I understand, attribute enforces unsafe, repr is more about the data layout. Right?
But in there, I've found https://github.com/mozilla/cbindgen. Wicked