4 ms·
Just curious, what language was used to write the Rust compiler?
by chmaynard 4y ago
Just curious, what language was used to write the Rust compiler?
- _flux 4y agoLike C was used to write C and OCaml was used to write OCaml, Rust is written in Rust. Mostly, anyway, the GitHub repository seems to have also JavaScript, Python and Shell. Though to actually get binaries out of it LLVM is used, which itself is written in C++.
- xxpor 4y agoRust is written in Rust today, but it was bootstrapped in OCaml.
- nequo 4y agoOriginally OCaml, and now Rust: https://github.com/rust-lang/rust https://github.com/rust-lang/rust
- jraph 4y agoFair point, but the Rust compiler is not there at runtime. It also only needs to be written once for all the Rust programs, so assuming Rust is safer, you restrict the unsafety to the compiler (and the unsafe constructions of Rust, which are clearly marked as unsafe if memory serves). (the Rust compiler is written in Rust, but the LLVM backend it uses (and soon GCC, IIRC), is still written in C++)
- deleted 4y ago[deleted]