Re: Such awful interop
>> Just the #define keyword is already problematic because its untyped and that would put a hole in the Rust type-system.
Huh?
> The argument is that the only way to do this robustly is to bundle an existing C compiler with the Rust compiler
> So C macros aren't the problem, but sort of the first worm that comes out of the can when you try to open it.
No. C macros need not be a problem at all, if you don't want them to be.[1]
And you don't need to bundle a C compiler - you just need to "bundle" a copy of the C pre-processor. The cpp is a *lot* smaller than a full compiler and can easily be provided as a separate utility (in the Good Old Days your cpp was a separate executable to the compiler proper), or even within the Rust compiler itself. Although, of course, one could reasonably assume that if you are trying to feed C headers into Rust, in order to link with C code, you already *have* a full C compiler and can just invoke that cpp[2]
In the not too distant past I had to set my Makefiles to run a standalone cpp over all the C sources before handing them over to a particular compiler because *its* cpp (which was built into the compiler exe) was crap and fell over as soon as an expanded macro went over 255 characters, so running it over C headers before processing them with Rust, or any Rust-related tool, is a perfectly reasonable thing to do.
[1] which isn't to say that there aren't problems to be encountered in C headers, just that macros are a total red-herring.
[2] look for the command line options to cl (or lc); if nothing else it is useful to know how to just run the macro phase if you ever need to debug some of the weirder errors that can creep in to your C/C++ code.