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


#1

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?


#2

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


#3

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


#4

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


#5

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


#6

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.


#7

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.


#8

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


#9

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


#10

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

Looks pretty existent to me. :slight_smile:


#11

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


#12

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


#13

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.