On this page
Overview
Serde is a framework for efficiently serializing and deserializing Rust data structures. Its Serialize and Deserialize traits provide a format-independent interface between Rust types and format crates such as JSON, YAML, or MessagePack implementations.
Features and best fit
Based on official documentation; not hands-on tested · Content checked:
Key features
Separate Rust data types from concrete serialization formats
Serde core defines Serialize and Deserialize traits, while concrete formats live in separate crates such as serde_json. A domain type can therefore be reused across multiple formats without embedding each format's logic.
Sources: [2]
Generate implementations for structs and enums with derive macros
Enabling the derive feature provides #[derive(Serialize, Deserialize)] for structs and enums. Attributes can customize field names, skipping, defaults, and other mappings between Rust types and external formats.
Sources: [2]
Best fit
Fits Rust code handling API payloads, configuration, or multiple data formats
Serde works well in libraries and backends where the same Rust models need to cross JSON APIs, configuration files, binary protocols, or other format boundaries while keeping format-specific logic separate.
Sources: [2]
Before adoption
Check separate MSRVs and no_std feature combinations
In Serde 1.0.229, the serde crate has Rust 1.56 as its MSRV while serde_derive targets Rust 1.71. std is enabled by default; no_std users should disable default features and enable alloc only when their data types require allocation-backed collections.
Official sources
- [1]serde-rs/serde — GitHub repository(2026-10-06)
- [2]Serde 1.0.229 — README(2026-10-06)
- [3]Serde 1.0.229 — Cargo.toml(2026-10-06)
- [4]Serde 1.0.229 release(2026-10-06)
Supplemental curator note
Serde is not a JSON-specific library; it is the trait layer connecting Rust data structures to format crates. Treat the core traits, derive macros, and a format implementation such as serde_json as separate compatibility surfaces.
Try it in 3 steps
- 1
Open the official Playground example
Open the Serialize/Deserialize example linked directly from the Serde README in Rust Playground.
https://play.rust-lang.org/?edition=2021&gist=72755f28f99afc95e01d63174b28c1f5 - 2
Run the example
Use Playground Run to serialize the Point struct to JSON with serde_json and deserialize it back into the Rust type.
Run - 3
Verify the round trip
Confirm the serialized output and the following deserialized = Point { x: 1, y: 2 } output.
serialized = {"x":1,"y":2}
Growth
Growth trends · Last 30 days
10,861 Stars
Trend data is still being collected.
Built with
Categories and tags
Categories
GitHub data
GitHub dataView detailed GitHub data
GitHub Topics
- derive
- no-std
- rust
- serde
- Stars
- 10,861
- Forks
- 951
- Watchers
- 73
- Open issues
- 404
- Contributors
- 180
- Owner type
- Organization
- Primary language
- Rust
- License
- Apache-2.0
- Repository last updated
- Sep 22, 2026
Related information
Write a related articleShare a guide or use case for this OSS in Markdown. Articles are published after administrator approval.
Explore next
- Poem4,445 Stars
2 shared tag(s) · Same language
build Rust HTTP servers by composing routes, extractors, and middleware
Rust - Salvo4,438 Stars
2 shared tag(s) · Same language
build Rust web services with HTTP/1-3, OpenAPI, WebSockets, and integrated TLS features
Rust - async-graphql3,682 Stars
2 shared tag(s) · Same language
build type-safe GraphQL schemas, resolvers, and subscriptions in Rust
Rust - Tauri111,593 Stars
1 shared tag(s) · 1 shared category(s) · Same language
Combine a web frontend and Rust native layer into desktop and mobile apps using system WebViews
Rust - uv90,421 Stars
1 shared tag(s) · 1 shared category(s) · Same language
manage Python versions, environments, dependencies, lockfiles, tools, and publishing through one fast project CLI
Rust - Tokio33,338 Stars
3 shared tag(s) · 1 shared category(s) · Same language
run asynchronous Rust I/O, tasks, networking, and timers on one runtime
Rust
Report incorrect information
Tell us if any listing information is incorrect or outdated.