#struct #visualizer #enums #command-line-tool #relationship #focusing #graphviz

bin+lib rust_code_visualizer

A library and CLI tool for graphical representation of Rust code, focusing on visualizing the relationships between structs and enums

3 releases

0.1.2 Apr 26, 2023
0.1.1 Apr 26, 2023
0.1.0 Apr 26, 2023

#657 in Visualization

32 downloads per month

MIT license

120KB
715 lines

Rust code visualizer

A library and CLI tool for graphical representation of Rust code, focusing on visualizing the relationships between structs and enums.

mml appears to be dead and deprecated, so I started working on my own implementation.

Usage

Here's how the CLI works (current use):

rcvis test.rs > graph.dot 
dot -Tpng graph.dot -o graph.png

Here's how the CLI works (in future):

rcvis source.rs source1.rs --format {plantuml,graphviz} --out file.out

This command analyzes the provided Rust source files and generates a visual representation of the relationships between structs and enums in the specified output format (PlantUML or Graphviz), saving the result to file.out.

Features

  • Export relationships between structs and enums to Graphviz format
  • Export relationships between structs and enums to PlantUML format

Example

For the structures.rs in example folder: