Skip to content

update Miri #20

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 11 commits into from
28 changes: 13 additions & 15 deletions src/tools/miri/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ program, no matter your host OS. This is particularly useful if you are using
Windows, as the Linux target is much better supported than Windows targets.

You can also use this to test platforms with different properties than your host
platform. For example `cargo miri test --target mips64-unknown-linux-gnuabi64`
platform. For example `cargo miri test --target s390x-unknown-linux-gnu`
will run your test suite on a big-endian target, which is useful for testing
endian-sensitive code.

Expand Down Expand Up @@ -220,20 +220,18 @@ using `--target`!
The following targets are tested on CI and thus should always work (to the
degree documented below):

- The best-supported target is `x86_64-unknown-linux-gnu`. Miri releases are
blocked on things working with this target. Most other Linux targets should
also work well; we do run the test suite on `i686-unknown-linux-gnu` as a
32bit target and `mips64-unknown-linux-gnuabi64` as a big-endian target, as
well as the ARM targets `aarch64-unknown-linux-gnu` and
`arm-unknown-linux-gnueabi`.
- `x86_64-apple-darwin` should work basically as well as Linux. We also test
`aarch64-apple-darwin`. However, we might ship Miri with a nightly even when
some features on these targets regress.
- `x86_64-pc-windows-msvc` works, but supports fewer features than the Linux and
Apple targets. For example, file system access and concurrency are not
supported on Windows. We also test `i686-pc-windows-msvc`, with the same
reduced feature set. We might ship Miri with a nightly even when some features
on these targets regress.
- All Rust [Tier 1 targets](https://doc.rust-lang.org/rustc/platform-support.html) are supported by
Miri. They are all checked on Miri's CI, and some (at least one per OS) are even checked on every
Rust PR, so the shipped Miri should always work on these targets.
- We also support `s390x-unknown-linux-gnu` as our "big-endian target of choice".
- For every other target with OS `linux`, `macos`, or `windows`, Miri should generally work, but we
make no promises.
- For targets on other operating systems, even basic operations such as printing to the standard
output might not work, and Miri might fail before even reaching the `main` function.

However, even for targets that we do support, the degree of support for accessing platform APIs
(such as the file system) differs between targets: generally, Linux targets have the best support,
and macOS targets are usually on par. Windows is supported less well.

### Running tests in parallel

Expand Down
2 changes: 1 addition & 1 deletion src/tools/miri/ci.sh
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ case $HOST_TARGET in
MIRI_TEST_TARGET=tests/avr.json MIRI_NO_STD=1 run_tests_minimal no_std # JSON target file
;;
x86_64-apple-darwin)
MIRI_TEST_TARGET=mips64-unknown-linux-gnuabi64 run_tests # big-endian architecture
MIRI_TEST_TARGET=s390x-unknown-linux-gnu run_tests # big-endian architecture
MIRI_TEST_TARGET=x86_64-pc-windows-msvc run_tests
;;
i686-pc-windows-msvc)
Expand Down
2 changes: 1 addition & 1 deletion src/tools/miri/miri-script/src/commands.rs
Original file line number Diff line number Diff line change
Expand Up @@ -510,7 +510,7 @@ impl Command {

let mut cmd = cmd!(
e.sh,
"rustfmt +{toolchain} --edition=2021 --config-path {config_path} {flags...}"
"rustfmt +{toolchain} --edition=2021 --config-path {config_path} --unstable-features --skip-children {flags...}"
);
eprintln!("$ {cmd} ...");

Expand Down
2 changes: 1 addition & 1 deletion src/tools/miri/rust-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
dca2d1ff00bf96d244b1bb9a2117a92ec50ac71d
a989e25f1b87949a886eab3da10324d14189fe95