← Back to context

Comment by VorpalWay

5 hours ago

LLVM is the default yes, there is also an experimental cranelift backend, which is all Rust. Not sure if it is good enough to build the compiler itself using it.

(There is also a GCC backend called codegen_gcc that is pretty far along. And a separate reimplementation of both the frontend and backend using gcc and C++, called gccrs, which is not nearly as far along.)

I'm pretty sure it does not support enough features to build the compiler (e.g. inline asm is not supported at all), and it will also be very, very slow to unusable.

  • Cranelift is supposed to compile without optimizations (-O0) faster than the regular Rust compiler, and supposedly, the code runs at about the same speed as regular -O0 compiled code. That generally means 2-5x slower runtime performance, which is just fine for bootstrapping.