@@ -39,10 +39,9 @@ program, and cannot run all programs:
39
39
addresses or other non-deterministic data, try running Miri with different
40
40
values for ` -Zmiri-seed ` to test different executions.
41
41
* Miri runs the program as a platform-independent interpreter, so the program
42
- has no access to any platform-specific APIs or FFI. A few APIs have been
42
+ has no access to most platform-specific APIs or FFI. A few APIs have been
43
43
implemented (such as printing to stdout) but most have not: for example, Miri
44
- currently does not support concurrency, or SIMD, or networking, or file system
45
- access.
44
+ currently does not support concurrency, or SIMD, or networking.
46
45
47
46
[ rust ] : https://www.rust-lang.org/
48
47
[ mir ] : https://github.com/rust-lang/rfcs/blob/master/text/1211-mir.md
@@ -78,9 +77,7 @@ dependencies. It will ask you for confirmation before installing anything.
78
77
You can pass arguments to Miri after the first ` -- ` , and pass arguments to the
79
78
interpreted program or test suite after the second ` -- ` . For example, `cargo
80
79
miri run -- -Zmiri-disable-validation` runs the program without validation of
81
- basic type invariants and references. `cargo miri test -- -- -Zunstable-options
82
- --exclude-should-panic` skips ` #[ should_panic] ` tests, which is a good idea
83
- because Miri does not support unwinding or catching panics.
80
+ basic type invariants and references.
84
81
85
82
When running code via ` cargo miri ` , the ` miri ` config flag is set. You can
86
83
use this to exclude test cases that will fail under Miri because they do things
@@ -90,8 +87,9 @@ Miri does not support:
90
87
#[cfg(not(miri))]
91
88
#[test]
92
89
fn does_not_work_on_miri () {
93
- let x = 0u8 ;
94
- assert! (& x as * const _ as usize % 4 < 4 );
90
+ std :: thread :: spawn (|| println! (" Hello Thread!" ))
91
+ . join ()
92
+ . unwrap ();
95
93
}
96
94
```
97
95
@@ -111,7 +109,7 @@ rustup default "$MIRI_NIGHTLY"
111
109
rustup component add miri
112
110
cargo miri setup
113
111
114
- cargo miri test -- -- -Zunstable-options --exclude-should-panic
112
+ cargo miri test
115
113
```
116
114
117
115
We use ` cargo miri setup ` to avoid getting interactive questions about the extra
0 commit comments