17 releases

0.3.0 Aug 28, 2018
0.2.1 Mar 21, 2017
0.2.0 May 15, 2015
0.1.3 Mar 30, 2015
0.0.6 Dec 14, 2014

#10 in #yaml

Download history 6/week @ 2019-12-15 20/week @ 2019-12-22 2/week @ 2019-12-29 4/week @ 2020-01-05 52/week @ 2020-01-12 73/week @ 2020-01-19 11/week @ 2020-01-26 5/week @ 2020-02-02 25/week @ 2020-02-09 20/week @ 2020-02-16 163/week @ 2020-02-23 4/week @ 2020-03-01 38/week @ 2020-03-08 21/week @ 2020-03-15 243/week @ 2020-03-22 193/week @ 2020-03-29

255 downloads per month

MIT license

86KB
2K SLoC

libyaml-rust

libyaml-rust on Travis CI yaml on crates.io

LibYAML bindings for Rust

Dependencies

  • LibYAML 0.1.4 or higher
  • Stable Rust (2015/2018 edition)

Usage

Parse from memory

extern crate yaml;

use yaml::constructor::*;

yaml::parse_bytes_utf8("[1, 2, 3]".as_bytes()); // => Ok(vec![YamlSequence(~[YamlInteger(1), YamlInteger(2), YamlInteger(3)])])

Parse from Reader

extern crate yaml;

use std::io::BufReader;
use yaml::constructor::*;

let data = "[1, 2, 3]";
let mut reader = BufReader::new(data.as_bytes());

yaml::parse_io_utf8(&mut reader); // => Ok(vec![YamlSequence(~[YamlInteger(1), YamlInteger(2), YamlInteger(3)])])

Todo

In the order of what I want to do...

Dependencies

~1.5MB
~41K SLoC