Expand description
§tessera-codegraph
Local semantic code graph for AI coding agents. Index a repository into SQLite + a memory-mapped snapshot; ask deterministic questions about symbols, references, blast radius, and hallucinated identifiers.
use tessera_codegraph::{Index, IndexOptions};
Index::build("./my-repo", "./my-repo/.tessera/tessera.db", IndexOptions::default())?;
let idx = Index::open("./my-repo/.tessera/tessera.db")?;
let impact = idx.impact("findById", 4)?;
for caller in impact.callers.iter().take(5) {
println!(
"{:5.1} {} @ {}:{}",
caller.criticality,
caller.symbol.qualified_name,
caller.symbol.path,
caller.symbol.start_line
);
}The library binary tessera is also built from this crate; see the README.
Re-exports§
pub use indexer::IndexMode;pub use indexer::IndexOptions;pub use indexer::IndexReport;pub use types::AlternativeQuery;pub use types::BenchQuery;pub use types::BenchResult;pub use types::BenchSavings;pub use types::ContextPack;pub use types::CriticalityBreakdown;pub use types::DefinitionResult;pub use types::DiffChangedSymbol;pub use types::DiffImpactResult;pub use types::DiffImpactedSymbol;pub use types::ExpandResult;pub use types::GraphEngineKind;pub use types::ImpactCaller;pub use types::ImpactResult;pub use types::ImportRecord;pub use types::ImportedByResult;pub use types::ImportsResult;pub use types::KindCount;pub use types::Language;pub use types::LanguageCount;pub use types::OutlineResult;pub use types::QueryMeta;pub use types::ReferenceRecord;pub use types::ReferencesResult;pub use types::SearchHit;pub use types::SearchOptions;pub use types::SearchResult;pub use types::Sibling;pub use types::SiblingsResult;pub use types::SignatureLine;pub use types::SignatureResult;pub use types::SnippetReferenceCheck;pub use types::StatsResult;pub use types::SymbolRecord;pub use types::SymbolSuggestion;pub use types::TestsForResult;pub use types::TopFanout;pub use types::ValidateResult;pub use types::ValidateSnippetResult;
Modules§
- bench
- Benchmark harness. Indexes a path (real or synthetic) and reports the
numbers that live in the README’s perf chart. We deliberately keep this
self-contained and reproducible —
tessera benchis meant to be runnable by anyone evaluating Tessera. - bloom
- db
- engine
- Graph-engine abstraction. The default backend is SQLite (the one used
everywhere in the codebase). A feature-gated
cozobackend mirrors the call edges into an embedded Datalog database so impact queries can be expressed as a recursive Datalog rule. - indexer
- mcp
- query
- snapshot
- types
Structs§
- Index
- High-level handle to a Tessera index. Holds a single SQLite connection and, when present, a memory-mapped snapshot for hot-path queries.