Serde
github.com
1
Leaving SiteNav
External Link Disclaimer
You are about to visit github.com. This website is not operated by us. We are not responsible for its content or privacy practices.
About this website
Serde is a powerful serialization and deserialization framework for Rust, widely regarded as the gold standard for data serialization in any programming language. With over 9,600 stars as of 2026, Serde provides zero-copy, zero-cost abstractions for converting between Rust data structures and serialization formats including JSON, YAML, TOML, MessagePack, CBOR, BSON, Bincode, URL query strings, and XML. The framework uses Rust procedural macros (via serde_derive) to automatically generate serialization code at compile time through the #[derive(Serialize, Deserialize)] attribute, requiring no runtime reflection. Key features include: derive macros that generate trait implementations for any struct or enum, support for rename (field name mapping), skip (excluding fields), default values, flatten (embedding nested structures), tag-based enum representations (internally tagged, externally tagged, adjacently tagged, untagged), custom serialization with Serializer and Visitor traits, serialization containers with lifetime bounds for zero-copy deserialization of borrowed data (enabling parsing of large JSON files without allocation), derive-based field attributes (serde(default), serde(skip_serializing_if), serde(with) for custom handlers), and format-agnostic design enabling the same Rust types to be serialized to any supported format. Serde benchmarks show JSON deserialization at over 1 GB/s on modern hardware, 4-10x faster than serde_json already being among the fastest JSON parsers. Used by virtually every production Rust application including Cloudflare, AWS Firecracker, and Discord.
Tags & Categories
Categories
Tags
Statistics
1
Views
0
Clicks
0
Like
0
Dislike