xmake-graph-module
Installation
SKILL.md
core.base.graph — Graph Data Structure
core.base.graph is xmake's general-purpose graph module. It implements both directed and undirected graphs with topological sort and cycle detection. Use it when you need to model dependencies / relationships in a custom script but don't want to run them as async jobs (for that, use async.jobgraph, which wraps this).
Must be imported:
import("core.base.graph")
1. Create a graph
local dag = graph.new(true) -- directed (DAG)
local ug = graph.new(false) -- undirected