jplatte / cargo-depgraph

Creates graphviz dependency graphs for Rust projects that use Cargo
GNU General Public License v3.0
151 stars 8 forks source link
cargo-plugin rust

cargo-depgraph

Creates dependency graphs for cargo projects using cargo metadata and graphviz.

Installation

cargo install cargo-depgraph

If you are using Arch Linux, you can alternatively install via pacman -S cargo-depgraph.

Usage

Note: This assumes you have Graphviz installed. There are also online tools that can generate graphics from the textual graphviz graphs cargo depgraph generates, if the command-line graphviz tools like dot aren't your thing.

cargo depgraph [options] | dot -Tpng > graph.png

The full list of options can be seen by running

cargo depgraph --help

Commonly useful options:

cargo-depgraph's dependency graph

cargo-depgraph's dependency graph with transitive dependency edges de-duplicated

Output explanation