+`./run-test.py` in there to execute it. Like `./miri test`, this respects the
+`MIRI_TEST_TARGET` environment variable to execute the test for another target.
+
+### Using a modified standard library
+
+Miri re-builds the standard library into a custom sysroot, so it is fairly easy
+to test Miri against a modified standard library -- you do not even have to
+build Miri yourself, the Miri shipped by `rustup` will work. All you have to do
+is set the `MIRI_LIB_SRC` environment variable to the `library` folder of a
+`rust-lang/rust` repository checkout. Note that changing files in that directory
+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
+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": [
+ "env",
+ "MIRI_AUTO_OPS=no",
+ "./miri",
+ "check",
+ "--message-format=json"
+ ],
+ "rust-analyzer.buildScripts.overrideCommand": [
+ "env",
+ "MIRI_AUTO_OPS=no",
+ "./miri",
+ "check",
+ "--message-format=json",
+ ],
+ "rust-analyzer.rustfmt.extraArgs": [
+ "+nightly"
+ ],
+}
+```
+
+> #### Note
+>
+> If you are [building Miri with a locally built rustc][], set
+> `rust-analyzer.rustcSource` to the relative path from your Miri clone to the
+> root `Cargo.toml` of the locally built rustc. For example, the path might look
+> like `../rust/Cargo.toml`.
+
+See the rustc-dev-guide's docs on ["Configuring `rust-analyzer` for `rustc`"][rdg-r-a]
+for more information about configuring VS Code and `rust-analyzer`.
+
+[rdg-r-a]: https://rustc-dev-guide.rust-lang.org/building/suggested.html#configuring-rust-analyzer-for-rustc