William Taylor
William Taylor

Reputation: 629

How to install old version of rust-src?

My machine have rust nightly-2020-03-24, I want to compile cross-compile crate core. 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). How can I install old version of rust-src?

Upvotes: 3

Views: 2624

Answers (1)

kmdreko
kmdreko

Reputation: 60497

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

Upvotes: 0

Related Questions