holoconf-core¶
The holoconf-core crate is the foundation of holoconf, providing high-performance configuration management with resolver support.
Installation¶
Add to your Cargo.toml:
Quick Start¶
use holoconf_core::{Config, ConfigOptions, Schema};
fn main() -> Result<(), holoconf_core::Error> {
// Load configuration
let config = Config::from_yaml_file("config.yaml")?;
// Access values (resolves interpolations automatically)
let host = config.get_string("database.host")?;
let port = config.get_i64("database.port")?;
// Validate against a schema
let schema = Schema::from_file("schema.json")?;
config.validate(&schema)?;
Ok(())
}
Features¶
- Zero-copy parsing - Efficient YAML/JSON parsing with serde
- Lazy resolution - Values resolved on access, cached for performance
- Thread-safe -
ConfigisSend + Syncfor concurrent access - Type coercion - Automatic conversion with schema support
- Structured errors - Rich error context with paths and suggestions
API Documentation¶
📚 Full API documentation on docs.rs
The rustdoc documentation includes all public types, methods, and usage examples.
Feature Flags¶
| Feature | Description | Default |
|---|---|---|
http |
Enable HTTP resolver | No |
Code Coverage¶
The Rust crate contains all core logic: configuration parsing, interpolation, resolution, validation, and error handling.
Coverage not available
Run make coverage to generate coverage reports.
Generate coverage reports
Run make coverage to generate coverage data.
See Also¶
- Getting Started - Installation and first steps
- ADR-001 Multi-Language Architecture - Why Rust core
- ADR-010 Thread Safety - Concurrency design