2

On crates.io we can easily see the direct dependencies of a crate by just clicking on the Dependencies tab. Is there a way to also easily see the sub-dependencies of a crate? Perhaps in a tree-like view, similar to what cargo tree would display. Or at least the number of all (sub)dependencies.

I think that can be helpful, for example, when we need to decide which crate to use among alternatives. By having an indicator of the total number of (sub)dependencies, we would have a better idea on how "heavy" a library actually is. I think that can be especially useful for a language like Rust where the build speed seems to heavily depend on the number of dependencies.

Shepmaster
  • 388,571
  • 95
  • 1,107
  • 1,366
at54321
  • 8,726
  • 26
  • 46
  • Be careful that the tree for lib is usually dynamic: you may look one minute later and have a dependency updated to incorporate more dependencies. This makes such a website less trivial to do than just listing direct dependencies (assuming you want it to be correct). – Denys Séguret Apr 26 '21 at 19:25
  • This also depends on the operating system used. – frankenapps Apr 27 '21 at 09:17
  • Good point. But in general those cases should be relatively rare. If we want to have a _rough_ idea on the total number of dependencies, data doesn't necessarily need to be 100% accurate or up-to-date (in case it uses some sort of caching instead of real-time tracking). – at54321 Apr 28 '21 at 07:54

0 Answers0