call for testing: rust-analyzer!

371 points thramp 20 comments

Hi folks! We've landed two big changes in rust-analyzer this past week:

  • A big Salsa upgrade. Today, this should slightly improve performance, but soon, it'll let us do features like parallel autocomplete, persistent caches. It'll also unblock us from using the new trait solver!
  • A Salsa-ified crate graph. This change means the unit of incrementality isn't the crate graph, but rather, an individual crate. This results in much more fine-grained incrementality, which meaning that adding/removing a crate or editing a build script will cause rust-analyzer to only reindex the changed crate(s) and build scripts, not the entire workspace.

We're pretty darn confident in these changes, but given just how big they are, we'd appriciate some testing!

Instructions (VS Code)

If you're using Visual Studio Code:

  1. Open the "Extensions" view (Command + Shift + X) on a Mac; Ctrl-Shift-X on other platforms.
  2. Find and open the "rust-analyzer extension".
  3. Assuming it is installed, and click the button that says "Switch to Pre-Release Version". VS Code should install a nightly rust-analyzer and prompt you to reload extensions.
  4. Let us know if anything's off!

Other Editors/Building From Source

(Note that rust-analyzer compiles on the latest stable Rust! You do not need a nightly.)

  1. git clone https://github.com/rust-lang/rust-analyzer.git. Make sure you're on the latest commit!
  2. cargo xtask install --server --jemalloc. This will build and place rust-analyzer into into ~/.cargo/bin/rust-analyzer.
  3. Update your your editor to point to that new path. in VS Code, the setting is rust-analyzer.server.path, other editors have some way to override the path. Be sure to point your editor at the absolute path of ~/.cargo/bin/rust-analyzer!
  4. Restart your editor to make sure it got this configuration change and let us know if anything's off!