Skip to main content

Crate hearth_graph

Crate hearth_graph 

Source
Expand description

Standalone symbol-index and module-graph engine for Hearth.

hearth-graph performs parsing and graph analysis without ambient I/O. Hosts supply source data explicitly and inject cancellation through CancelSignal.

Re-exports§

pub use imports::ImportKind;
pub use imports::RawImport;
pub use resolve::js::JsResolveOptions;
pub use resolve::js::js_resolver;
pub use resolve::js::js_resolver_with_fs;
pub use resolve::rust::RustResolveOptions;
pub use resolve::rust::rust_resolver;
pub use resolve::FailedKind;
pub use resolve::ResolutionCompleteness;
pub use resolve::ResolutionOutcome;
pub use resolve::Resolve;
pub use resolve::Resolved;
pub use resolve::ResolverSet;
pub use resolve::UnresolvedReason;
pub use symbols::FileSymbols;
pub use symbols::MAX_SYMBOLS_PER_FILE;
pub use symbols::Symbol;
pub use symbols::SymbolIndex;
pub use symbols::SymbolKind;
pub use symbols::SymbolRef;
pub use symbols::UpsertOutcome;
pub use symbols::extract_symbols;

Modules§

graph
Incremental module graph storage and deterministic dependency queries.
imports
Import extraction types and per-language extractors.
resolve
Module resolution abstractions and language-specific dispatch.
symbols
Tree-sitter tags based symbol extraction.

Structs§

BuildOptions
Limits applied while building a symbol index.
FileAnalysis
Symbols and imports extracted from one source file.
FsLoader
Filesystem-backed source loader rooted at one directory.
LanguageId
Stable identifier for one entry in a LanguageRegistry.
LanguageRegistry
Ordered language registry with last-registration-wins extension and name lookup.
LanguageSpec
Parsing and query metadata for one registered language.
NeverCancelled
Cancellation signal that never requests cancellation.
ParserPool
Lazily initialized parser and query cache for a language registry.

Enums§

AnalyzeBuild
Outcome of a cancellable source-analysis build.
ImportSpec
Import-extraction strategy for a language. Stage B supplies the extractors; the shape is fixed here so registering one later is not a public-API break.
IndexBuild
Outcome of a cancellable symbol-index build.

Traits§

CancelSignal
Host-provided cancellation signal.
SourceLoader
Source access supplied by the host that owns the repository or file store.

Functions§

analyze_paths
Analyzes symbols and imports for the supplied paths in parallel.
analyze_source
Parses and analyzes one source file.
build_index
Builds a symbol index by loading and parsing the supplied paths in parallel.