简体   繁体   English

如何安装旧版本的 rust-src?

[英]How to install old version of rust-src?

My machine have rust nightly-2020-03-24, I want to compile cross-compile crate core.我的机器有 rust nightly-2020-03-24,我想编译交叉编译 crate 核心。 But the command rustup component add rust-src install newest version of rust-src, which rustc-2020-03-24 can't build (due to new feature llvm-asm).但是命令rustup component add rust-src install rust-src 的最新版本,而 rustc-2020-03-24 无法构建(由于新功能 llvm-asm)。 How can I install old version of rust-src?如何安装旧版本的 rust-src?

If not already installed, you can get a specific version of a component by specifying the toolchain when calling rustup (like +stable , +1.44 , etc).如果尚未安装,您可以通过在调用rustup时指定工具链来获取组件的特定版本(如+stable+1.44等)。 In your case:在你的情况下:

rustup +nightly-2020-03-24 component add rust-src 

The source can then be found in ~/.rustup/toolchains/nightly-2020-03-24-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/ .然后可以在~/.rustup/toolchains/nightly-2020-03-24-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/中找到源代码。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM