racer icon indicating copy to clipboard operation
racer copied to clipboard

Configuration when installed rust from homebrew

Open detj opened this issue 8 years ago • 4 comments

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.

detj avatar Aug 18 '16 08:08 detj

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.

DominoTree avatar Aug 21 '16 20:08 DominoTree

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 avatar Aug 21 '16 20:08 DominoTree

@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.

detj avatar Aug 22 '16 09:08 detj

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

fayelee0 avatar Apr 14 '18 05:04 fayelee0