More Configuration

More Configuration is a configuration library for Rust.
You may be looking for:
Features
This crate provides the following features:
- default - Abstractions for configuration, including the std features
- std - Standard configuration implementation
- all - Includes all features, except async
- async - Use configuration in an asynchronous context
- mem - An in-memory configuration source
- env - An environment variables configuration source
- cmd - A command-line argument configuration source
- json - A *.json file configuration source
- xml - A *.xml file configuration source
- ini - An *.ini file configuration source
- chained - Chain multiple configuration sources
- binder - Bind a configuration to strongly-typed values and structs
Use
--features all,asyncfor all features with asynchronous support
Configuration in Action
Consider the following demo.json file:
The configuration can be loaded, merged, and accessed from multiple sources:
use ;
Raw configuration values can be used, but they are much more interesting when we data bind them to strongly-typed values:
use Deserialize;
The first letter of JSON configuration keys are normalized to uppercase.
use ;
Minimum Supported Rust Version
When increasing the minimum supported Rust version (MSRV), the new version must have been released at least six months ago. The current MSRV is 1.60.
License
This project is licensed under the MIT license.