Skip to content

Commit 754c4a4

Browse files
committed
Auto merge of #1104 - RalfJung:readme, r=oli-obk
update README r? @oli-obk
2 parents b84d77b + e0619b7 commit 754c4a4

File tree

1 file changed

+11
-13
lines changed

1 file changed

+11
-13
lines changed

README.md

Lines changed: 11 additions & 13 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 without checking the aliasing of 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
@@ -154,10 +152,10 @@ Several `-Z` flags are relevant for Miri:
154152
**NOTE**: This entropy is not good enough for cryptographic use! Do not
155153
generate secret keys in Miri or perform other kinds of cryptographic
156154
operations that rely on proper random numbers.
157-
* `-Zmiri-disable-validation` disables enforcing the validity invariant, which
158-
is enforced by default. This is mostly useful for debugging; it means Miri
159-
will miss bugs in your program. However, this can also help to make Miri run
160-
faster.
155+
* `-Zmiri-disable-validation` disables enforcing validity invariants and
156+
reference aliasing rules, which are enforced by default. This is mostly
157+
useful for debugging. It means Miri will miss bugs in your program. However,
158+
this can also help to make Miri run faster.
161159
* `-Zmiri-disable-isolation` disables host host isolation. As a consequence,
162160
the program has access to host resources such as environment variables and
163161
randomness (and, eventually, file systems and more).

0 commit comments

Comments
 (0)