From b1d473962ed9bfac4d6bd5bf5e5ef573e0f147b2 Mon Sep 17 00:00:00 2001 From: Taku Kodma <79110363+risu729@users.noreply.github.com> Date: Tue, 19 May 2026 04:46:30 +1000 Subject: [PATCH 1/3] docs: document rust cache workaround --- README.md | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/README.md b/README.md index 3defbd98..553e2862 100644 --- a/README.md +++ b/README.md @@ -94,6 +94,44 @@ You can also extend the default cache key: This gives you full control over cache invalidation based on the specific aspects that matter to your workflow. +### Rust Toolchain Caches + +Rust is managed differently from most mise tools. mise wraps `rustup`, so the +mise cache can restore the `installs/rust` entry while the actual rustup +toolchain and components still live in `RUSTUP_HOME` and Cargo/rustup proxy +binaries live in `CARGO_HOME`. If those homes are not restored with the mise +cache, `mise install` can skip Rust and later `cargo fmt` or `cargo clippy` +can fail with missing `rustfmt` or `clippy` components. See +[jdx/mise-action#215](https://github.com/jdx/mise-action/issues/215). + +If `mise-action` installs Rust and you keep the mise cache enabled, configure +mise's Rust homes under the mise data directory before running this action, and +change the cache key so older Rust-marker-only caches are not reused: + +```yaml +- name: Configure mise Rust homes + run: | + { + echo "MISE_RUSTUP_HOME=${HOME}/.local/share/mise/rustup" + echo "MISE_CARGO_HOME=${HOME}/.local/share/mise/cargo" + } >> "${GITHUB_ENV}" + +- uses: jdx/mise-action@v4 + with: + install: true + cache_key: "{{default}}-rustup-cargo-home-v1" + +- uses: Swatinem/rust-cache@v2 + with: + cache-bin: "false" +``` + +`MISE_RUSTUP_HOME` and `MISE_CARGO_HOME` make mise place rustup toolchains, +rustup metadata, and Cargo/rustup proxy binaries inside the directory saved by +the mise cache. `Swatinem/rust-cache` can still be used after `mise-action` for +Cargo registry, git dependency, and `target` build caches; `cache-bin: "false"` +keeps Cargo binaries owned by the mise cache instead of both caches. + ## GitHub API Rate Limits When installing tools hosted on GitHub (like `gh`, `node`, `bun`, etc.), mise needs to make API calls to GitHub's releases API. Without authentication, these calls are subject to GitHub's rate limit of 60 requests per hour, which can cause installation failures. From 69505b52562b4322cf9606c984c18f0643a5769b Mon Sep 17 00:00:00 2001 From: Taku Kodma <79110363+risu729@users.noreply.github.com> Date: Tue, 19 May 2026 04:55:13 +1000 Subject: [PATCH 2/3] docs: rotate rust cache example key --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 553e2862..9030bab9 100644 --- a/README.md +++ b/README.md @@ -119,7 +119,7 @@ change the cache key so older Rust-marker-only caches are not reused: - uses: jdx/mise-action@v4 with: install: true - cache_key: "{{default}}-rustup-cargo-home-v1" + cache_key: "{{default}}-rustup-cargo-home-v2" - uses: Swatinem/rust-cache@v2 with: From 1ea046b5d9a59238462e27480ce88407d73eb09e Mon Sep 17 00:00:00 2001 From: Taku Kodma <79110363+risu729@users.noreply.github.com> Date: Tue, 19 May 2026 05:22:50 +1000 Subject: [PATCH 3/3] docs: clarify rust cache workaround --- README.md | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 9030bab9..dff113cd 100644 --- a/README.md +++ b/README.md @@ -110,6 +110,7 @@ change the cache key so older Rust-marker-only caches are not reused: ```yaml - name: Configure mise Rust homes + shell: bash run: | { echo "MISE_RUSTUP_HOME=${HOME}/.local/share/mise/rustup" @@ -128,9 +129,11 @@ change the cache key so older Rust-marker-only caches are not reused: `MISE_RUSTUP_HOME` and `MISE_CARGO_HOME` make mise place rustup toolchains, rustup metadata, and Cargo/rustup proxy binaries inside the directory saved by -the mise cache. `Swatinem/rust-cache` can still be used after `mise-action` for -Cargo registry, git dependency, and `target` build caches; `cache-bin: "false"` -keeps Cargo binaries owned by the mise cache instead of both caches. +the mise cache. If you set `mise_dir`, `MISE_DATA_DIR`, or `XDG_DATA_HOME`, +adjust these paths so they stay under the mise data directory that this action +caches. `Swatinem/rust-cache` can still be used after `mise-action` for Cargo +registry, git dependency, and `target` build caches; `cache-bin: "false"` keeps +Cargo binaries owned by the mise cache instead of both caches. ## GitHub API Rate Limits