brson/multirust

racer expects SRC_RUST_PATH environment variable, which varies depending on override

carlpaten opened this issue · 2 comments

racer wants a folder with the rust source in it to provide "go to definition" and autocompletion on built-ins. Unfortunately, those vary based on the Rust version.

Some possible work-arounds:

  • Maintain an src folder based on the current default override.
  • Provide multirust run (stable|beta|nightly) racer with the path to the right src folder passed in as an environment variable.
brson commented

I'd like to provide an official way to install the source package, so it can be in a known location. Then tools can use rustc --sysroot to find it.

We're close to being able to do this with the current work on enriching the distribution manifest. We should be able to create a source installer and teach multirust and other tools how to install it.

How do Racer users usually install the source now? (I'm guessing they do whatever they want and set SRC_RUST_PATH how they like).

brson commented

To start, we might create the convention for where the source lives (like rustlib/source/), and create a simple racer-specific script to put it in the right place. Not sure if that's any easier than just doing it the right way upstream.