Skip to content

Manage the shared build-storage settings - #5

Merged
froppa merged 3 commits into
masterfrom
feat/shared-build-storage
Sep 1, 2026
Merged

Manage the shared build-storage settings#5
froppa merged 3 commits into
masterfrom
feat/shared-build-storage

Conversation

@froppa

@froppa froppa commented Sep 1, 2026

Copy link
Copy Markdown
Owner

Two machine settings that stop package managers and rustc duplicating work across checkouts were applied by hand and were not managed here, so a new machine would not get them. This puts them under chezmoi and adds the package that one of them depends on.

  • home/dot_bunfig.toml — bun installs by hardlinking from its own cache instead of copying every package into each node_modules. pnpm already does this by design; npm has no equivalent.
  • home/dot_cargo/config.toml — rustc compiles through sccache, so a dependency crate is built once per machine rather than once per checkout.
  • sccache added to 40-packages.yml under build tools — the half that installs it.

Deliberately not a shared [build] target-dir. Cargo takes an exclusive lock on the directory it builds into, so pointing several checkouts at one dir would serialise every build that runs in parallel. sccache is keyed by compilation inputs and is safe for concurrent readers and writers; target dirs stay per-project.

The wrapper is recorded as bare sccache rather than the /opt/homebrew/bin/sccache absolute path the machine had, so the file is not arm-mac-specific.

Verification

chezmoi diff previewed both files before applying, and the apply was scoped to those two paths — no unrelated pending drift was touched. Afterwards a scratch crate built clean (cargo build, exit 0) with sccache logging 4 compile requests, confirming the bare name resolves. Zero hits/misses on that crate is expected: a bin crate with default incremental is non-cacheable, and the win is in dependency rlibs.

froppa added 3 commits August 8, 2026 23:58
Two settings that make package managers and rustc stop duplicating work
across checkouts were applied to this machine by hand and were not managed
here, so a new machine would not get them.

- ~/.bunfig.toml: bun installs by hardlinking from its own cache instead of
  copying every package into each node_modules. pnpm already does this by
  design; npm has no equivalent.
- ~/.cargo/config.toml: rustc compiles through sccache, so a dependency
  crate is built once per machine rather than once per checkout.
  Deliberately not a shared [build] target-dir — cargo takes an exclusive
  lock on the directory it builds into, so one shared dir would serialise
  every build that runs in parallel.
- sccache added to the brew list, which is the half that installs it.

The wrapper is recorded as bare `sccache` rather than the absolute
/opt/homebrew/bin path the machine had, so the file is not arm-mac-specific.
Verified after applying: a scratch crate builds clean and sccache logs the
compile requests, so the bare name resolves.
@froppa
froppa merged commit 6a58fa1 into master Sep 1, 2026
2 checks passed
@froppa
froppa deleted the feat/shared-build-storage branch September 5, 2026 17:19
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