Is Rust a Node.js-like dependencies hell?

Example: "Rand" is not native, and the official library has 15 dependencies... 🤔

@angristan J'ai bien l'impression que oui, et c'est un peu le drame des packages managers modernes : plein de facilités pour la gestion des dépendances, ça mène à une non-gestion complète des dépendances. :-(

@angristan That's a good question!

It looks to me that it's not quite as bad as npm? The packages aren't quite as small (it's "implement this RNG", not "add some spaces to a string"), and some are built from the same repo - those "rand_*" ones.

The worst here is "rustc_version", which ends up shelling out to call `rustc -v`, just to then parse the version, which this then uses to conditionally compile stuff. I'd say that should be part of the language - even C has some here!

@angristan Rust being a compiled language, small dependencies have a small impact on code size and startup time. Alas, having many deps *does* affect compile time and link time. It's the price of modularity and code reuse.

Sign in to participate in the conversation

Fast, secure and up-to-date instance, welcoming everyone around the world. Join us! 🌍
Up since 04/04/2017. ✅

Why should you sign up on

This instance is not focused on any theme or subject, feel free to talk about whatever you want. Although the main language is english, we accept every single language and country.

We're connected to the whole ActivityPub fediverse and we do not block any foreign instance nor user.

We do have rules, but the goal is to have responsible users.

The instance uses a powerful server to ensure speed and stability, and it has good uptime. We follow state-of-the-art security practices.

Also, we have over 300 custom emojis to unleash your meming potential!

Looking for a Kpop themed instance? Try