3 ms·
> 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 LLV
by redrobein 6y ago
> 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.