I just reinstalled Rust on Win-10 using the rustup-init.exe program. This had no option
to select the install-directory AFAICS.
So all files ended up under f:\ProgramFiler\Rust (the value of %ProgramFiles%).
I keep other programming languages under f:\gv\Prog. So in style with this, I moved everything from f:\ProgramFiler\Rust to f:\gv\Prog\Rust and changed these env-vars:
set CARGO_HOME=f:\gv\Prog\Rust\Cargo
set RUSTUP_HOME=f:\gv\Prog\Rust\Rustup
Is this safe? Are there other env-vars or settings in some obscure files that need a change?
I tested the new install-tree with building RustTls. I found no issues.
I recommend scoop, you can just run scoop install rustup, it installs rustup under scoop apps, but will persist the .rustup and .cargo directory, and set RUSTUP_HOME and CARGO_HOME automatically.