Manage the shared build-storage settings - #5
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 eachnode_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.sccacheadded to40-packages.ymlunder 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
sccacherather than the/opt/homebrew/bin/sccacheabsolute path the machine had, so the file is not arm-mac-specific.Verification
chezmoi diffpreviewed 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: abincrate with default incremental is non-cacheable, and the win is in dependency rlibs.