How to install +nightly?
Asked Answered
G

2

14

I don't want to use anything but the stable toolchain for my normal work but would like to be able to debug my macros using cargo expand. I don't even now how to use anything but the default stable toolchain.

Gowen answered 10/8, 2020 at 22:24 Comment(1)
All explained in the How Rust is Made and “Nightly Rust” appendix to The Rust Programming Language.Arrive
H
26

You can install nightly rust with rustup toolchain install nightly, then you can run cargo as nightly with rustup run nightly cargo [...more arguments here] or cargo +nightly [...more arguments here]. If you want your normal cargo command to be replaced with nightly as well then you can run rustup default nightly.

Heliolatry answered 10/8, 2020 at 22:41 Comment(0)
M
-2

On Alpine Linux,

apk add rustup

then

rustup-init followed by y, x86_64-unknown-linux-musl, nightly, default and finally 1 and y to do the interactive installation.

refresh shell with source "$HOME/.cargo/env" and now it would build.

PS: I'll update the answer with a non interactive option.

Mayotte answered 30/5, 2024 at 13:48 Comment(1)
Installing Rust via <insert your OS package manager here> is not recommended. Install it from rustup from the official site.Assessment

© 2022 - 2025 — McMap. All rights reserved.