holoconf-core
Core configuration library with hierarchical merging, interpolation, and schema validation.
Features
- Interpolation - Reference environment variables (
${env:VAR}), other config values (${path.to.value}), and files (${file:config.yaml}) - Hierarchical merging - Combine multiple config files with predictable override behavior
- Schema validation - Validate configuration against JSON Schema
- Type coercion - Automatic conversion between compatible types based on schema definitions
- Lazy resolution - Values are resolved on access, not at parse time
Installation
[]
= "0.1"
Quick Start
use Config;
Interpolation Syntax
| Syntax | Description | Example |
|---|---|---|
${env:VAR} |
Environment variable | ${env:HOME} |
${env:VAR,default} |
Env var with default | ${env:PORT,8080} |
${path.to.value} |
Self-reference | ${database.host} |
${.sibling} |
Relative reference | ${.port} |
${file:path} |
Include file | ${file:./secrets.yaml} |
\${literal} |
Escape (literal ${) |
\${not_interpolated} |
Documentation
- User Guide - Full documentation
- API Reference - Rust API docs
- GitHub - Source code and issues
Related Crates
holoconf-cli- Command-line interface
License
Licensed under either of Apache License, Version 2.0 or MIT license at your option.