94% of Rust compiler was written in Rust. So I can't understand how is it possible? Because for compiling rustc you already must have some rust compiler. Can someone explain how it works and how rust compiler was created?
Simply put, once you have a compiler that compiles code, you can use that to develop and compile a new compiler. That new compiler can "understand" whatever language it's designed to compile.
So, suppose there was some C++ based rust compiler, and rust code was developed that compiles to a rust compiler, once you build that you have a rust based rust compiler.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With