Is Rust a Node.js-like dependencies hell?
Example: "Rand" is not native, and the official library has 15 dependencies... 🤔
@angristan oh gosh reminds me of the piston crew
@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 Yes It is 😕
@angristan Rust doesn't have recursive node_modules. 😛
@angristan Yes. The standard rust lib is very very small.
@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 #defines 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.