Rust Dependencies scare Me

69 points by vaguelytagged


msfjarvis

The solution to having too many dependencies is to get more comfortable writing your own code: https://lucumr.pocoo.org/2025/1/24/build-it-yourself/. You’ve already stumbled upon it with the dotenv crate, you’ll just have to go through the same decision tree before every cargo add in the future.

While I agree that Rust can easily lend itself to large dependency trees, I don’t find these rants about Rust dependencies particularly helpful. The problem of “I can’t possibly review all this third-party code” applies to all languages, more so to ones like Java where you generally consume compiled artifacts rather than source code or to Golang where Google is effectively MITM’ing all dependency requests by default and the source you pull can differ from what you saw in the Git repo. I also rarely see mention of cargo-vet or cargo-crev which are trying to work on this very difficult problem using distributed trust.