File tree Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -246,6 +246,21 @@ such races.
246246
247247Note : ` cargo-nextest` does not support doctests, see https://github.com/nextest-rs/nextest/issues/16
248248
249+ # ## Directly invoking the `miri` driver
250+
251+ The recommended way to invoke Miri is via `cargo miri`. Directly invoking the underlying `miri`
252+ driver is not supported, which is why that binary is not even installed into the PATH. However, if
253+ you need to run Miri on many small tests and want to invoke it directly like you would invoke
254+ `rustc`, that is still possible with a bit of extra effort :
255+
256+ ` ` ` sh
257+ # one-time setup
258+ cargo +nightly miri setup
259+ SYSROOT=$(cargo +nightly miri setup --print-sysroot)
260+ # per file
261+ ~/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/bin/miri --sysroot "$SYSROOT" file.rs
262+ ` ` `
263+
249264# ## Common Problems
250265
251266When using the above instructions, you may encounter a number of confusing compiler
You can’t perform that action at this time.
0 commit comments