Skip to main content

Crate gonzalo_graph

Crate gonzalo_graph 

Source
Expand description

Code-graph capability layer: parse source into a symbol/reference graph and answer structural queries (definitions, references_to, callers_of). Rust is the first supported language (tree-sitter-rust); the model and store are language-agnostic so more grammars can be added.

Re-exports§

pub use assembly::assemble;
pub use builder::Language;
pub use builder::build;
pub use builder::build_rust;
pub use diff::GraphDiff;
pub use diff::diff;
pub use model::CodeGraph;
pub use model::FileSummary;
pub use model::Located;
pub use model::Page;
pub use model::RankedSymbol;
pub use model::Ranking;
pub use model::RefKind;
pub use model::Reference;
pub use model::Symbol;
pub use model::SymbolFilter;
pub use model::SymbolKind;
pub use model::ViewOverview;
pub use resolve::ImpactNode;
pub use resolve::ImpactReport;
pub use resolve::Resolution;
pub use resolve::ResolvedReference;
pub use resolve::resolve_references_to;
pub use resolve::resolved_callers_of;
pub use resolve::resolved_impact;
pub use store::GraphStore;
pub use store::InMemoryGraphStore;

Modules§

assembly
Assemble a view’s manifest into a queryable graph (ADR 0012, ticket C1).
builder
Build a CodeGraph from source using tree-sitter. Parsing is language-parameterized (Language); Rust, Python, JavaScript, TypeScript/TSX, Go, Java, C#, C, C++, Ruby, PHP, Bash, Kotlin, Swift, Lua, Scala, and Elixir are supported, and a new grammar is a matter of adding its node-kind mappings.
diff
Structural diff between two assembled views (ticket K).
model
The code-graph data model. Serializable so a graph can be persisted as a gonzalo record and shared/synced like any other data.
resolve
Best-effort name resolution over an assembled view (ticket G).
store
Storage and structural queries over an assembled view’s slices.

Constants§

EXTRACTION_VERSION
Version of the slice/graph extraction format.