Correct Way to Install Rust on Windows for Multiple Users?

I'd like to install Rust for use by multiple users in a way that minimizes duplication. I initially installed as Admin to X:\Program Files\Rust... using the RUSTUP_HOME and CARGO_HOME environment variables. I set the PATH variable to include X:\Program Files\Rust\Cargo\bin for all Rust users. [X: is usually C: or D: depending on the disk resources of the particular machine.]

This worked, but each user gets his very own (~1GB) of files in C:\Users<username>.rustup. These seem to be mostly full copies of HTML documentation.

In addition, I updated the installation as Admin successfully. But the other users see the initial installation and cannot themselves perform an update. This is likely due to the other users inabililty to write to X:\Program Files\Rust*.

Is having multiple users on one machine something that Rust supports? If so, are there instructions somewhere on how to do this?

The reason for multiple users is for internal accounting. Only one human uses each PC, but to keep track of efforts on different projects, different users are created and used.

Thanks from a Newbie,

1 Like

While installing rustup itself globally is possible, rustup is meant to allow every user to manage toolchains on their own. This requires either putting the toolchains in the user directory (the option rustup uses) or having some system service which you can use to globally install toolchain (which is a security risk). If you want every user to use a specific toolchain, you can instead install rustc globally without rustup. If you are fine with just shrinking the size of the per-user toolchain installs, you can set the minimal profile which excludes among other things docs, rustfmt and clippy. I believe rustup has an option to configure the default profile for the entire system.


You can use the stand-alone installers and manage updates yourself. This is however more limited.


Bjorn and Chris:


It was looking like I was trying to use Rust in a way that was "against the grain" of the install/update philosophy and you confirmed that.

So what I will do is to "go with the flow" and have separate (normal) installs for each user and after any significant "install event" run "FindDuplicateFiles" with the option to Hard-Link identical files. This will maintain the independent-install philosophy and keep disk usage down.

I'll need to add some logic to FDF to make sure file ownership is correctly maintained. FDF was written assuming all files being scanned belonged to the same user.


This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.