Miri: Interpreter for Rust’s mid-level intermediate representation

Miri: Interpreter for Rust’s mid-level intermediate representation

It can run binaries and test suites of cargo projects and detect certain classes of undefined behavior, for example:

Miri has already discovered some real-world bugs. Be aware that Miri will not catch all possible errors in your program, and cannot run all programs:

Now you can run your project in Miri:

The first time you run Miri, it will perform some extra setup and install some dependencies. You can use this to exclude test cases that will fail under Miri because they do things Miri does not support:

When using the above instructions, you may encounter a number of confusing compiler errors.

Source: github.com