Skip to content

Commit 3ff7d3d

Browse files
saethlinRalfJung
andcommitted
Update docs to match
Co-authored-by: Ralf Jung <[email protected]>
1 parent ca9d509 commit 3ff7d3d

File tree

2 files changed

+7
-10
lines changed

2 files changed

+7
-10
lines changed

src/tools/miri/CONTRIBUTING.md

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -129,18 +129,15 @@ development version of Miri using
129129
./miri install
130130
```
131131

132-
and then you can use it as if it was installed by `rustup`. Make sure you use
133-
the same toolchain when calling `cargo miri` that you used when installing Miri!
134-
Usually this means you have to write `cargo +miri miri ...` to select the `miri`
135-
toolchain that was installed by `./miri toolchain`.
132+
and then you can use it as if it was installed by `rustup` as a component of the
133+
`miri` toolchain. Note that the `miri` and `cargo-miri` executables are placed
134+
in the `miri` toolchain's sysroot to prevent conflicts with other toolchains.
135+
The Miri binaries in the `cargo` bin directory (usually `~/.cargo/bin`) are managed by rustup.
136136

137137
There's a test for the cargo wrapper in the `test-cargo-miri` directory; run
138138
`./run-test.py` in there to execute it. Like `./miri test`, this respects the
139139
`MIRI_TEST_TARGET` environment variable to execute the test for another target.
140140

141-
Note that installing Miri like this will "take away" Miri management from `rustup`.
142-
If you want to later go back to a rustup-installed Miri, run `rustup update`.
143-
144141
### Using a modified standard library
145142

146143
Miri re-builds the standard library into a custom sysroot, so it is fairly easy

src/tools/miri/miri

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ USAGE=$(cat <<"EOF"
66
./miri install <flags>:
77
Installs the miri driver and cargo-miri. <flags> are passed to `cargo
88
install`. Sets up the rpath such that the installed binary should work in any
9-
working directory. However, the rustup toolchain when invoking `cargo miri`
10-
needs to be the same one used for `./miri install`.
9+
working directory. Note that the binaries are placed in the `miri` toolchain
10+
sysroot, to prevent conflicts with other toolchains.
1111
1212
./miri build <flags>:
1313
Just build miri. <flags> are passed to `cargo build`.
@@ -281,7 +281,7 @@ find_sysroot() {
281281
case "$COMMAND" in
282282
install)
283283
# "--locked" to respect the Cargo.lock file if it exists.
284-
# Install binaries to the miri toolchain's sysroot so they do not interact with other toolchains
284+
# Install binaries to the miri toolchain's sysroot so they do not interact with other toolchains.
285285
$CARGO install $CARGO_EXTRA_FLAGS --path "$MIRIDIR" --force --locked --root "$SYSROOT" "$@"
286286
$CARGO install $CARGO_EXTRA_FLAGS --path "$MIRIDIR"/cargo-miri --force --locked --root "$SYSROOT" "$@"
287287
;;

0 commit comments

Comments
 (0)