| Crates.io | cardinal-config |
| lib.rs | cardinal-config |
| version | 0.1.0 |
| created_at | 2025-09-26 00:25:51.708072+00 |
| updated_at | 2025-09-26 00:25:51.708072+00 |
| description | Configuration loader and validator for the Cardinal gateway |
| homepage | https://github.com/andrespirela/cardinal |
| repository | https://github.com/andrespirela/cardinal |
| max_upload_size | |
| id | 1855258 |
| size | 27,353 |
Configuration loader and validator for the gateway. It uses the config crate to merge sources, then maps them into strongly typed builders.
CARDINAL__... environment variablesConfigErrors when validation failslet paths = vec!["config/base.toml".into(), "config/local.toml".into()];
let cfg = cardinal_config::load_config(&paths)?;
assert_eq!(cfg.server.address, "127.0.0.1:1704");
CardinalConfigBuilder and friends remain available if you need to construct configs programmatically (e.g., tests or higher-level control planes).