4 ms·
The multiple implementation story of Rust isn't as great as some older languages, but it's getting there. There are at least two e2e implementations of Rust:
by cbarrick 6y ago
The multiple implementation story of Rust isn't as great as some older languages, but it's getting there.
There are at least two e2e implementations of Rust:
- rustc, the reference implementation.
- mrustc, an alternative written in C++ [1].
There are also multiple implementations Rust's IR (MIR):
- rustc compiles MIR to LLVM.
- A backend that compiles MIR to Cranelift [2].
- Miri, a MIR interpreter used for dynamic analysis [3].
mrustc doesn't perform the borrow check, so it can't prevent you from triggering UB like rustc. But you can use rustc for the borrow check and mrustc for codegen.
[1]: https://github.com/thepowersgang/mrustc https://github.com/thepowersgang/mrustc
[2]: https://github.com/bjorn3/rustc_codegen_cranelift https://github.com/bjorn3/rustc_codegen_cranelift
[3]: https://github.com/rust-lang/miri https://github.com/rust-lang/miri