Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
1d5a9d1
refactor(self-update): clarify helper names
Cloud0310 Sep 22, 2026
df487bb
refactor(shell): simplify shell representations
Cloud0310 Sep 22, 2026
deb1edc
refactor(install): accept explicit installation paths
Cloud0310 Sep 22, 2026
9c4f6cb
refactor(shell): reuse resolved paths during setup and cleanup
Cloud0310 Sep 22, 2026
216382a
test(install): cover post-install messages
Cloud0310 Sep 22, 2026
5faff66
refactor(install): unify message path inputs across platforms
Cloud0310 Sep 22, 2026
e62261e
refactor(install): replace canonical_cargo_home with HomeDisplay
Cloud0310 Sep 22, 2026
7db39fe
fix(windows): create an independent temporary uninstall GC executable
Cloud0310 Sep 22, 2026
70f2ca6
fix(windows): run uninstall GC from the system temporary directory
Cloud0310 Sep 22, 2026
0406583
feat(home): resolve opt-in category homes
Cloud0310 Sep 22, 2026
5936448
feat(shell): use resolved paths while recognizing legacy source commands
Cloud0310 Sep 22, 2026
7e2c0fb
feat(cache): store cached files in the cache home
Cloud0310 Sep 22, 2026
c7df464
feat(toolchain): store toolchains and fallback data in the data home
Cloud0310 Sep 22, 2026
7323738
feat(state): store runtime state in the state home
Cloud0310 Sep 22, 2026
b32ee6a
feat(config): store settings in the config home
Cloud0310 Sep 22, 2026
738ad9e
fix(config): avoid resolving legacy homes in category mode
Cloud0310 Sep 22, 2026
49f4c7f
feat(installer): use category homes for binaries and shell scripts
Cloud0310 Sep 22, 2026
5109cb0
feat(cli): display resolved category homes
Cloud0310 Sep 22, 2026
721b6b1
feat(uninstall): clean legacy and category installations
Cloud0310 Sep 22, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@ features = [
"Win32_Foundation",
"Win32_Security",
"Win32_Storage_FileSystem",
"Win32_System_Com",
"Win32_System_Console",
"Win32_System_Diagnostics_ToolHelp",
"Win32_System_IO",
Expand All @@ -130,6 +131,7 @@ features = [
"Win32_System_Threading",
"Win32_System_WindowsProgramming",
"Win32_UI",
"Win32_UI_Shell",
"Win32_UI_WindowsAndMessaging",
]
version = "0.61"
Expand Down
2 changes: 1 addition & 1 deletion src/cli/proxy_mode.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ pub async fn main(
current_dir: PathBuf,
process: &Process,
) -> anyhow::Result<ExitStatus> {
self_update::cleanup_self_updater(process)?;
self_update::cleanup_self_updater(&process.rustup_bin_home()?)?;

let _setup = job::setup();
let mut args = process.args_os().skip(1);
Expand Down
44 changes: 35 additions & 9 deletions src/cli/rustup_mode.rs
Original file line number Diff line number Diff line change
Expand Up @@ -388,7 +388,7 @@ enum ShowSubcmd {
verbose: bool,
},

/// Display the computed value of RUSTUP_HOME
/// Display resolved Rustup home directories
Home,

/// Show the default profile used for the `rustup install` command
Expand Down Expand Up @@ -703,7 +703,7 @@ pub async fn main(
.bin("rustup")
.complete();

self_update::cleanup_self_updater(process)?;
self_update::cleanup_self_updater(&process.rustup_bin_home()?)?;

use clap::error::ErrorKind::*;
let matches = match Rustup::try_parse_from(process.args_os()) {
Expand Down Expand Up @@ -1271,14 +1271,27 @@ async fn show(cfg: &Cfg<'_>, verbose: bool) -> anyhow::Result<ExitCode> {
cfg.default_host_tuple()?
)?;

// Print rustup home directory
{
let mut t = t.lock();
writeln!(
t,
"{HEADER}rustup home: {HEADER:#}{}",
cfg.rustup_dir.display()
)?;
if cfg.process.use_category_home() {
writeln!(t, "{HEADER}rustup homes:{HEADER:#}")?;
for (name, home) in [
("config", &cfg.rustup_config_dir),
("state", &cfg.rustup_state_dir),
("data", &cfg.rustup_data_dir),
("cache", &cfg.rustup_cache_dir),
("bin", &cfg.process.rustup_bin_home()?),
] {
writeln!(t, " {name}: {}", home.display())?;
}
} else {
// In legacy mode, all four category homes equal the resolved RUSTUP_HOME.
writeln!(
t,
"{HEADER}rustup home: {HEADER:#}{}",
cfg.rustup_data_dir.display()
)?;
}
writeln!(t)?;
}

Expand Down Expand Up @@ -1426,7 +1439,20 @@ async fn show_active_toolchain(cfg: &Cfg<'_>, verbose: bool) -> anyhow::Result<E

#[tracing::instrument(level = "trace", skip_all)]
fn show_rustup_home(cfg: &Cfg<'_>) -> anyhow::Result<ExitCode> {
writeln!(cfg.process.stdout().lock(), "{}", cfg.rustup_dir.display())?;
let mut stdout = cfg.process.stdout().lock();
if cfg.process.use_category_home() {
for (name, home) in [
("config", &cfg.rustup_config_dir),
("state", &cfg.rustup_state_dir),
("data", &cfg.rustup_data_dir),
("cache", &cfg.rustup_cache_dir),
] {
writeln!(stdout, "{name}: {}", home.display())?;
}
} else {
// In legacy mode, all four category homes equal the resolved RUSTUP_HOME.
writeln!(stdout, "{}", cfg.rustup_data_dir.display())?;
}
Ok(ExitCode::SUCCESS)
}

Expand Down
Loading
Loading