Rust UML Diagram Generator
Tools that parsing Rust code into UML diagram (in dot format currently).
Please notice on version v0.1.1 the file name is "aggregation..dot", which will be fixed in the next release
$ rudg.exe tests\examples\aggregation.rs
$ cat tests\examples\aggregation.dot
digraph ast {
"Amut"[label="{Amut|b: *mut B}"][shape="record"];
"Aconst"[label="{Aconst|b: *const B}"][shape="record"];
"B"[label="B"][shape="record"];
"Amut" -> "B"[label=""][arrowtail="odiamond"];
"Aconst" -> "B"[label=""][arrowtail="odiamond"];
}
And if you use Graphviz Online or other tools like Graphviz add-on for VSCode, then the dot file could be rendered as below:
Currently, this tool could only parse single .rs file, and support for parsing whole crate will be released on v0.2.0, which is under development.
$ rudg.exe --help
rudg 0.1.0
USAGE:
rudg.exe [file] [OPTIONS]
ARGS:
<file> Rust source code file path
OPTIONS:
-h, --help Print help information
-o, --output <DIR> Sets a custom output directory
-V, --version Print version information
- comprehensive tests and bug fix
- support for modelling the whole crate's source code
- All sorts of contributing are welcome. Please feel free to open issue and/or PR.
- We belive that TDD(Test-Driven Development) approach is helpful not only in development, but also in communication with each other. So adding more tests might be a good way to report a bug or even suggest a new feature.
rudg is primarily distributed under the terms of both the MIT license and the Apache License (Version 2.0).
See LICENSE-APACHE and LICENSE-MIT for details.
dot_graph: A library for generating Graphviz DOT language files.