racer
racer copied to clipboard
Configuration when installed rust from homebrew
Any idea how to configure RUST_SRC_PATH
if I install rust through brew. I would want to continue to use brew to upgrade rustc in future as well as its convenient. Also, do I need to always checkout the rust source code in order to use racer? I don't want to manually update the source code every time there's a new release of rust.
Homebrew installs Rust binaries but not the source, so you'll have to download the source and set the environment variable yourself to point to wherever you'd like to keep it.
I believe people currently use https://rustup.rs/ instead of Homebrew to manage Rust toolchains because things are still changing quickly enough that it's useful to keep multiple versions of Rust installed at the same time. Like, Homebrew, I believe that Rustup only installs binaries, so you'll still need to manage the source locations yourself.
You could always write a shell script to download a Rust source tree and point an environment variable at it, but that's probably more effort than it takes to just download it yourself once each six weeks, when stable and beta releases happen.
@DominoTree I stumbled across https://rustup.rs/ after posting this issue and it makes sense to use rustup instead of homebrew for rust. Agreed, I can always do that, but was hoping there would be some tooling provided by rustup or racer as the availability of the source is a common requirement.
brew install rust
path /usr/local/share/rust/rust_src is source path You can set RUST_SRC_PATH=/usr/local/share/rust/rust_src