Hi! First time opening an issue, so let me know if I've missed anything important :).
rust-lang/cargo#17258 (merged 2026-07-24) uses a new path format for crates. Version 1 used <pkg>-<hash>, which rust-cache assumes, but this is no longer the case. Now caching is broken for crates with hyphenated crate names.
A temporary fix for users is to use the environment variable __CARGO_TEMPORARY_BUILD_DIR_NEW_LAYOUT_OPT_OUT=1 before a fix lands. However, this variable's effect is internal and unstable for Cargo and could disappear in a future release. To do so, you can do something like this in your actions YAML file:
env:
__CARGO_TEMPORARY_BUILD_DIR_NEW_LAYOUT_OPT_OUT: "1"
I have vibe-coded a minimal reproduction for the issue, available at https://github.com/claytonwramsey/rust-cache-buildir-repro.
Hi! First time opening an issue, so let me know if I've missed anything important :).
rust-lang/cargo#17258 (merged 2026-07-24) uses a new path format for crates. Version 1 used
<pkg>-<hash>, whichrust-cacheassumes, but this is no longer the case. Now caching is broken for crates with hyphenated crate names.A temporary fix for users is to use the environment variable
__CARGO_TEMPORARY_BUILD_DIR_NEW_LAYOUT_OPT_OUT=1before a fix lands. However, this variable's effect is internal and unstable for Cargo and could disappear in a future release. To do so, you can do something like this in your actions YAML file:I have vibe-coded a minimal reproduction for the issue, available at https://github.com/claytonwramsey/rust-cache-buildir-repro.