4 ms·
Are you so daft to think that the rust compiler is written in something other than C/C++?
by feld 11y ago
Are you so daft to think that the rust compiler is written in something other than C/C++?
- creshal 11y agoThe original Rust compiler was written in… OCaml. Nowadays it's self-hosting.
- feld 11y agoAnd OCaml is written in C. Also, there's an awful lot of llvm involved in compiler-rt on github. To think you can evade C on a Unix box is very wishful thinking. You can't escape C-generated bytecode in your stack. It's bound to be somewhere.
- deleted 11y ago[deleted]
- krisdol 11y agoSeeing as much of the kernel is written in it, of course. Working efficiently with raw memory pointers requires an unsafe language. Even Windows is written in C/C++
- ionised 11y agoI don't know much about Rust but the Wikipedia page says the original Rust compiler was written in OCaml, and that the new compiler is self-hosted and written in the Rust language itself.
- feld 11y ago"OCaml comprises two compilers. One generates bytecode which is then interpreted by a C program." Just look at its source, there's C everywhere.
- the_why_of_y 11y agoThe OCaml bytecode interpreter is implemented in C. The OCaml compiler generating said bytecode is implemented in OCaml, as is the other OCaml compiler that generates machine code.
- newscracker 11y agoThe Rust compiler is written in Rust.