by VWWHFSfQ · 6y ago · 0 comments
There are many gaps in my understanding of Rust with regard to LLVM and GCC.
The rust compiler generates some intermediate code (LLVM IR) that's fed into LLVM, which optimizes and turns it into machine code. You can check out what this looks like in the rust playground. Getting GCC to compile rust would be a matter of getting the rust compiler to generate GCC IR.
Cranelift (built with rust) is an alternative to LLVM with it's own IR. The cranelift backend for rust should help future projects that want to do something similar, I guess.
Systems programming is not web where they change the framework and 'script flavour every six months.
Systems programs live for decades - and hence their critical infrastructure like GCC will as well. C will be with us at least 3 decades more. Longer if Linux kernel will use it still.
That has already began. For example all the popular browsers (Chrome and all the derivatives, FF, Safari) moved away from GCC.