dot_ix_playground is both an executable binary that can be run, and a library that can be used in Rust programs.
Installing the command-line executable
Assuming you have Rust/Cargo installed , run this command in a terminal:
cargo install dot_ix_playground
It will make the dot_ix_playground
command available in your PATH
if you've allowed the PATH
to be modified when installing Rust . cargo uninstall dot_ix_playground
uninstalls.
Adding dot_ix_playground
library as a dependency
Run this command in a terminal, in your project's directory:
cargo add dot_ix_playground
To add it manually, edit your project's Cargo.toml
file and add to the [dependencies]
section:
dot_ix_playground = "0.8.1"
The dot_ix_playground
library will be automatically available globally.
Read the dot_ix_playground
library documentation .
Back to the crate overview .
Readme
✒️ dot_ix
🚧 This is very much a work in progress
Try it yourself: (demo_1 , demo_2 )
Example
Original Concept
https://user-images.githubusercontent.com/2993230/253878816-0729970f-651f-45ef-a986-470f383b8018.mp4
Usage
Add the following to Cargo.toml
dot_ix = "0.8.1"
# Enables the `FlexDiag` web component.
dot_ix = { version = "0.8.1", features = ["flex_diag"] }
# Enables server side dot generation.
# Requires graphviz `dot` to be installed server side.
dot_ix = { version = "0.8.1", features = ["server_side_graphviz"] }
Development
cargo install cargo-leptos
# Then, one of:
# * client side rendering -- uses WASM compiled graphviz to generate the graph.
cargo leptos watch
# * server side rendering -- runs `dot` on the server to generate the graph.
# Requires `graphviz` to be installed.
cargo leptos watch --features "server_side_graphviz" -v
For server side rendering, the " server_side_graphviz"
feature needs to be passed in separately because that feature still needs to be enabled for the lib compilation, i.e.
server side rendering:
lib features: " server_side_graphviz"
bin features: " ssr,server_side_graphviz"
client side rendering:
lib features: " "
bin features: " "
To Do
🦜 Feel free to do any of these -- this project isn't my main focus, but I should be responsive in reviewing / merging things.