Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/kimhyunkang/libyaml-rust
LibYAML bindings for Rust
https://github.com/kimhyunkang/libyaml-rust
Last synced: 7 days ago
JSON representation
LibYAML bindings for Rust
- Host: GitHub
- URL: https://github.com/kimhyunkang/libyaml-rust
- Owner: kimhyunkang
- License: mit
- Created: 2014-05-05T05:31:28.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2018-12-11T23:58:04.000Z (almost 6 years ago)
- Last Synced: 2024-10-06T23:05:34.303Z (28 days ago)
- Language: Rust
- Homepage:
- Size: 254 KB
- Stars: 22
- Watchers: 6
- Forks: 11
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-rust-cn - kimhyunkang/libyaml-rust - ci.org/kimhyunkang/libyaml-rust.svg?branch=master">](https://travis-ci.org/kimhyunkang/libyaml-rust) (Libraries / Encoding)
- awesome-rust - kimhyunkang/libyaml-rust - ci.org/kimhyunkang/libyaml-rust.svg?branch=master">](https://travis-ci.org/kimhyunkang/libyaml-rust) (Libraries / Encoding)
- awesome-rust-zh - kimhyunkang/libyaml-rust - [libyaml](https://pyyaml.org/wiki/LibYAML)绑定 [<img src="https://api.travis-ci.org/kimhyunkang/libyaml-rust.svg?branch=master">](https://travis-ci.org/kimhyunkang/libyaml-rust) (库 / 编码(Encoding))
- awesome-rust - kimhyunkang/libyaml-rust - ci.org/kimhyunkang/libyaml-rust.svg?branch=master">](https://travis-ci.org/kimhyunkang/libyaml-rust) (库 Libraries / 加密 Encoding)
README
libyaml-rust
============[![libyaml-rust on Travis CI][travis-image]][travis]
[![yaml on crates.io][crates-image]][crate][travis-image]: https://travis-ci.org/kimhyunkang/libyaml-rust.svg?branch=master
[travis]: https://travis-ci.org/kimhyunkang/libyaml-rust
[crates-image]: http://meritbadge.herokuapp.com/yaml
[crate]: https://crates.io/crates/yaml[LibYAML][libyaml-home] bindings for [Rust][rust-home]
[libyaml-home]: http://pyyaml.org/wiki/LibYAML
[rust-home]: http://www.rust-lang.org/Dependencies
------------* LibYAML 0.1.4 or higher
* Stable Rust (2015/2018 edition)Usage
-----Parse from memory
~~~~ {.rust}
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
~~~~ {.rust}
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...
- [x] Emitter functions
- [x] Document iterator
- [x] UTF-16 support
- Complete YAML 1.1 specs
- [ ] Tag support
- [ ] [Timestamp type](http://yaml.org/type/timestamp.html)
- [ ] [Int parser](http://yaml.org/type/int.html)
- [ ] [Float parser](http://yaml.org/type/float.html)
- [ ] Token functions