$HOME is meant for user files. I wish rustup used /tmp instead of $HOME/.rustup/tmp.
Example use case: my home folder at school has a very constrained amount of space (about 3GB), which means that installing, say, rust-src might fail if I run out of space. This is regardless of whether or not I have sufficient space to accommodate the fully installed rust-src component.
To anyone else thinking of symlinking ~/.rustup/tmp to /tmp, it (probably) won't work. tmp needs to be on the same filesystem as ~/.rustup/toolchains/ as rustup uses rename to move the downloaded files.
@Diggsey would you mind explaining why this "feature" should be rejected ?
It's in "needs further discussion", as per @Stebalien's comment. If you run out of space when downloading to the tmp folder, then the install would have failed anyway - all it does is download to the tmp folder and then rename to the correct location, so it would still have failed had it downloaded to a different location, and then copied the files across.
Most helpful comment
To anyone else thinking of symlinking
~/.rustup/tmpto/tmp, it (probably) won't work.tmpneeds to be on the same filesystem as~/.rustup/toolchains/as rustup usesrenameto move the downloaded files.