Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/rahix/ezconf
Easy and boilerplate free toml configuration for rust programs
https://github.com/rahix/ezconf
configuration rust toml
Last synced: about 2 months ago
JSON representation
Easy and boilerplate free toml configuration for rust programs
- Host: GitHub
- URL: https://github.com/rahix/ezconf
- Owner: Rahix
- License: other
- Created: 2018-05-08T20:03:38.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2018-10-22T21:29:23.000Z (over 6 years ago)
- Last Synced: 2024-12-16T17:54:34.730Z (2 months ago)
- Topics: configuration, rust, toml
- Language: Rust
- Size: 8.28 MB
- Stars: 0
- Watchers: 4
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE-APACHE
Awesome Lists containing this project
README
ezconf [![crates.io page](http://meritbadge.herokuapp.com/ezconf)](https://crates.io/crates/ezconf) [![Build Status](https://travis-ci.org/Rahix/ezconf.svg?branch=master)](https://travis-ci.org/Rahix/ezconf) [![docs.rs](https://docs.rs/ezconf/badge.svg)](https://docs.rs/ezconf)
======A library to add configuration options to your project with as little
boilerplate as possible. Uses `toml` as the configuration format.## Example ##
```rust
extern crate ezconf;static CONFIG: ezconf::Config = ezconf::INIT;
fn main() {
CONFIG
.init([ezconf::Source::File("tests/test.toml")].iter())
.unwrap();let v = CONFIG.get_or::("string.a", "Hello String".into());
println!("Value: {:?}", v);
}
```## License ##
ezconf is licensed under either of* Apache License, Version 2.0 ([LICENSE-APACHE](LICENSE-APACHE) or http://www.apache.org/licenses/LICENSE-2.0)
* MIT license ([LICENSE-MIT](LICENSE-MIT) or http://opensource.org/licenses/MIT)at your option.