From 845fc16ebf5ec84f87a94ceaf69bb79c004b3a76 Mon Sep 17 00:00:00 2001 From: Will Pfleger Date: Sat, 10 Oct 2026 12:50:52 -0400 Subject: [PATCH] chore(hermit): share one CARGO_HOME across worktrees (#8250) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 🤖 Hermit defaults `CARGO_HOME` to each checkout's `.hermit/rust`, so every worktree sees dependency sources at a different absolute path. sccache keys Rust compiles on those paths, which means the same dependency built in two worktrees almost never hits the cache. This pins `CARGO_HOME` to `${HOME}/.cargo` in `bin/hermit.hcl`, the same setting buzz-app already uses. CI also lines up better: the workflows that activate Hermit and cache `~/.cargo/registry` / `~/.cargo/git` were caching a directory cargo wasn't using (cargo wrote to `$GITHUB_WORKSPACE/.hermit/rust`). With this change those cache paths are where cargo actually puts the registry and git checkouts. The `MESH_ROOT` lookups in `_ci-desktop-macos.yml`, `release.yml`, and `signed-macos-canary.yml` already read `${CARGO_HOME:-$HOME/.cargo}`, so they follow either way. Signed-off-by: Will Pfleger Co-authored-by: Duncan --- bin/hermit.hcl | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/bin/hermit.hcl b/bin/hermit.hcl index b429ec9613..5b76c78ca4 100644 --- a/bin/hermit.hcl +++ b/bin/hermit.hcl @@ -1 +1,5 @@ manage-git = true + +env = { + "CARGO_HOME": "${HOME}/.cargo", +}