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_PATH
environment 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
?
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).
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With