Where does rustup install itself to?
Solution 1
By default, rustup is also installed to your home directory:
$ which rustup
/Users/shep/.cargo/bin/rustup
The documentation states:
rustup
installsrustc
,cargo
,rustup
and other standard tools to Cargo'sbin
directory. On Unix it is located at$HOME/.cargo/bin
and on Windows at%USERPROFILE%\.cargo\bin
. This is the same directory thatcargo install
will install Rust programs and Cargo plugins.
It goes on to describe how to change the defaults:
rustup
allows you to customise your installation by setting the environment variablesCARGO_HOME
andRUSTUP_HOME
before running the rustup-init executable. As mentioned in the Environment Variables section,RUSTUP_HOME
sets the root rustup folder, which is used for storing installed toolchains and configuration options.CARGO_HOME
contains cache files used by cargo.
Solution 2
In my case rustup (along with it's installed toolchains) is in a folder named .rustup which is on the same level as .cargo
Related videos on Youtube
Adrian
Updated on June 04, 2022Comments
-
Adrian almost 2 years
I understand that
rustup
installs therustc
andcargo
binaries to~/.cargo/bin
, but where does it install therustup
executable to? As far as I can tell this isn't explained in any documentation and running the installer doesn't tell you either. I'd like to avoid it being installed to anywhere except my home directory, if possible. I'm using macOS if that makes a difference. -
aaaaaa about 3 yearsfwiw I tried installing via the standalone msi. It does not install in the default location as described and I didn't bother to check where it was installed because my path was also not updated as expected. So I uninstalled it then chose the appropriate exe under forge.rust-lang.org/infra/…. This worked fine
-
Shepmaster almost 3 yearsDoes Chocolatey install rustup? That's what this question is about: Where does rustup install itself to? This question isn't about
rustc
in general. -
Kyle Stay almost 3 yearsIt doesn't, but this is the first question/answer that comes up when you google "where does rust install itself?". I guess I didn't read the whole question, but this answer seems likely to help others to me.