Who doesn't the installer add rust to PATH anymore?

When I tried a Rust beta earlier the installer added rust\bin to PATH. But now when I uninstalled the beta and installed 1.0.0 stable instead the installer no longer adds rust to PATH. Is there some reason it no longer does this?

1 Like

What platform are you on (Windows, Linux, OSX?) If you are on Windows, did you try opening a new/fresh Command Prompt?

This is on Windows. Re-opening PowerShell was the first thing I did. I also inspected the PATH environment variable, and Rust was missing.

You may need to log off for the changes to take effect.

Also maybe take a look here: Powershell and "$ rustc" command :(

Yes, Rust installer for Windows does not add it to the PATH by default. You can change this by going through the "Advanced" installation sequence.
As for why: if you have multiple versions of Rust installed at the same time (nightly, beta, stable, 32-bit, 64-bit), they end up fighting each other for PATH precedence.

Is that even possible? The last time I tried, the first thing the installer did was unilaterally remove the existing install.

Also, just to note: if you use the exe installer, you don't need to go into advanced anything; whether to add to PATH or not is simply a checkbox on the final page of the installer.

Exe installer is no more.
And yes, the msi installer allows different release channels to be installed side-by-side.

FYI the exe installer is still available and a lot of CI scripts rely on it.

https://static.rust-lang.org/dist/rust-nightly-i686-pc-windows-gnu.exe

Looks pretty existent to me. :slight_smile:

Okay, okay, it's still being built, but it is deprecated.

I suppose that makes sense. But the Rust book seems to be written assuming that rustc and cargo will be in the PATH.

I fell victim to this. Didn't notice a checkbox but I'm blaming myself. A note in the book would be nice. Excited to give it a spin.

1 Like