4 stable releases
Uses new Rust 2024
new 3.1.0 | Mar 31, 2025 |
---|---|
3.0.0 | Mar 11, 2025 |
2.0.1 | Mar 11, 2025 |
#7 in #yaml-serialization
467 downloads per month
205KB
4.5K
SLoC
shapely-yaml
YAML serialization and deserialization for Shapely types.
Example
use shapely::Shapely;
use shapely_yaml::from_yaml;
#[derive(Debug, Shapely, PartialEq)]
struct Config {
name: String,
version: u64,
}
let yaml = r#"
name: MyApp
version: 1
"#;
let mut partial = Config::partial();
from_yaml(&mut partial, yaml).expect("Failed to parse YAML");
let config = partial.build::<Config>();
assert_eq!(config, Config { name: "MyApp".to_string(), version: 1 });
Funding
Thanks to Namespace for providing fast GitHub Actions workers:
License
Licensed under either of:
- Apache License, Version 2.0 (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
- MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT)
at your option.
Dependencies
~1MB
~18K SLoC