This Rust library helps you build a Simple Object DiGraph (SODG) for reo compiler of EO programs.
Create a graph:
use Sodg;
let mut g = empty;
g.add?; // add a vertex no.0
g.add?; // add a vertex no.1
g.bind?; // connect v0 to v1 with label "foo"
g.put?; // attach data to v1
You can find a vertex by the label of an edge departing from another vertex:
let id = g.kid?; // returns 1
You can find all kids of a vertex:
let kids: = g.kids;
You can read the data of a vertex:
let bytes: = g.data?; // empty if no data written before
Then, you can print the graph:
println!;
Also, you can serialize and deserialize the graph.