> The primary goal of this is support for old/obscure hardware with no LLVM/GCC support.
If you're going to go to all this effort for an old target though, wouldn't the effort be better spent on making it an LLVM target? Then you'd get Rust and a bunch of other languages for free.
But maybe there are required parts of the LLVM IR that make this undesirable for certain targets, maybe requiring specific hardware features, I don't know. I guess also WASM-as-IR is a possible way to go. (Is that a thing?)
Edit: sorry I see that this point was already raised in this thread by ivanjermakov. Ignore.
> WASM-as-IR .. (Is that a thing?)
Yes, actually I've heard of some projects compiling a language to Wasm, then using wasm2c to translate to C.
https://github.com/WebAssembly/wabt/blob/main/wasm2c/README....
The Zig project does something similar for their bootstrapping process with a custom wasm2c implementation with just the features they need.
https://github.com/ziglang/zig/blob/master/stage1/wasm2c.c
I get the feeling this is an underappreciated technique with more potential.