Skip to main content

Crate forgekit_runtime

Crate forgekit_runtime 

Source
Expand description

ForgeKit runtime layer - File watching, caching, and metrics.

This crate provides runtime services for the ForgeKit SDK:

  • File watching with notify crate
  • 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 metrics

Re-exports§

pub use metrics::MetricKind;
pub use metrics::MetricsSummary;
pub use metrics::RuntimeMetrics;

Modules§

metrics
Runtime metrics for operations, timing, and cache statistics.

Structs§

FlushStats
Statistics from a flush operation.
ForgeRuntime
ForgeKit runtime for automatic reindexing and caching.
IncrementalIndexer
Incremental indexer for processing file changes.
PathFilter
Path filter for controlling which files get indexed.
QueryCache
Thread-safe query cache with LRU eviction.
RuntimeConfig
Runtime configuration for indexing and caching.
RuntimeStats
Runtime statistics snapshot.
Watcher
File watcher for monitoring codebase changes.

Enums§

WatchEvent
File system event emitted by the watcher.