]> git.lizzy.rs Git - rust.git/blobdiff - CONTRIBUTING.md
Auto merge of #2379 - RalfJung:ui-test-target-filter, r=oli-obk
[rust.git] / CONTRIBUTING.md
index 7dfa9d73120f5f91922f2d9b69cda7acc3ef190b..a57ef09e7db9ff5626192c4c2a15b0afaa1e75c6 100644 (file)
@@ -28,11 +28,6 @@ install that exact version of rustc as a toolchain:
 This will set up a rustup toolchain called `miri` and set it as an override for
 the current directory.
 
-If you want to also have `clippy` installed, you need to run this:
-```
-./rustup-toolchain "" -c clippy
-```
-
 [`rustup-toolchain-install-master`]: https://github.com/kennytm/rustup-toolchain-install-master
 
 ## Building and testing Miri
@@ -131,6 +126,8 @@ development version of Miri using
 
 and then you can use it as if it was installed by `rustup`.  Make sure you use
 the same toolchain when calling `cargo miri` that you used when installing Miri!
+Usually this means you have to write `cargo +miri miri ...` to select the `miri`
+toolchain that was installed by `./rustup-toolchain`.
 
 There's a test for the cargo wrapper in the `test-cargo-miri` directory; run
 `./run-test.py` in there to execute it. Like `./miri test`, this respects the
@@ -147,6 +144,12 @@ does not automatically trigger a re-build of the standard library; you have to
 clear the Miri build cache manually (on Linux, `rm -rf ~/.cache/miri`;
 and on Windows, `rmdir /S "%LOCALAPPDATA%\rust-lang\miri\cache"`).
 
+### Benchmarking
+
+Miri comes with a few benchmarks; you can run `./miri bench` to run them with the locally built
+Miri. Note: this will run `./miri install` as a side-effect. Also requires `hyperfine` to be
+installed (`cargo install hyperfine`).
+
 ## Configuring `rust-analyzer`
 
 To configure `rust-analyzer` and VS Code for working on Miri, save the following
@@ -154,19 +157,24 @@ to `.vscode/settings.json` in your local Miri clone:
 
 ```json
 {
+    "rust-analyzer.rustc.source": "discover",
+    "rust-analyzer.linkedProjects": [
+        "./Cargo.toml",
+        "./cargo-miri/Cargo.toml"
+    ],
     "rust-analyzer.checkOnSave.overrideCommand": [
         "./miri",
         "check",
         "--message-format=json"
     ],
+    "rust-analyzer.buildScripts.overrideCommand": [
+        "./miri",
+        "check",
+        "--message-format=json",
+    ],
     "rust-analyzer.rustfmt.extraArgs": [
         "+nightly"
     ],
-    "rust-analyzer.rustcSource": "discover",
-    "rust-analyzer.linkedProjects": [
-        "./Cargo.toml",
-        "./cargo-miri/Cargo.toml"
-    ]
 }
 ```