Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Setting RUSTUP_HOME and CARGO_HOME before running rustup installation does not work in Windows

Open
#4,687 7 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
55/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Quiet
Tech stack
rust
Domain
tooling

Research direction

Start by reproducing the installation on Windows with RUSTUP_HOME and CARGO_HOME set, launching rustup-init.exe as described. Follow the installer path that reads these environment variables and verify that the resulting .rustup and .cargo directories use the configured locations rather than %USERPROFILE%.

Written by the indexing model from the issue text.

Description

bug

Defining RUSTUP_HOME and/or CARGO_HOME environment variables to override default installation directory for .cargo and .rustup does not work (in Windows at least).

Steps to reproduce:

Define RUSTUP_HOME as an environment variable
Define CARGO_HOME as an environment variable
Double click on rustup-init.exe to begin the installation

Result:

.rustup and .cargo will be installed at the default directory which is %USERPROFILE%.

Dominant language
Rust
Stars
7k
Forks
1.1k
Avg merge
1d 1h
Merged PRs (30d)
46

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from rust-lang/rustup

All issues in rust-lang/rustup

Similar issues

More Rust issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.