This is useful for debugging and checking that the graph is what you think it is.
We may not necessarily want to add an in-cargo way of doing this, but you could certainly do it with the graphviz crate from the standard distribution along with decoding the Cargo.lock file.
I saw this issue when I was looking for a similar tool, ended up making this: https://github.com/maxsnew/rust-deps-graph
It looks like https://github.com/maxsnew/cargo-dot serves this well, so I'm going to close this for now. Thanks @maxsnew!
Hey, just discovered this thread. I'm working on a web service (hosted on heroku) that automatically generates the dependency graph images
https://github.com/frewsxcv/crate-deps
If anyone has ideas for improvements, let me know
Cargo-tree is another great solution.
Expected to have this functionality builtin but cargo-tree did the job.
Are there any plans to implement this in cargo it self?
Most helpful comment
Cargo-tree is another great solution.