Skip to content

Commit 45533d3

Browse files
committed
Add section about Miri invocation to README-devel
Add a section about how to invoke/use Miri to README-devel. Signed-off-by: Daniel Müller <[email protected]>
1 parent f3576de commit 45533d3

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

README-devel.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,16 @@ some of the functionality we rely on is privileged. Test artifacts are
2222
transparently created as long as the `generate-unit-test-files` feature is
2323
active, which is enabled by default for testing.
2424

25+
### Running Miri
26+
[Miri][miri] is used for testing the crate for any undefined behavior.
27+
The interpreter is restricted to functionality that does not cross FFI
28+
boundaries and won't perform I/O. To run all eligible tests, use:
29+
```sh
30+
# Miri usage conflicts with custom test runners, so don't over write it.
31+
$ rm .cargo/config.toml
32+
$ MIRIFLAGS='-Zmiri-disable-stacked-borrows' cargo miri test --workspace -- ":miri:"
33+
```
34+
2535

2636
## Benchmarking
2737
We use a mixture of [Criterion][criterion] end-to-end benchmarks and [`libtest`
@@ -88,3 +98,4 @@ $ RUST_LIB_BACKTRACE=1 cargo test --test=allocs -- normalize_process --nocapture
8898
[criterion]: https://crates.io/crates/criterion
8999
[flamegraph]: https://crates.io/crates/flamegraph
90100
[libtest]: https://doc.rust-lang.org/1.4.0/book/benchmark-tests.html
101+
[miri]: https://github.com/rust-lang/miri

0 commit comments

Comments
 (0)