15 releases

Uses old Rust 2015

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

#768 in Configuration

Download history 2/week @ 2024-02-05 156/week @ 2024-02-19 70/week @ 2024-02-26 6/week @ 2024-03-04 2/week @ 2024-03-11 5/week @ 2024-03-18 102/week @ 2024-04-01

110 downloads per month
Used in 4 crates

MIT/Apache

230KB
6K SLoC

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");

Dependencies

~260–560KB
~11K SLoC