Expand description
ForgeKit - Deterministic Code Intelligence SDK
This crate provides core SDK for programmatic code intelligence operations.
§Overview
ForgeKit unifies several code intelligence tools into a single API:
- Graph Module: Symbol and reference queries (native implementation)
- Search Module: Semantic code search (via LLMGrep)
- CFG Module: Control flow analysis (via Mirage)
- Edit Module: Span-safe code editing (via Splice)
§Quick Start
use forgekit_core::Forge;
#[tokio::main]
async fn main() -> anyhow::Result<()> {
let forge = Forge::open("./my-project").await?;
// Query code graph
let symbols = forge.graph().find_symbol("main").await?;
println!("Found: {:?}", symbols);
Ok(())
}Re-exports§
pub use error::ForgeError;pub use error::Result;pub use storage::BackendKind;pub use storage::UnifiedGraphStore;pub use types::Location;pub use types::SymbolId;pub use cache::QueryCache;pub use indexing::FlushStats;pub use indexing::IncrementalIndexer;pub use indexing::PathFilter;pub use pool::ConnectionPermit;pub use pool::ConnectionPool;pub use runtime::Runtime;pub use watcher::WatchEvent;pub use watcher::Watcher;
Modules§
- analysis
- Analysis module - Combined analysis operations
- build
- cache
- Query caching layer with LRU eviction and TTL expiration.
- cfg
- CFG module - Control flow graph analysis.
- dependency
- diagnostic
- diff
- edit
- Edit module - Span-safe code editing
- error
- Error types for ForgeKit.
- graph
- Graph module - Symbol and reference queries using sqlitegraph.
- indexing
- Incremental indexing for processing file changes.
- knowledge
- Knowledge graph — sqlitegraph native-v3 backed graph for code intelligence.
- pool
- Connection pool for concurrent database access.
- progress
- project
- runtime
- Runtime orchestration for all phase 2 components.
- search
- Search module - Semantic code search via llmgrep
- storage
- Storage abstraction layer supporting dual backends.
- treesitter
- Tree-sitter based CFG extraction for C, Java, and Rust
- types
- Core types for ForgeKit.
- watcher
- File watching for hot-reload and incremental updates.
- workspace
Structs§
- Edge
Spec - Edge specification for insertion operations.
- Forge
- Main entry point for ForgeKit SDK.
- Forge
Builder - Builder for configuring and creating a Forge instance.
- Graph
Config - Complete configuration for graph construction.
- Graph
Entity - Node
Spec - Node specification for insertion operations.
- Sqlite
Graph - Embedded SQLite-backed graph database.
Enums§
- Sqlite
Graph Backend Kind - Backend selection enum for choosing between storage implementations.
Functions§
- open_
graph - Open a graph with the specified configuration.