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

元气小坏坏 提交于 2019-12-08 15:57:57

问题


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?


回答1:


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




回答2:


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



来源:https://stackoverflow.com/questions/33901423/where-does-multirust-install-the-rust-language-source-code

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!