3 ms·
> People have been making jokes about node_modules for a decade now, but this problem is just as bad in Rust codebases I've seen. Just w.r.t the issue of size
by duped 3y ago
> People have been making jokes about node_modules for a decade now, but this problem is just as bad in Rust codebases I've seen.
Just w.r.t the issue of size (not of scale) - cargo caches sources in ~/.cargo so they're not shared by every project on the system. Additionally, rustc uses dead code elimination by design so there's not nearly as bad an issue as in JS where it's not possible to tree shake out every unused class or method.
Most of the bloat of target directories are stale incremental build artifacts, because cargo does not do any automatic cleanup.
- ViewTrick1002 3y agoAutomatic GC of the cargo cache is available on nightly. Really looking forward to it landing on stable. For large projects I've seen the cache grow to hundreds of GB, and not noticing it until the compilation fails because the disk is full... https://blog.rust-lang.org/2023/12/11/cargo-cache-cleaning.html https://blog.rust-lang.org/2023/12/11/cargo-cache-cleaning.h...
- galangalalgol 3y agoI've had the same issue with conan, and realizing only the. That is why our pipeline took so long, copying tens of GB to the runner. Cargo is mild by comparison.
- deleted 3y ago[deleted]