Skip to content

Commit 118274f

Browse files
committed
README: mention to cargo update, mention rustup-toolchain-install-master
1 parent b597eab commit 118274f

File tree

1 file changed

+16
-2
lines changed

1 file changed

+16
-2
lines changed

README.md

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,11 @@ Install Miri via `rustup`:
5555
rustup component add miri
5656
```
5757

58-
If `rustup` says the `miri` component is unavailable, that's because not all nightly releases come with all tools. Check out [this website](https://rust-lang.github.io/rustup-components-history) to determine a nightly version that comes with Miri and install that, e.g. using `rustup install nightly-2019-03-28`.
58+
If `rustup` says the `miri` component is unavailable, that's because not all
59+
nightly releases come with all tools. Check out
60+
[this website](https://rust-lang.github.io/rustup-components-history) to
61+
determine a nightly version that comes with Miri and install that, e.g. using
62+
`rustup install nightly-2019-03-28`.
5963

6064
Now you can run your project in Miri:
6165

@@ -131,7 +135,17 @@ able to just `cargo build` Miri.
131135
In case this fails, your nightly might be incompatible with Miri master. The
132136
`rust-version` file contains the commit hash of rustc that Miri is currently
133137
tested against; you can use that to find a nightly that works or you might have
134-
to wait for the next nightly to get released.
138+
to wait for the next nightly to get released. You can also use
139+
[`rustup-toolchain-install-master`](https://github.com/kennytm/rustup-toolchain-install-master)
140+
to install that exact version of rustc as a toolchain:
141+
```
142+
rustup-toolchain-install-master $(cat rust-version) -c rust-src
143+
```
144+
145+
Another common problem is outdated dependencies: Miri does not come with a
146+
lockfile (it cannot, due to how it gets embedded into the rustc build). So you
147+
have to run `cargo update` every now and then yourself to make sure you are
148+
using the latest versions of everything (which is what gets tested on CI).
135149

136150
### Testing the Miri driver
137151
[testing-miri]: #testing-the-miri-driver

0 commit comments

Comments
 (0)