Migration Guide: Moving from serde_yaml to noyalib
Upstream serde_yaml (0.9) has been archived. noyalib provides a drop-in compatibility feature (compat-serde-yaml) allowing projects to migrate seamlessly with zero logic changes.
1-Step Cargo Migration
Update your Cargo.toml:
# Old dependency:
# serde_yaml = "0.9"
# Replace with noyalib compatibility feature:
noyalib = { version = "0.0.16", features = ["compat-serde-yaml", "simd"] }
Code Import Alias
In your Rust source code:
// Old import:
// use serde_yaml::Value;
// Replace with noyalib compatibility module:
use noyalib::compat::serde_yaml as serde_yaml;
use serde_yaml::Value;
fn main() -> Result<(), serde_yaml::Error> {
let val: Value = serde_yaml::from_str("name: noyalib")?;
println!("Migrated: {}", val["name"]);
Ok(())
}
Performance Uplift Post-Migration
| Metric | serde_yaml 0.9 |
noyalib (SIMD + Rayon) |
Improvement |
|---|---|---|---|
| Parsing Speed | 68 MB/s | 520 MB/s | 7.6x Faster |
| Safety Invariant | Contains Unsafe | 100% Safe (forbid(unsafe_code)) |
Guaranteed Safe |
| Maintenance | Archived | Active (2026 Core Support) | Active Maintenance |