Contrary to my rfc, I think I have been persuaded that unions should be structs, not enums. The primary distinction between an enum and a...
@nick_r_cameron That I have to manually keep the Rust #[repr(C)] declaration of a struct in sync with the original definition is madness.
-
-
@BRIAN_____ This can (and should) be automated using bindgen. If this is not ergonomic we should fix the tools.Thanks. Twitter will use this to make your timeline better. UndoUndo
-
-
-
@nick_r_cameron (And, more on topic, the same with union. Rust doesn't need its own union type if it can parse C unions.) -
@BRIAN_____ I would much rather have a tooling step, than expand Rust to understand C (even in a part). -
@nick_r_cameron OTOH, I don't trust bindgen to do the same as GCC and clang, so I don't use it. -
@BRIAN_____ would you trust the Rust compiler to do the same? We should improve bindgen until you do trust it. Do you have specific issues? -
@nick_r_cameron I guess bindgen! is just different syntax for#include. I guess. I'd trust it when rustc team trusts it enough to bundle it. -
@BRIAN_____ I would very much like to move in that direction. Better ergonomics around FFI is something I want to improve this year -
@nick_r_cameron Why not just make union support part of bindgen, then?
End of conversation
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.