config-lib 0.9.0

Enterprise-grade multi-format configuration library supporting 8 formats (CONF, INI, Properties, JSON, XML, HCL, TOML, NOML) with sub-50ns caching, hot reloading, and comprehensive validation.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
use config_lib::parsers::{detect_format, detect_format_from_path};
use std::path::Path;

fn main() -> config_lib::Result<()> {
    let path = Path::new("test.ini");
    let content = std::fs::read_to_string("test.ini").unwrap();

    println!("=== Format Detection Test ===");
    println!("Path-based detection: {:?}", detect_format_from_path(path));
    println!("Content-based detection: {}", detect_format(&content));

    Ok(())
}