serde_yaml

Strongly typed YAML serialization and deserialization for Rust, built on Serde

Library
Cargo
v0.9.34+deprecated
1,016 stars
Apache License 2.0

Repository Health

Pre-computed score based on development activity, maintenance, community, maturity, and trend momentum. How we score it →
50 /100 Fair
Development Activity 0
Maintenance 44
Community 68
Maturity 60
Momentum 28

Technical Analysis

AI-assessed by reading the actual repository — architecture, code quality, innovation, and documentation. How we score it →
75 /100 Good
Architecture 80
Code Quality 78
Innovation 65
Learning Curve 75

serde_yaml plugs the YAML 1.1 data format into the Serde serialization framework, so any Rust type that derives Serialize/Deserialize can be converted to and from YAML documents with the same type safety Serde provides for JSON, TOML, and other formats. It supports structs, enums (including YAML’s !Tag variant syntax), maps, sequences, and Serde’s full derive-macro ecosystem, backed internally by unsafe-libyaml, a Rust port of libyaml.

The crate is authored by David Tolnay, maintainer of Serde itself, and has been a long-standing default choice for YAML handling in the Rust ecosystem — used for parsing configuration files, Kubernetes-style manifests, and CI definitions. As of the final 0.9.34 release the crate is explicitly marked deprecated/no-longer-maintained by its author, though the existing API remains usable and widely depended upon.

What You Get

  • serde_yaml::to_string / from_str for round-tripping any Serde-derived type through YAML
  • A Value enum for working with untyped/dynamic YAML documents when a concrete type isn’t known upfront
  • Support for YAML’s !Tag enum-variant syntax mapping onto Rust enum variants
  • A with module of helper (de)serializers for common non-default YAML representations
  • Integration with Serde’s full ecosystem of derive attributes (renames, defaults, flattening, etc.)

Common Use Cases

  • Loading application configuration files written in YAML into strongly typed Rust config structs
  • Parsing and generating Kubernetes-style or CI-pipeline YAML manifests programmatically
  • Converting between YAML and other Serde-supported formats (JSON, TOML) via a shared intermediate type
  • Working with untyped YAML documents via serde_yaml::Value when the schema isn’t known ahead of time

Under The Hood

Architecture - The crate implements Serde’s Serializer (src/ser.rs) and Deserializer (src/de.rs, ~1,850 lines) traits on top of an internal loader.rs that walks events produced by the bundled libyaml port, translating YAML’s node model (scalars, sequences, mappings, tagged variants) into Serde’s visitor callbacks; a separate value/ module provides an untyped Value enum and a mapping.rs ordered-map type for cases where the target schema isn’t known statically. Tech Stack - Pure Rust (edition 2021, MSRV 1.64), depending on unsafe-libyaml (a hand-ported, dependency-free Rust translation of the C libyaml parser) rather than an FFI binding, plus indexmap, itoa, and ryu for ordered maps and fast number formatting; it has no dependency on Serde beyond the core crate. Code Quality - tests/ covers deserialization (test_de.rs), serialization round-trips, error paths (test_error.rs), and the Value type separately, and the crate ships a fuzz/ target for the parser; the author (Serde’s maintainer) is known for rigorous API design, though the crate carries the +deprecated version suffix and the README states it is no longer maintained, so no further bug fixes should be expected upstream. API Design - The public API mirrors serde_json’s (to_string/from_str/Value) closely, which makes it near-zero-friction for anyone already familiar with Serde-based JSON handling, and the with module supplies ready-made (de)serializers for YAML-specific quirks like optional-vs-null distinctions.

Used by 25 apps in this directory

TypeScript
78%
LGPL 3.0

Latitude

AI Agents · Monitoring

4,733

Open-source AI agent monitoring that catches what will break next before your users do.

View details
87
Repo Health
88
Technical
67
Dependency
Built with
TypeScript 78%
Python 11%
Rust 11%
Updated 1 weeks ago
Rust
86%
Apache 2.0

mesh-llm

AI Agents · AI Development

3,551

Mesh LLM pools GPUs and memory across every machine you own into one OpenAI-compatible API, so agents tap distributed compute instead of a single GPU box or a metered cloud bill.

View details
85
Repo Health
91
Technical
69
Dependency
Built with
Rust 86%
TypeScript 10%
Updated 6 days ago
Python
100%
Other

OpenBB

Analytics · Databases · Invoicing Finance

74,601

The AI Workspace for Finance: Connect Data, Run AI Agents, Build Analytics

View details
80
Repo Health
80
Technical
65
Dependency
Built with
Python 100%
Updated 1 weeks ago
Rust
59%
GPL 3.0

openfootmanager

Game Development

1,161

A free and open source football management simulation game built with Rust and Tauri, inspired by Football Manager.

View details
94
Repo Health
79
Technical
73
Dependency
Built with
Rust 59%
TypeScript 40%
Updated 1 weeks ago
Python
73%
AGPL 3.0

OpenViking

AI Development · AI Memory · Databases

40,705

An open-source context database that gives AI agents a unified filesystem for memory, resources, and skills with hierarchical tiered retrieval.

View details
85
Repo Health
75
Technical
64
Dependency
Built with
Python 73%
TypeScript 12%
Rust 11%
Updated 6 days ago
Python
55%
Other

PostHog

Ab Testing Experimentation · Analytics · Developer Tools

40,397

The all-in-one open source product platform combining analytics, session replay, feature flags, error tracking, AI observability, and a built-in data warehouse in a single self-hostable stack.

View details
92
Repo Health
80
Technical
65
Dependency
Built with
Python 55%
TypeScript 36%
Updated 6 days ago
Java
93%
Apache 2.0

QuestDB

Analytics · Databases

17,466

A high-performance, open-source time-series database built for financial market data, IoT telemetry, and real-time analytics, combining a zero-GC Java/C++ core with SIMD-accelerated SQL and a WAL-to-Parquet storage engine.

View details
91
Repo Health
86
Technical
67
Dependency
Built with
Java 93%
Updated 6 days ago
Rust
79%
AGPL 3.0

Spacedrive

Collaboration · File Storage

39,292

One file manager for all your devices and clouds — powered by a Virtual Distributed File System built in Rust.

View details
84
Repo Health
84
Technical
63
Dependency
Built with
Rust 79%
TypeScript 18%
Updated 2 weeks ago
Rust
74%
MIT

squad

AI Agents · Collaboration · Developer Tools

833

A daemonless Rust CLI that lets multiple AI coding agents collaborate across terminals through a shared SQLite database instead of a server.

View details
42
Repo Health
73
Technical
79
Dependency
Built with
Rust 74%
Shell 14%
HTML 12%
Updated 5 months ago

Join founders buildingwith open source

Opinionated takes, migration guides, cost-saving tips, and insights from the open source ecosystem.

Subscribe on Substack
Join 750+ subscribers