| Crates.io | toml_reader |
| lib.rs | toml_reader |
| version | 0.1.1 |
| created_at | 2025-06-29 08:44:10.065586+00 |
| updated_at | 2025-06-29 08:47:22.063882+00 |
| description | A simple library for loading TOML config files |
| homepage | |
| repository | https://github.com/nascar-driver/toml_reader |
| max_upload_size | |
| id | 1730550 |
| size | 7,643 |
A simple Rust library to load and access TOML configuration files with lazy static initialization.
serdeonce_cellAdd this to your Cargo.toml:
toml_reader = { path = "../toml_reader" }
use toml_reader::{init, get};
fn main() -> Result<(), Box<dyn std::error::Error>> {
init("config.toml")?;
let config = get();
println!("DB host: {}", config.database.host);
Ok(())
}