Similar feeling here. Cargo makes it so simple to add tons of dependencies that it is really hard not to do it. But that does not stop here: even if I try to be careful with adding dependencies, a couple dependencies are likely to pull tens of transitive dependencies each. "Then don't depend on them", you say. Sure, but that means I won't write my project, because I won't write those things from scratch. I could prob…
Rust’s dependencies are starting to worry me
11–20 of 593 posts
Re: Rust’s dependencies are starting to worry me
#12> Many call for adding more to the rust standard library much like Go This is the way.
We do not need to saddle Rust with garbage that will feel dated like Python's standard library. Cargo does the job just fine. We just need some high quality optional batteries.
Embedded projects are unlikely to need standard library bloat. No_std should be top of mind for everyone.
Something that might make additional libraries feel more first class: if cargo finally got namespaces and if the Rust project took on "@rust/" as the org name to launch officially sanctioned and maintained packages.
Re: Rust’s dependencies are starting to worry me
#13> dotenv is unmaintained. How much maintenance could you possibly need to load secrets from .env into the environment.
Re: Rust’s dependencies are starting to worry me
#14Re: Rust’s dependencies are starting to worry me
#15Earlier quoted context omitted.
There should be a second stdlib with relaxed stability guarantees. Don't fill the normal stdlib full of cruft that can never be changed again.
Yeah, I agree. Something like the Boost lib for C++
Re: Rust’s dependencies are starting to worry me
#16> Many call for adding more to the rust standard library much like Go This is the way.
There should be a second stdlib with relaxed stability guarantees. Don't fill the normal stdlib full of cruft that can never be changed again.
It's unfortunate that the response so far hasn't been very positive
Re: Rust’s dependencies are starting to worry me
#17Similar feeling here. Cargo makes it so simple to add tons of dependencies that it is really hard not to do it. But that does not stop here: even if I try to be careful with adding dependencies, a couple dependencies are likely to pull tens of transitive dependencies each. "Then don't depend on them", you say. Sure, but that means I won't write my project, because I won't write those things from scratch. I could prob…
You need to think a bit harder about that, to help you decide whether your position is rational.
Re: Rust’s dependencies are starting to worry me
#18Re: Rust’s dependencies are starting to worry me
#19But that's not practical for all situations. For example, Web frontend developer culture might be the worst environment, to the point you often can't get many things done in feasible time, if you don't adopt the same reckless practices.
I'm also seeing it now with the cargo-culting of opaque self-hosted AI tools and models. For learning and experimenting, I'd spend more time sufficiently compartmentalizing an individual tool than with using it.
This weekend, I'm dusting off my Rust skills, for a small open source employability project (so I can't invest in expensive dependency management on this one). The main thing thing bothering me isn't allocation management, but the sinking feeling when I watch the cast-of-thousands explosion of transitive dependencies for the UI and async libraries that I want to use. It's only a matter of time before one of those is compromised, if not already, and one is all it takes.
Re: Rust’s dependencies are starting to worry me
#20> dotenv is unmaintained. How much maintenance could you possibly need to load secrets from .env into the environment.
What this means in practice is that the call to invoke dotenv should also be marked as unsafe so that the invoker can ensure safety by placing it at the right place.
If no one is maintaining the crate, that won’t happen and someone might try to load environment variables at a bad time.