gexf
A tiny, dependency-light Rust library to export graphs to the GEXF format, compatible with Gephi and other tools.
Features
- Directed / undirected / mutual graphs (
defaultedgetype) - Node labels and arbitrary attributes
- Gephi viz extras: position, size, color
- Metadata (
<meta>): creator, description, last modified date - Write to any
std::io::Writesink or straight toString
Quick start
use ;
let gexf = new
.meta
.add_node?
.add_node?
.add_edge?
.try_build?;
let xml = gexf.to_string?; // or gexf.write(File::create("graph.gexf")?)
Notes
- This crate emits GEXF 1.3 with the viz namespace (
viz:*). - Dynamic graphs (spells, time slices) are not supported.
- Attributes here are simple key–value pairs written under
<attvalues>. The full<attributes>schema is not supported.
Disclaimer
This crate was mostly developed by ChatGPT. I only cleaned it up and fixed a bunch of bugs.