Skip to content

Commit f026430

Browse files
committed
README: Miri now supports panics and FS access
1 parent a0ba079 commit f026430

File tree

1 file changed

+7
-9
lines changed

1 file changed

+7
-9
lines changed

README.md

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,9 @@ program, and cannot run all programs:
3939
addresses or other non-deterministic data, try running Miri with different
4040
values for `-Zmiri-seed` to test different executions.
4141
* 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
4343
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.
4645

4746
[rust]: https://www.rust-lang.org/
4847
[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.
7877
You can pass arguments to Miri after the first `--`, and pass arguments to the
7978
interpreted program or test suite after the second `--`. For example, `cargo
8079
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.
8481

8582
When running code via `cargo miri`, the `miri` config flag is set. You can
8683
use this to exclude test cases that will fail under Miri because they do things
@@ -90,8 +87,9 @@ Miri does not support:
9087
#[cfg(not(miri))]
9188
#[test]
9289
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();
9593
}
9694
```
9795

@@ -111,7 +109,7 @@ rustup default "$MIRI_NIGHTLY"
111109
rustup component add miri
112110
cargo miri setup
113111

114-
cargo miri test -- -- -Zunstable-options --exclude-should-panic
112+
cargo miri test
115113
```
116114

117115
We use `cargo miri setup` to avoid getting interactive questions about the extra

0 commit comments

Comments
 (0)