Skip to content

armgit / zed

Public Imported from GitHub
0

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.

Add a crate-dep-graph script for showing the crate dependency graph

Max Brunsfeld43da36948bdb
diff --git a/script/crate-dep-graph b/script/crate-dep-graph
new file mode 100755
index 00000000000..25285cc097c
--- /dev/null
+++ b/script/crate-dep-graph
@@ -0,0 +1,19 @@
+#!/bin/bash
+
+set -e
+
+if [[ -x cargo-depgraph ]]; then
+ cargo install cargo-depgraph
+fi
+
+graph_file=target/crate-graph.html
+
+cargo depgraph \
+ --workspace-only \
+ --offline \
+ --root=zed,cli,collab \
+ --dedup-transitive-deps \
+ | dot -Tsvg > $graph_file
+
+echo "open $graph_file"
+open $graph_file