upvote
> Wouldn't it be easier to add old hardware support to LLVM/GCC instead?

No, in fact it's much, much harded. You have no idea of the scope. I have no idea of the scope. Nobody does. There are obscure machines we've never heard about and there are C compilers for them. Targeting and supporting them from modern toolchains is a fool's errand.

reply
rust to c supports infinite platforms that already have a c compiler by implementing a single rust to c program

on the other hand, porting llvm to an infinite number of platforms requires an infinite amount of work

so, it is less work this way

reply
Some architecture lacks documentation, if you have a working C compiler, it's easier to use it than working on a compiler to target it.
reply
Presumably you still need a C++ compiler for LLVM itself though. Or... a C++ to C translator.

Edit: On second thought, that's only needed if you want to run rustc itself on the old hardware, which is probably not super useful given the main reason you would need to do this is if LLVM can't target that hardware.

For building code written in Rust for such old hardware, this would be sufficient.

reply