From bcf12bf39385d16dac3002b00e9dd9933b83aeef Mon Sep 17 00:00:00 2001 From: Meta Vens Date: Mon, 25 May 2026 18:19:03 +0100 Subject: [PATCH] Rename solver crate to norn-rs --- Cargo.lock | 2 +- Cargo.toml | 8 ++++---- README.md | 10 +++++----- examples/organ_battleground.rs | 4 ++-- examples/tuning_sweep.rs | 2 +- src/lib.rs | 22 +++++++++++----------- 6 files changed, 24 insertions(+), 24 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index fc6f217..6b404d3 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3,5 +3,5 @@ version = 4 [[package]] -name = "epiphany-graph-rs" +name = "norn-rs" version = "0.1.0" diff --git a/Cargo.toml b/Cargo.toml index 6e5079d..a223bc4 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,11 +1,11 @@ [package] -name = "epiphany-graph-rs" +name = "norn-rs" version = "0.1.0" edition = "2024" -description = "Hybrid Sugiyama/force-directed graph layout constraints in fast, deterministic Rust." +description = "Norn hybrid Sugiyama/Kamada-Kawai 2D and 3D graph layout solver." license = "MIT OR Apache-2.0" -repository = "https://github.com/GameCult/epiphany-graph-rs" -keywords = ["graph", "layout", "sugiyama", "force-directed"] +repository = "https://github.com/GameCult/norn-rs" +keywords = ["graph", "layout", "sugiyama", "kamada-kawai"] categories = ["algorithms", "visualization"] [dependencies] diff --git a/README.md b/README.md index 43821db..4c779bb 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# epiphany-graph-rs +# norn-rs Hybrid graph layout for DAGs that still want to breathe. @@ -28,7 +28,7 @@ The result is a spectrum: ## Example ```rust -use epiphany_graph_rs::{layout, Graph, LayoutConfig}; +use norn_rs::{layout, Graph, LayoutConfig}; let mut graph = Graph::new(); let a = graph.add_node(1.0); @@ -52,7 +52,7 @@ Hierarchy stays on `Y`; organic spread happens across `X/Z`; grounding and depth forces keep the graph shallow instead of letting it become decorative fog. ```rust -use epiphany_graph_rs::{layout_3d, Graph, Layout3dConfig}; +use norn_rs::{layout_3d, Graph, Layout3dConfig}; let mut graph = Graph::new(); let root = graph.add_node(1.0); @@ -77,7 +77,7 @@ core stays small and renderer-agnostic. Use `Layout3dSolver` when Bevy needs to iterate layout over frames: ```rust -use epiphany_graph_rs::{Graph, Layout3dConfig, Layout3dSolver}; +use norn_rs::{Graph, Layout3dConfig, Layout3dSolver}; let graph = Graph::new(); let mut solver = Layout3dSolver::new(graph, Layout3dConfig::default()); @@ -121,7 +121,7 @@ Use the repulsion accuracy sweep to compare approximation settings against exact all-pairs repulsion on the same positions: ```rust -use epiphany_graph_rs::{ +use norn_rs::{ repulsion_accuracy_sweep, Layout3dConfig, RepulsionAccuracyCandidate, }; diff --git a/examples/organ_battleground.rs b/examples/organ_battleground.rs index c35bc67..7c5501e 100644 --- a/examples/organ_battleground.rs +++ b/examples/organ_battleground.rs @@ -2,7 +2,7 @@ use std::collections::HashMap; use std::fs; use std::path::Path; -use epiphany_graph_rs::{ +use norn_rs::{ Graph, Layout3dConfig, Layout3dSolver, RepulsionAccuracyCandidate, RepulsionMode, evaluate_layout_quality, solver_structural_accuracy_sweep, }; @@ -67,7 +67,7 @@ struct Fixture { fn candidate_quality( graph: &Graph, candidate: &RepulsionAccuracyCandidate, -) -> epiphany_graph_rs::LayoutQualityReport { +) -> norn_rs::LayoutQualityReport { let config = Layout3dConfig { repulsion_mode: candidate.repulsion_mode, barnes_hut_theta: candidate.barnes_hut_theta, diff --git a/examples/tuning_sweep.rs b/examples/tuning_sweep.rs index ca7dc06..b9ed8cc 100644 --- a/examples/tuning_sweep.rs +++ b/examples/tuning_sweep.rs @@ -1,4 +1,4 @@ -use epiphany_graph_rs::{ +use norn_rs::{ Layout3dConfig, RepulsionAccuracyCandidate, RepulsionMode, repulsion_accuracy_sweep, }; diff --git a/src/lib.rs b/src/lib.rs index 9778475..ba17577 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -2803,18 +2803,18 @@ fn clamp(value: f32, min: f32, max: f32) -> f32 { /// /// The raw ABI is intentionally tiny so browser consumers can use this crate /// without a binding generator. Hosts must release the pointer with -/// [`epiphany_graph_dealloc`]. +/// [`norn_graph_dealloc`]. #[unsafe(no_mangle)] -pub extern "C" fn epiphany_graph_alloc(len: usize) -> *mut u8 { +pub extern "C" fn norn_graph_alloc(len: usize) -> *mut u8 { let mut buffer = Vec::::with_capacity(len); let ptr = buffer.as_mut_ptr(); std::mem::forget(buffer); ptr } -/// Release a pointer previously returned by [`epiphany_graph_alloc`]. +/// Release a pointer previously returned by [`norn_graph_alloc`]. #[unsafe(no_mangle)] -pub unsafe extern "C" fn epiphany_graph_dealloc(ptr: *mut u8, len: usize) { +pub unsafe extern "C" fn norn_graph_dealloc(ptr: *mut u8, len: usize) { if ptr.is_null() || len == 0 { return; } @@ -2826,16 +2826,16 @@ pub unsafe extern "C" fn epiphany_graph_dealloc(ptr: *mut u8, len: usize) { /// Allocate `f32` slots for host-written typed arrays. #[unsafe(no_mangle)] -pub extern "C" fn epiphany_graph_alloc_f32(count: usize) -> *mut f32 { +pub extern "C" fn norn_graph_alloc_f32(count: usize) -> *mut f32 { let mut buffer = Vec::::with_capacity(count); let ptr = buffer.as_mut_ptr(); std::mem::forget(buffer); ptr } -/// Release `f32` slots previously returned by [`epiphany_graph_alloc_f32`]. +/// Release `f32` slots previously returned by [`norn_graph_alloc_f32`]. #[unsafe(no_mangle)] -pub unsafe extern "C" fn epiphany_graph_dealloc_f32(ptr: *mut f32, count: usize) { +pub unsafe extern "C" fn norn_graph_dealloc_f32(ptr: *mut f32, count: usize) { if ptr.is_null() || count == 0 { return; } @@ -2847,16 +2847,16 @@ pub unsafe extern "C" fn epiphany_graph_dealloc_f32(ptr: *mut f32, count: usize) /// Allocate `u32` slots for host-written typed arrays. #[unsafe(no_mangle)] -pub extern "C" fn epiphany_graph_alloc_u32(count: usize) -> *mut u32 { +pub extern "C" fn norn_graph_alloc_u32(count: usize) -> *mut u32 { let mut buffer = Vec::::with_capacity(count); let ptr = buffer.as_mut_ptr(); std::mem::forget(buffer); ptr } -/// Release `u32` slots previously returned by [`epiphany_graph_alloc_u32`]. +/// Release `u32` slots previously returned by [`norn_graph_alloc_u32`]. #[unsafe(no_mangle)] -pub unsafe extern "C" fn epiphany_graph_dealloc_u32(ptr: *mut u32, count: usize) { +pub unsafe extern "C" fn norn_graph_dealloc_u32(ptr: *mut u32, count: usize) { if ptr.is_null() || count == 0 { return; } @@ -2876,7 +2876,7 @@ pub unsafe extern "C" fn epiphany_graph_dealloc_u32(ptr: *mut u32, count: usize) /// Output tuple per node is `(x, y, rank, order)` sorted by node index. /// Returns `0` on success and a negative value for malformed input. #[unsafe(no_mangle)] -pub unsafe extern "C" fn epiphany_graph_layout_2d( +pub unsafe extern "C" fn norn_graph_layout_2d( node_weights_ptr: *const f32, node_count: usize, edge_pairs_ptr: *const u32,