aboutsummaryrefslogtreecommitdiffstats
path: root/etc/crates-graph.py
Commit message (Collapse)AuthorAgeFilesLines
* Add a minimal alternative to `cargo graph`Simon Sapin2020-04-211-0/+51
I tried `cargo graph` and some of its successors, but didn’t manage to make them produce what I wanted (or in some cases make them work at all.) This Python script reimplements similar functionality based on parsing the (JSON) output of `cargo metadata`. Graphviz graphs can become hard to read very quickly as the number of nodes grows. Servo’s dependency graph is very large, so pruning as much as possible is important. This only shows `path` dependencies (that have their source in this repo), and can take a parameter to only show recursive dependencies of a given crate. See https://github.com/servo/servo/issues/19422#issuecomment-617038366 for an example. I find that `xdot` is best for visualization since it is interactive. This script is not used by anything. I am making this PR only so that we have it somewhere in case it becomes useful again at some point.