Expand description
ForgeKit runtime layer - File watching, caching, and metrics.
This crate provides runtime services for the ForgeKit SDK:
- File watching with
notifycrate - Incremental indexing via magellan
- Query caching with LRU eviction
- Connection pooling and metrics
§Examples
use forgekit_runtime::{ForgeRuntime, RuntimeConfig};
let config = RuntimeConfig {
watch_enabled: true,
debounce_ms: 500,
cache_size: 1000,
cache_ttl_secs: 300,
..Default::default()
};
let mut runtime = ForgeRuntime::new("./my-project").await?;
// Start file watching with automatic re-indexing
runtime.watch().await?;
// Runtime now manages caching and metricsRe-exports§
pub use metrics::MetricKind;pub use metrics::MetricsSummary;pub use metrics::RuntimeMetrics;
Modules§
- metrics
- Runtime metrics for operations, timing, and cache statistics.
Structs§
- Flush
Stats - Statistics from a flush operation.
- Forge
Runtime - ForgeKit runtime for automatic reindexing and caching.
- Incremental
Indexer - Incremental indexer for processing file changes.
- Path
Filter - Path filter for controlling which files get indexed.
- Query
Cache - Thread-safe query cache with LRU eviction.
- Runtime
Config - Runtime configuration for indexing and caching.
- Runtime
Stats - Runtime statistics snapshot.
- Watcher
- File watcher for monitoring codebase changes.
Enums§
- Watch
Event - File system event emitted by the watcher.