Generate GraphViz Dot and C4 diagrams for your Rust projects
- Auto-detect workspaces
- Pick the output format (GraphViz/C4)
Run the rustviz command either in a cargo workspace or in a crate.
rustviz will then output a graphviz dot file that you can open in graphviz-online.
rustvizYou can specify a different project path after the invocation:
rustviz ./mycoolprojectAlternatively, you can force it to output a C4 Diagram in the PlantUML using the option -f c4, but that output is experimental since auto layout is not implemented. It is viewable in the
MermaidJS Live Editor.
rustviz -f c4Usage: rustviz [OPTIONS] [PROJECT_PATH]
Arguments:
[PROJECT_PATH] [default: .]
Options:
-o, --output-path <OUTPUT_PATH> [default: -]
-f, --output-format <OUTPUT_FORMAT> [default: graphviz] [possible values: c4, graphviz]
-d, --detect-workspace <DETECT_WORKSPACE> [default: auto] [possible values: yes, no, auto]
-h, --help Print help
-V, --version Print version
Install rustviz with brew
brew install leopoldlabs/apps/rustvizOr build from source (you need the rust toolchain installed)
cargo b --release
cp target/release/rustviz /whatever/your/bin/folderIf you have any feedback, please reach out to me at rustviz@leoj.de
My seminar paper.
Here are some related projects and commands that do similar things