| Crates.io | dumbo_config |
| lib.rs | dumbo_config |
| version | 0.2.1 |
| created_at | 2025-06-30 07:17:01.210592+00 |
| updated_at | 2025-07-22 10:31:52.509171+00 |
| description | a config loader |
| homepage | |
| repository | https://github.com/cao5zy/dumbo-config |
| max_upload_size | |
| id | 1731497 |
| size | 9,122 |
dumbo-config is a config loader.
Load project configurations
Your configuration file.
name: "test config"
value: 32
The following file names is qualified.
ENV is the value of the environment variable "ENV". If "ENV" is not set, it defaults to searching config.yml and config.yaml.You can also use load_named_config with specified config file.
Rust file for loading TestConfig
use dumbo_config::{load_config, load_named_config};
use serde::Deserialize;
#[derive(Debug, Deserialize, PartialEq)]
struct TestConfig {
name: String,
value: i32,
}
...
let config: Option<TestConfig> = load_config();
let config_path: Path = ...;
let config: Option<TestConfig> = load_named_config(&config_path);