New crate announcement - cargo-hackerman: if your code takes too long to compile, hackerman can help

94 points manpacket

If your code takes ages to compile you can take several steps:

  1. Check if there are any dependencies present more than once in different versions. cargo hackerman dupes will do that for you.
  2. If a dependency is present more than once - you might want to know what exactly requires more than one copy, cargo hackerman explain will do just that by plotting a visual tree with xdot/graphvis with transitive dependencies de-duplicated (can be disabled with -T) and features expanded (can be disabled with -P).
  3. It also might be interesting to see what exactly it means to have a dependency on a crate. cargo hackerman tree will display its sub-dependencies as a nice visual tree.
  4. cargo hackerman show can be useful to get dependency's Cargo.toml file, the documentation or upstream repository.
  5. And lastly hackerman can generate and update a workspace hack, quite efficient at that: just use cargo hackerman hack and enjoy your redundant recompilation going away. Plus some other tools to restore the original dependencies and manage merge requests if you decide to commit hacked files into your checkout.

https://crates.io/crates/cargo-hackerman

https://github.com/pacak/hackerman/