vizoxide 1.0.2

Vizoxide is a high-level, memory-safe Rust wrapper for Graphviz that provides an idiomatic, builder-pattern interface for creating, styling, laying out, and rendering complex graphs in various output formats.
use graphviz::{Graph, Context};
use graphviz::layout::{apply_layout, Engine};
use graphviz::render::{render_to_file, Format};
use std::error::Error;

fn main() -> Result<(), Box<dyn Error>> {
    // Create a GraphViz context with plugins.
    let context = Context::new_with_plugins(true, true)?;
    
    // Create a simple directed graph.
    let mut graph = Graph::new("plugin_example", true)?;
    let node1 = graph.add_node("Node1")?;
    let node2 = graph.add_node("Node2")?;
    graph.add_edge(&node1, &node2, None)?;
    
    // Apply the layout using the Neato engine.
    apply_layout(&context, &mut graph, Engine::Neato)?;
    
    // Render the graph to a PNG file.
    render_to_file(&context, &graph, Format::Png, "plugin_example.png")?;
    
    Ok(())
}