[Media] cargo-depflame: Your dependency tree as a flamegraph

183 points sinelaw 31 comments
[Media] cargo-depflame: Your dependency tree as a flamegraph

I created a small tool to view the dependency tree of a rust project as a flamegraph.

https://github.com/sinelaw/cargo-depflame

Install & rune:

cargo install cargo-depflame

# from within your project:

cargo depflame

Features:

- Click to zoom

- Reverse dependencies view

- Enable/disable cargo features and see the effect on the tree

Also includes:

- A table view to find the "heaviest" (direct or sub) dependencies that introduce the highest number of unique transitive deps.

- Heuristic suggestions based on simple (but fast!) regex-based analysis of the dependencies' source code. Can be seen as a way to find obvious things quickly, before running heavier tools like cargo-udeps

Let me know if you find it useful!