I apologize in advance if it seems like I'm moving the goalposts. You're right that implementing a C compiler isn't a common or trivial task. My point is that implementing a Rust compiler is a much more complex task.
> the vast, vast majority of C code is running on a handful of well supported architectures.
Irrelevant. How much C vs Rust (vs Zig or D or ...) is running on the long tail of hardware?
FWIW, if Rust displaces C on the lion's share of machines, that's great. I'm not against Rust, or in favor of C.
> these days a better question is something like how long it would take to implement an LLVM backend.
Yes, absolutely, I agree.
Ideally you would have a program that takes as input a machine description and emits as output a correct Rust (or C or Zig or D or ...) compiler for that machine.
"Why I rewrote my Rust keyboard firmware in Zig: consistency, mastery, and fun" https://kevinlynagh.com/rust-zig/
I apologize in advance if it seems like I'm moving the goalposts. You're right that implementing a C compiler isn't a common or trivial task. My point is that implementing a Rust compiler is a much more complex task.
> the vast, vast majority of C code is running on a handful of well supported architectures.
Irrelevant. How much C vs Rust (vs Zig or D or ...) is running on the long tail of hardware?
FWIW, if Rust displaces C on the lion's share of machines, that's great. I'm not against Rust, or in favor of C.
> these days a better question is something like how long it would take to implement an LLVM backend.
Yes, absolutely, I agree.
Ideally you would have a program that takes as input a machine description and emits as output a correct Rust (or C or Zig or D or ...) compiler for that machine.