Skip to content

[2/9] feat: allow caching all Rust crate types + atomic output + FORK_LOCK#2

Open
mmastrac wants to merge 1 commit intovercel/ci-fixesfrom
vercel/crate-type-allow-hash
Open

[2/9] feat: allow caching all Rust crate types + atomic output + FORK_LOCK#2
mmastrac wants to merge 1 commit intovercel/ci-fixesfrom
vercel/crate-type-allow-hash

Conversation

@mmastrac
Copy link
Copy Markdown
Collaborator

Summary

  • When SCCACHE_RUST_CRATE_TYPE_ALLOW_HASH env var is set, all crate types (bin, dylib, cdylib, proc-macro) become cacheable
  • The env var value is hashed into the cache key only when unsupported crate types are present, so machines with different linker setups get separate cache entries
  • Enables per-machine binary crate caching by setting the env var to a machine-specific value (e.g., hostname)

Stack: 2/6

@mmastrac mmastrac changed the base branch from vercel/multilevel-caching to vercel/00-multilevel-caching March 31, 2026 17:28
@mmastrac mmastrac changed the title feat: allow caching all Rust crate types via SCCACHE_RUST_CRATE_TYPE_ALLOW_HASH [1/5] feat: allow caching all Rust crate types via SCCACHE_RUST_CRATE_TYPE_ALLOW_HASH Mar 31, 2026
@mmastrac mmastrac changed the base branch from vercel/00-multilevel-caching to vercel/multilevel-caching March 31, 2026 17:29
@mmastrac mmastrac force-pushed the vercel/crate-type-allow-hash branch from 523a520 to daedab4 Compare March 31, 2026 17:35
@mmastrac mmastrac force-pushed the vercel/multilevel-caching branch from 22b3037 to 822ae6b Compare March 31, 2026 17:35
@mmastrac mmastrac changed the title [1/5] feat: allow caching all Rust crate types via SCCACHE_RUST_CRATE_TYPE_ALLOW_HASH [2/6] feat: allow caching all Rust crate types via SCCACHE_RUST_CRATE_TYPE_ALLOW_HASH Mar 31, 2026
@mmastrac mmastrac force-pushed the vercel/crate-type-allow-hash branch from daedab4 to adeb701 Compare March 31, 2026 17:38
@mmastrac mmastrac force-pushed the vercel/multilevel-caching branch from 822ae6b to 8261038 Compare March 31, 2026 17:38
@mmastrac mmastrac changed the title [2/6] feat: allow caching all Rust crate types via SCCACHE_RUST_CRATE_TYPE_ALLOW_HASH [2/7] feat: allow caching all Rust crate types via SCCACHE_RUST_CRATE_TYPE_ALLOW_HASH Mar 31, 2026
@mmastrac mmastrac force-pushed the vercel/crate-type-allow-hash branch 3 times, most recently from ceaf44f to a1ea5d5 Compare April 2, 2026 00:52
@mmastrac mmastrac changed the title [2/7] feat: allow caching all Rust crate types via SCCACHE_RUST_CRATE_TYPE_ALLOW_HASH [2/9] feat: allow caching all Rust crate types + atomic output + FORK_LOCK Apr 2, 2026
@mmastrac mmastrac force-pushed the vercel/multilevel-caching branch from 8261038 to 98b4fab Compare April 16, 2026 21:35
@mmastrac mmastrac force-pushed the vercel/crate-type-allow-hash branch 2 times, most recently from 9c26759 to 6026566 Compare April 17, 2026 14:44
…ALLOW_HASH

When the SCCACHE_RUST_CRATE_TYPE_ALLOW_HASH environment variable is set,
all crate types (bin, dylib, cdylib, proc-macro) become cacheable. The
env var value is hashed into the cache key only when unsupported crate
types are present, so machines with different linker setups get separate
cache entries.

This enables per-machine binary crate caching by setting the env var to
a machine-specific value (e.g., a hash of the linker toolchain).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@mmastrac mmastrac force-pushed the vercel/crate-type-allow-hash branch from 6026566 to 0ba527a Compare April 17, 2026 15:08
@mmastrac mmastrac changed the base branch from vercel/multilevel-caching to vercel/ci-fixes April 17, 2026 15:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant