@@ -93,11 +93,6 @@ can pass arguments to Miri via `MIRIFLAGS`. For example,
93
93
` MIRIFLAGS="-Zmiri-disable-stacked-borrows" cargo miri run ` runs the program
94
94
without checking the aliasing of references.
95
95
96
- Miri supports cross-execution: if you want to run the program as if it was a
97
- Linux program, you can do ` cargo miri run --target x86_64-unknown-linux-gnu ` .
98
- This is particularly useful if you are using Windows, as the Linux target is
99
- much better supported than Windows targets.
100
-
101
96
When compiling code via ` cargo miri ` , the ` cfg(miri) ` config flag is set. You
102
97
can use this to ignore test cases that fail under Miri because they do things
103
98
Miri does not support:
@@ -122,6 +117,19 @@ error: unsupported operation: can't call foreign function: bind
122
117
performed an operation that the interpreter does not support
123
118
```
124
119
120
+ ### Cross-interpretation: running for different targets
121
+
122
+ Miri can not only run a binary or test suite for your host target, it can also
123
+ perform cross-interpretation for arbitrary foreign targets: `cargo miri run
124
+ --target x86_64-unknown-linux-gnu` will run your program as if it was a Linux
125
+ program, no matter your host OS. This is particularly useful if you are using
126
+ Windows, as the Linux target is much better supported than Windows targets.
127
+
128
+ You can also use this to test platforms with different properties than your host
129
+ platform. For example ` cargo miri test --target mips64-unknown-linux-gnuabi64 `
130
+ will run your test suite on a big-endian target, which is useful for testing
131
+ endian-sensitive code.
132
+
125
133
### Running Miri on CI
126
134
127
135
To run Miri on CI, make sure that you handle the case where the latest nightly
0 commit comments