#config #yaml #parser

quire

A YAML-based configuration parsing library

17 releases

0.4.1 Jul 23, 2018
0.3.1 Sep 21, 2017
0.2.3 Apr 21, 2017
0.2.2 Feb 22, 2017
0.1.0 Jun 22, 2015

#7 in Configuration

Download history 34/week @ 2018-05-05 25/week @ 2018-05-12 19/week @ 2018-05-19 84/week @ 2018-05-26 109/week @ 2018-06-02 21/week @ 2018-06-09 137/week @ 2018-06-16 36/week @ 2018-06-23 137/week @ 2018-06-30 19/week @ 2018-07-07 77/week @ 2018-07-14 59/week @ 2018-07-21 91/week @ 2018-07-28

272 downloads per month

Rust Quire

Status: Beta

The rust-quire is a Rust port for quire configuration parsing library. It also contains YAML parser (however, it tuned for configuration parsing rather than generic YAML parser, e.g. it assumes YAML always fits memory).

License

Licensed under either of

at your option.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.


lib.rs:

Yaml-based configuration parsing and validation library

Example

extern crate quire;
#[macor_use] extern crate serde_derive;
use quire::{parse_config, Options};
use quire::validate::{Structure, Scalar};

#[derive(Deserialize)]
struct Config {
    item1: String,
    item2: Option<String>,
}

fn validator<'static>() -> Structure<'static> {
    Structure::new()
    .member("item1", Scalar::new())
    .member("item2", Scalar::new().optional())
}

let cfg: Config;
cfg = parse_config("config.yaml", &validator(), &Options::default())
      .expect("valid config");

MIT/Apache-2.0 license

Dependencies

Reverse deps