Diagrams as code
Warning: This project is in early experimental stage. Functionality is subject to change and YMMV. Feel free to open an issue if you have any suggestions, Rust tips & tricks (my first Rust project) or stumbled upon any bugs.
You can experiment building diagrams with diagwiz using the online playground.
As the package is currently in experimental stage, you can install it by building it from the source or by downloading the pre-compiled binary from the latest nightly release.
Visit the nightly release page and download a binary compatible with your system.
cargo install --git https://github.com/kjagiello/diagwiz
$ cat <<EOF > example.diag
alias ali = "Alice"
ali->Bob: "Hello!"
Bob->Bob: "(Bob thinks)"
Bob-->ali: "Hello back!"
EOF
$ diagwiz < example.diag
┌───────┐ ┌─────┐
│ Alice │ │ Bob │
└───────┘ └─────┘
│ Hello! │
│──────────────▶│
│ │
│ │─┐
│ │ │ (Bob thinks)
│ │◀┘
│ │
│ Hello back! │
│◀--------------│
│ │
┌───────┐ ┌─────┐
│ Alice │ │ Bob │
└───────┘ └─────┘