Serde is a framework for serializing and deserializing Rust data structures efficiently and generically. Created by David Tolnay, Serde is the most widely-used crate in the Rust ecosystem — essentially every Rust project that touches JSON, TOML, MessagePack, or any other format uses it.
Its derive macros eliminate boilerplate, and its trait design lets a single Rust type be serialized to dozens of formats without code changes.
Serialization framework for Rust. Derive Serialize/Deserialize and you're done. Zero-cost abstractions.
✨ Features
#[derive(Serialize, Deserialize)] on any struct — zero boilerplate, full power.
JSON, TOML, YAML, MessagePack, CBOR, BSON, Bincode — one Rust type, many wire formats.
Compile-time generated code is as fast as hand-rolled serializers.
#[serde(rename, default, skip, flatten)] for every edge case.
Implement Deserializer for new formats, or Visitor for custom logic. Open-ended.