| Crates.io | holoconf-core |
| lib.rs | holoconf-core |
| version | 0.4.0 |
| created_at | 2026-01-09 06:28:54.347335+00 |
| updated_at | 2026-01-19 23:44:33.883159+00 |
| description | Core configuration library with resolver support |
| homepage | |
| repository | https://github.com/rfestag/holoconf |
| max_upload_size | |
| id | 2031684 |
| size | 394,639 |
Core configuration library with hierarchical merging, interpolation, and schema validation.
${env:VAR}), other config values (${path.to.value}), and files (${file:config.yaml})[dependencies]
holoconf-core = "0.1"
use holoconf_core::Config;
fn main() -> Result<(), Box<dyn std::error::Error>> {
// Load from YAML string
let config = Config::from_str(r#"
database:
host: ${env:DB_HOST,localhost}
port: 5432
"#)?;
// Access values
let host: String = config.get("database.host")?;
let port: i64 = config.get("database.port")?;
println!("Connecting to {}:{}", host, port);
Ok(())
}
| 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} |
holoconf-cli - Command-line interfaceLicensed under either of Apache License, Version 2.0 or MIT license at your option.