dotavious

Crates.iodotavious
lib.rsdotavious
version0.2.1
sourcesrc
created_at2021-03-23 03:17:49.889927
updated_at2021-11-06 20:13:16.095361
descriptionA library for generating Graphviz DOT language files for graphs.
homepage
repositoryhttps://github.com/doctavious/dotavious
max_upload_size
id372379
size177,364
Sean Carroll (seancarroll)

documentation

README

Dotavious

crates.io Released API docs MIT licensed CI

A library for generating Graphviz DOT language files for visualizing graphs.

Constraints / Limitations

  • Not every Attribute is fully documented/described. However, all those which have specific allowed values should be covered.

  • Deprecated Attributes are not defined.

Quickstart

use dotavious::{Dot, Edge, Graph, GraphBuilder, Node};
use std::io;
use std::io::Read;

// can also start building a named undirected graph via `GraphBuilder::new_named_undirected`
let graph = GraphBuilder::new_named_directed("example")
        .add_node(Node::new("N0"))
        .add_node(Node::new("N1"))
        .add_edge(Edge::new("N0", "N1"))
        .build()
        .unwrap();

let dot = Dot { graph };
println!("{}", dot);

which produces

digraph example {
    N0;
    N1;
    N0 -> N1;
}

and when rendered will look like

README example rendered

Commit count: 81

cargo fmt