Yes, the rust compiler is written in rust too.
The thing is at the beginning, you need to write the compiler for your language in a language that already exists. It'll take your code files and turn them into machine code.
But say you then write C code that can compile C code (read C code files and convert them into machine code), and you compile it using your existing compiler written in Assembly or whatever.
Then you can run the C compiler you wrote in C to compile new C code.
Login to reply