Skip to content
Unverified: This page has not yet been anchored to automated code tests.

vox-graph-reader API Reference (generated)

Crate: vox-graph-reader · Version: 0.6.0 · Target: Library (lib.rs)

Read-only BFS traversal, path-finding, and cross-manifest comparison for Vox Graph graph.json exports

Read-only graph reader for Graphify graph.json (NetworkX JSON export format).

{ "nodes": [{"id": "x", "label": "...", "community": "c1"}],
"links": [{"source": "x", "target": "y"}] }

Edges may appear under "links" or "edges" — both are supported. Edges are indexed three ways: a symmetric adjacency (undirected, default Direction::Both), a forward index (source→target = caller→callee, Direction::Out), and a reverse index (callee→caller, Direction::In). Traversal selects the index via [Direction].

FeatureDefault / Enables
defaulttree-sitter-grammars
tree-sitter-grammarsdep:tree-sitter, dep:tree-sitter-rust, dep:tree-sitter-typescript, dep:tree-sitter-python
ModuleDescription
ast—
bfs—
cache—
cluster—
compare—
coverage—
crate_model—
edge_weights—
gc—
history—
lens—
manifest—
overlay—
reachability—
rebuild—
rebuild_causes—
registry—
snapshot—
what_if—
StructDescription
TraversalHitA single result from BFS traversal.
GraphifyReaderRead-only graph reader. Builds an in-memory adjacency index from a Graphify JSON value. Construction is O(N + E). Queries are O(N + E) worst case for full BFS.
EnumDescription
GraphifyReaderErrorError type for [GraphifyReader] construction.
FunctionDescription
from_valueConstruct from a parsed serde_json::Value. Returns [GraphifyReaderError::MissingNodes] if the "nodes" key is absent or not an array.
from_refConstruct by borrowing a parsed serde_json::Value. Identical to [Self::from_value] but leaves the input intact, so a caller that must retain the raw Value (for example to serve a lexical search) does not have to clone it. The graph is ~126 MB in this repo, so that clone is the difference between ~650 MB and ~1.15 GB of peak commit.
node_countTotal number of nodes in the graph.
edge_countTotal number of undirected edges (each edge counted once). Assumption: The source graph.json contains no duplicate directed edges. If the same {source, target} pair appears more than once in the links array, this count will be inflated (each duplicate pair adds 2 to the adjacency sum). Graphify’s own export format does not produce duplicates, so this is safe in practice.
bfs_from_seedsBFS from one or more seed node IDs up to max_depth hops. direction selects callees ([Direction::Out]), callers ([Direction::In]), or the legacy undirected neighborhood ([Direction::Both]).
shortest_pathShortest path between two node IDs (BFS). Returns None if unreachable.
god_nodesNodes sorted by degree (highest first), capped at top_n. Returns (node_id, degree) pairs.
community_membersAll node IDs belonging to community_id (matched on the "community" node field).
graph_digestBLAKE3 hex digest of graph bytes. The single source of truth for graph_json_sha256 (rebuild) and lexical_ingest_sha256 (ingest) so lexical_lag comparisons are valid.