blz-core
Core functionality for blz - a fast, local search cache for llms.txt documentation.
This crate provides the foundational components for parsing, storing, and searching llms.txt documentation files locally. It's designed for speed (sub-10ms search latency), offline-first usage, and exact line citations.
Architecture
The crate is organized around several key components:
- Configuration: Global and per-source settings management
- Parsing: Tree-sitter based markdown parsing with structured output
- Types: Core data structures representing sources, search results, and metadata
- Error Handling: Comprehensive error types with categorization and recovery hints
Quick Start
use ;
// Load global configuration
let config = load?;
// Parse markdown content
let mut parser = new?;
let result = parser.parse?;
println!;
println!;
# Ok::
Performance Characteristics
- Parse time: < 150ms per MB of markdown content
- Memory usage: < 2x source document size during parsing
- Thread safety: All types are
Send + Syncwhere appropriate
Error Handling
All operations return [Result<T, Error>] with structured error information:
use ;
let mut parser = new?;
match parser.parse
# Ok::