Skip to main content

gonzalo_graph/
lib.rs

1//! Code-graph capability layer: parse source into a symbol/reference graph
2//! and answer structural queries (`definitions`, `references_to`,
3//! `callers_of`). Rust is the first supported language (tree-sitter-rust);
4//! the model and store are language-agnostic so more grammars can be added.
5
6/// Version of the slice/graph extraction format.
7///
8/// Bumped whenever a change alters what the parser records for unchanged source
9/// — a new [`Reference`] field, a new edge rule, a grammar fix. An indexer that
10/// recorded a different version must do a full walk rather than an incremental
11/// one: carrying slices forward untouched is exactly what would otherwise leave
12/// a view permanently half-upgraded.
13///
14/// History: 1 = calls in macro arguments (#216); 2 = call-shape on references
15/// (#223).
16pub const EXTRACTION_VERSION: u32 = 2;
17
18pub mod assembly;
19pub mod builder;
20pub mod diff;
21pub mod model;
22pub mod resolve;
23pub mod store;
24
25pub use assembly::assemble;
26pub use builder::{Language, build, build_rust};
27pub use diff::{GraphDiff, diff};
28pub use model::{
29    CodeGraph, FileSummary, Located, Page, RankedSymbol, Ranking, RefKind, Reference, Symbol,
30    SymbolFilter, SymbolKind, ViewOverview,
31};
32pub use resolve::{
33    ImpactNode, ImpactReport, Resolution, ResolvedReference, resolve_references_to,
34    resolved_callers_of, resolved_impact,
35};
36pub use store::{GraphStore, InMemoryGraphStore};
37
38#[cfg(feature = "conformance")]
39pub mod conformance;