emerge

Crates.ioemerge
lib.rsemerge
version0.1.4
created_at2025-06-24 17:50:54.622879+00
updated_at2025-07-21 19:32:49.201655+00
descriptionA library for building and rendering force directed graphs
homepagehttps://github.com/LazyScaper/emerge
repositoryhttps://github.com/LazyScaper/emerge
max_upload_size
id1724831
size5,079,803
Jake (LazyScaper)

documentation

README

Emerge

A Rust library for force-directed graphs. Uses physics simulations to let clear, stable network structures emerge naturally.

emerge - force directed graph.gif

Features

  • 2D directed graph rendering
  • Natural node position due to physics based simulation
  • Click and drag to navigate around the graph

Usage

use emerge::graph::{default_window_conf, render_graph, Graph};

#[macroquad::main(default_window_conf)]
async fn main() {
    let mut graph = Graph::new();

    graph.add_node("Albania");
    graph.add_node("Cambodia");
    graph.add_node("Cameroon");
    graph.add_node("Nigeria");

    graph.add_directed_edge("Cambodia", "Albania");
    graph.add_directed_edge("Cameroon", "Nigeria");
    graph.add_directed_edge("Nigeria", "Albania");

    render_graph(graph).await;
}

Examples

Commit count: 0

cargo fmt