Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Where does `multirust` install the Rust language source code?

I installed the multirust version of the Rust programming language. I was trying to configure the racer code completion package to point to the Rust source code through the RUST_SRC_PATHenvironment variable. However, I can't seem to find the location of the rust source files. When I type which rustc I am pointed to /usr/local/bin probably because there is a symlink to the actual source directory or something. Any info on where the proper directory for the RUST_SRC_PATH variable is for multirust?

like image 292
krishnab Avatar asked Nov 24 '15 18:11

krishnab


2 Answers

By default, rustup doesn't install the source code for the Rust standard library. But you can execute the following command to install it:

$ rustup component add rust-src

The source is installed in ~/.rustup/toolchains/$TOOLCHAIN/lib/rustlib/src/rust/src/ (where $TOOLCHAIN is the name of a toolchain you use).

like image 183
Yuvaraj Loganathan Avatar answered Oct 26 '22 11:10

Yuvaraj Loganathan


Currently, multirust doesn't install the source. This is also mentioned in the context of using racer with multirust.

Instead, follow the instructions in the Racer README:

Fetch the Rust sourcecode from git, or download from https://www.rust-lang.org/install.html

like image 35
Shepmaster Avatar answered Oct 26 '22 10:10

Shepmaster