| Crates.io | dotparser |
| lib.rs | dotparser |
| version | 0.3.0 |
| created_at | 2025-06-15 16:42:22.829251+00 |
| updated_at | 2025-06-15 22:01:03.955104+00 |
| description | diagram file parser for Bevy visualization of diagrams |
| homepage | |
| repository | https://github.com/navicore/dotparser |
| max_upload_size | |
| id | 1713446 |
| size | 71,602 |
A Rust library for parsing Graphviz DOT files into graph structures.
dotparser converts DOT format files into a graph representation using petgraph. It handles both standard edge-based graphs and nested subgraph structures.
use dotparser::dot;
let dot_content = r#"
digraph {
A -> B;
B -> C;
}
"#;
let graph_data = dot::parse(dot_content);
println!("Nodes: {}", graph_data.graph.node_count());
println!("Edges: {}", graph_data.graph.edge_count());
A -> B)The parser outputs a GraphData structure containing:
petgraph::DiGraph with node informationNodes can have types like Organization, Team, User, etc., useful for hierarchical visualizations.
This crate currently supports DOT format only. Other diagram formats may be added as separate modules.
MIT