Commit 2687cf4
feat(multiplexer): add Rust compiler cache sharing with sccache (shepherdjerred#175)
* feat(multiplexer): add Rust compiler cache sharing with sccache
Add shared Docker volume mounts for Rust compilation caching across
all mux sessions. Uses progressive enhancement approach - works today
with cargo dependency caching, automatically improves when sccache is
installed in the dotfiles image.
Changes:
- Add 3 cache volumes: cargo-registry, cargo-git, sccache
- Configure sccache via RUSTC_WRAPPER environment variable
- Add `mux clean-cache` command for manual cleanup
- Update tests to verify cache configuration
Benefits:
- Dependency downloads: 0s (vs 30-60s)
- Compilation: 90%+ faster with sccache
- Works across worktrees and different project paths
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
* fix: use non-root accessible paths for Rust cache volumes
Fix critical permissions issue where cache volumes were mounted to
paths inaccessible by non-root users (/root, /usr/local/cargo).
Changes:
- Mount cargo caches to /workspace/.cargo (instead of /usr/local/cargo)
- Mount sccache to /workspace/.cache/sccache (instead of /root/.cache)
- Add CARGO_HOME=/workspace/.cargo environment variable
- Update documentation to reflect new paths
- Update test assertions for new paths
Containers run as non-root (--user flag), so all caches must be under
/workspace (HOME) where the user has write access.
Addresses GitHub Actions bot review feedback.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Sonnet 4.5 <noreply@anthropic.com>1 parent 6e90aab commit 2687cf4
2 files changed
Lines changed: 135 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
124 | 124 | | |
125 | 125 | | |
126 | 126 | | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
127 | 139 | | |
128 | 140 | | |
129 | 141 | | |
| |||
245 | 257 | | |
246 | 258 | | |
247 | 259 | | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
248 | 286 | | |
249 | 287 | | |
250 | 288 | | |
| |||
791 | 829 | | |
792 | 830 | | |
793 | 831 | | |
| 832 | + | |
| 833 | + | |
| 834 | + | |
| 835 | + | |
| 836 | + | |
| 837 | + | |
| 838 | + | |
| 839 | + | |
| 840 | + | |
| 841 | + | |
| 842 | + | |
| 843 | + | |
| 844 | + | |
| 845 | + | |
| 846 | + | |
| 847 | + | |
| 848 | + | |
| 849 | + | |
| 850 | + | |
| 851 | + | |
| 852 | + | |
| 853 | + | |
| 854 | + | |
| 855 | + | |
| 856 | + | |
| 857 | + | |
| 858 | + | |
| 859 | + | |
| 860 | + | |
| 861 | + | |
| 862 | + | |
| 863 | + | |
| 864 | + | |
| 865 | + | |
| 866 | + | |
| 867 | + | |
| 868 | + | |
| 869 | + | |
| 870 | + | |
| 871 | + | |
| 872 | + | |
| 873 | + | |
| 874 | + | |
| 875 | + | |
| 876 | + | |
794 | 877 | | |
795 | 878 | | |
796 | 879 | | |
| |||
1120 | 1203 | | |
1121 | 1204 | | |
1122 | 1205 | | |
1123 | | - | |
| 1206 | + | |
1124 | 1207 | | |
1125 | 1208 | | |
1126 | | - | |
1127 | | - | |
| 1209 | + | |
| 1210 | + | |
1128 | 1211 | | |
1129 | 1212 | | |
1130 | 1213 | | |
| |||
1235 | 1318 | | |
1236 | 1319 | | |
1237 | 1320 | | |
1238 | | - | |
| 1321 | + | |
1239 | 1322 | | |
1240 | 1323 | | |
1241 | | - | |
1242 | | - | |
| 1324 | + | |
| 1325 | + | |
1243 | 1326 | | |
1244 | 1327 | | |
1245 | 1328 | | |
| |||
1270 | 1353 | | |
1271 | 1354 | | |
1272 | 1355 | | |
1273 | | - | |
| 1356 | + | |
1274 | 1357 | | |
1275 | 1358 | | |
1276 | | - | |
1277 | | - | |
| 1359 | + | |
| 1360 | + | |
1278 | 1361 | | |
1279 | 1362 | | |
1280 | 1363 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
99 | 99 | | |
100 | 100 | | |
101 | 101 | | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
102 | 109 | | |
103 | 110 | | |
104 | 111 | | |
| |||
251 | 258 | | |
252 | 259 | | |
253 | 260 | | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
254 | 297 | | |
255 | 298 | | |
256 | 299 | | |
| |||
0 commit comments