2 ms·
> macros, inline assembly, inline functions, gcc attributes, Rust supports all of these features. So your complaint is that nobody has written a translator fro
by pcwalton 10y ago
> macros, inline assembly, inline functions, gcc attributes,
Rust supports all of these features. So your complaint is that nobody has written a translator from these things to Rust yet. That's a matter of filing PRs against bindgen, not some basic problem with the language.
- DSMan195276 10y agoIf you think it is so trivial, then why hasn't it been done yet? Rust macros can't do all the same things that C #define macros can. You can't insert inline C code into Rust code without some serious work. And the fact is, as you pointed out, regardless of in the future, right now it doesn't work, and those features are absolutely necessary for writing something like a Linux Kernel module.