yardlet 0.6.2

Yardlet: a local AI workbench. Plan, queue, route, validate, and hand off long-running work using your already-installed Codex and Claude Code CLIs as hidden workers.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
//! YAML facade.
//!
//! All YAML (de)serialization goes through this module so the concrete crate
//! stays swappable. If we change the backing YAML implementation, only this
//! file and `Cargo.toml` need to change.

pub use serde_yaml_ng::Value;

use serde::de::DeserializeOwned;
use serde::Serialize;

pub fn from_str<T: DeserializeOwned>(s: &str) -> anyhow::Result<T> {
    Ok(serde_yaml_ng::from_str(s)?)
}

pub fn to_string<T: Serialize>(value: &T) -> anyhow::Result<String> {
    Ok(serde_yaml_ng::to_string(value)?)
}