Statemachine graph generator for state machines defined using the DSL of the rust-fsm-dsl crate.
Assuming you have a rust source code file containing the example state machine from the rust-fsm documentation in a file called example.rs, run:
$ cargo run example.rs
Wrote CircuitBreaker.dot
This produces a graphviz .dot file which can be rendered to images in a plethora of formats - png, svg, ps, pdf etc. In this example, it produces a CircuitBreaker.dot file. The file is named is based on the name of the state machine in the source code.
Then run the dot
command from the graphviz package:
$ dot -Tpng CircuitBreaker.dot > CircuitBreaker.png
.. which generates the following image:
N.B. The different line styles do not indicate anything. They just aid the reader to visually track different lines along state graphs, especially bigger ones.
- allow hiding edges with same start & end