What does HackerNews think of miri?
An interpreter for Rust's mid-level intermediate representation
Rust just takes the other side of the trade-off, and will reject valid programs. Hence why the unsafe keyword exists, and why tools like Miri (https://github.com/rust-lang/miri) exist specifically for rust.
Have to wonder how many bugs lay in static and dynamic analysers themselves, might be some low hanging yet wide-ranging fruit there.
Been playing around with Miri lately, it's a joy to use.
[1] https://twitter.com/Gankra_/status/1486928208528293888 [2] https://github.com/rust-lang/miri
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