2026-10-26 17:26 UTC
Replies (1)
-
@Ferk@lemmy.ml 2026-10-26 17:43
Ok, so that’s vendoring. So for example, Rust regex crate also tries to prevent duplicating efforts so it also its own dependencies (regex-syntax, regex-automata, memchr, some library for fast dictionary matching, etc)… Rust packages are very modular with the goal of keeping very simply reusable pieces, and this is what makes something like cargo necessary. If you want to vendor regex by including it into your code, you also need to include those tiny modules. You are right having big dependency trees has risks, but I think avoiding a dedicated package manager actually makes that nightmare much worse. Because Cargo is deeply integrated into Rust, it generates a Cargo.lock file that guarantees 100% reproducible builds across every machine. It also allows developers to run cargo audit, which instantly scans the dependencies against a live database of vulnerabilities. You don’t get any of that when you vendor, and you’ll have to manually actively monitor your dependencies for vulnerabilities anyway.