17 releases

Uses old Rust 2015

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

#16 in #yaml-parser

Download history 48/week @ 2024-06-10 22/week @ 2024-06-17 21/week @ 2024-06-24 76/week @ 2024-07-01 5/week @ 2024-07-08 16/week @ 2024-07-15 10/week @ 2024-07-22 83/week @ 2024-07-29 12/week @ 2024-08-05 23/week @ 2024-08-12 12/week @ 2024-08-19 9/week @ 2024-08-26 24/week @ 2024-09-02 22/week @ 2024-09-09 26/week @ 2024-09-16 82/week @ 2024-09-23

154 downloads per month

MIT license

87KB
2K SLoC

libyaml-rust

libyaml-rust on Travis CI

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

~2–3MB
~55K SLoC