Serde: core traits are mandatory, and the derive feature raises your MSRV
Serialization framework for Rust
At a glance
- What is it?
- Serde is the serialization framework Rust codebases reach for, but the repository's own README is an index of links rather than a reference. What it does pin down precisely is which crate you need, which feature you need, and what the derive macro costs your toolchain.
- Who is it for?
- Adopt Serde when your types cross a process boundary and you want one set of traits shared across formats, and expect to add a format crate per wire format you use. Do not reach for it to hide a schema that changes without warning, because the README shows no versioning guidance.
- Can I use it commercially?
- Yes. Apache-2.0 is a permissive licence: you can use, modify and sell software built on it, as long as you keep its copyright and licence notices.
- Is it still maintained?
- Yes. The repository last received commits 5 days ago.
- What is it written in?
- Mainly Rust, according to GitHub's language statistics.
Answers come from the project's GitHub data, last synced on November 15, 2026, and from our analysis. They are not legal advice.
Star history
- serde-rs/serde10,970 ★ · +139
| Repository | 2026-09-22 | 2026-11-15 |
|---|---|---|
| serde-rs/serde | 10.8k | 11k |
139 Stars in the last 54 days, measured from the daily GitHub snapshot. Compare with other projects
Editorial analysis
The derive feature is what costs you Rust 1.71
The dependency block in the README separates two things that people tend to merge into one. The core crate is always required, because it holds the `Serialize` and `Deserialize` traits. The `derive` feature is required only when you want `#[derive(Serialize, Deserialize)]` to work on structs and enums defined in your own crate.
[dependencies]
# The core APIs, including the Serialize and Deserialize traits. Always
# required when using Serde. The "derive" feature is only required when
# using #[derive(Serialize, Deserialize)] to make Serde work with structs
# and enums defined in your crate.
serde = { version = "1.0", features = ["derive"] }
# Each data format lives in its own crate; the sample code below uses JSON
# but you may be using a different one.
serde_json = "1.0"The badges at the top of the README carry two different minimum Rust versions, and this is where they stop being decoration. The `serde` badge points at Rust 1.56 and the `serde_derive` badge at Rust 1.71. Turning on `derive` therefore moves your build floor forward by fifteen Rust releases. On a library that supports old compilers, the derive macro is the feature that decides whether you can adopt Serde at all.
One crate per format, so JSON is a second dependency rather than a flag
Formats are not built into the core crate. Each data format lives in its own crate, which is why the example carries a second line, `serde_json = "1.0"`, next to the core dependency.
The cost of that split shows up in a manifest. Every wire format in a service is a separate dependency, and the README's sample comment is explicit that JSON is only what the example happens to use. The list of supported formats is not in the repository at all; the README links out to the data formats section of serde.rs for it.
What you get in exchange is the reason the design exists. `Serialize` and `Deserialize` are traits, so the same struct can be written to JSON, to a binary format, or to anything else that implements them, without the struct knowing which. The trade is a dependency per format and a compile step per format crate, in exchange for not writing the mapping twice.
The official example unwraps both directions, so malformed input panics
Here is the whole first run, from the README:
use serde::{Deserialize, Serialize};
#[derive(Serialize, Deserialize, Debug)]
struct Point {
x: i32,
y: i32,
}
fn main() {
let point = Point { x: 1, y: 2 };
// Convert the Point to a JSON string.
let serialized = serde_json::to_string(&point).unwrap();
// Prints serialized = {"x":1,"y":2}
println!("serialized = {}", serialized);
// Convert the JSON string back to a Point.
let deserialized: Point = serde_json::from_str(&serialized).unwrap();
// Prints deserialized = Point { x: 1, y: 2 }
println!("deserialized = {:?}", deserialized);
}Two things are worth naming here. The output is compact with no spaces, `{"x":1,"y":2}`, so anything comparing serialized text needs to match that exactly. And both conversions call `unwrap()`, including the parse of untrusted bytes in `from_str`. The README shows no error branch anywhere, so if you copy this shape into a request handler, malformed input becomes a panic rather than a 400. Treat the snippet as a demonstration of the round trip, not as the error handling you should ship.
version = "1.0" means every patch release arrives on your next cargo update
The manifest version requirement is `1.0`, and the release history shows what that admits. The three most recent tags are v1.0.227 on 2025-09-25, v1.0.228 on 2025-09-27 and v1.0.229 on 2026-07-18, and the last push to the repository was 2026-10-16.
Because every one of those sits in the 1.0 line, semver says your `version = "1.0"` requirement is satisfied by all of them, and `cargo update` will take them without a manifest edit. What protects you is `Cargo.lock` in a binary, and nothing in the README frames releases as anything other than routine. If you need a known-good version of a serialization layer, pin it exactly and treat a lockfile refresh as a reviewable change, because the number in the manifest will never move to tell you something happened.
The gap between 2025-09-27 and 2026-07-18 is also worth noting before you build a release schedule around this project: two patch releases landed two days apart, then the next one arrived about ten months later, while commits kept landing on the repository.
The workspace splits core, derive and the internals, and patches itself over crates.io
The root `Cargo.toml` shows how the pieces are arranged for development, and the member list is longer than the crate name suggests:
[workspace]
members = [
"serde",
"serde_core",
"serde_derive",
"serde_derive_internals",
"test_suite",
]
resolver = "2"`serde_core` exists alongside `serde`, and `serde_derive_internals` sits next to the proc macro, so the traits, the macro and its internal helpers are separate build targets. The workspace then redirects its own published crates to local paths, which is how a change in one member is tested against the others before release:
[patch.crates-io]
serde = { path = "serde" }
serde_core = { path = "serde_core" }
serde_derive = { path = "serde_derive" }The shared dependency versions are declared once at workspace level with features off, so a workspace member decides on features individually:
[workspace.dependencies]
proc-macro2 = { version = "1.0.74", default-features = false }
quote = { version = "1.0.35", default-features = false }
syn = { version = "3", default-features = false }Nothing here changes what a user sees at runtime. It does tell you that `serde` is no longer one crate, which matters when you are reading the source or filing an issue that has to be sorted into the right member.
A support issue filed here may be closed without an answer
The README is unusually direct about where questions go, and the reason it says this at all is that it changes how you should file one.
Filing a support issue in the repository is called acceptable, but the README says those issues tend not to get as many eyes and may get closed without a response after some time. So the issue tracker is a fallback, not the front door. The front door is the Rust community channels: the `#rust-questions` and `#rust-beginners` channels of the community Discord, the `#rust-usage` and `#beginners` channels of the Rust Project Discord, the `#general` stream in Zulip, the `[rust]` tag on StackOverflow, the `/r/rust` subreddit with its pinned weekly easy questions post, and the Rust Discourse forum.
For a serialization problem this matters in a specific way. Questions about how a type maps to a format, or why a struct will not deserialize, are exactly the kind that read as usage questions rather than library bugs, and they will get faster answers in those channels than in a tracker where the README has already warned you about the response rate.
What the README cannot tell you, and the licence terms it does
The README is an index. It links out for the overview, the list of data formats, the derive setup, examples, the API documentation on docs.rs and the release notes, and it stops there. That means several things a deciding engineer needs are absent from the repository itself: no benchmarks, no guidance on error handling beyond the two `unwrap` calls in the sample, nothing on how a struct's field names or nesting are controlled on the wire, and no format list to check against. Each of those gaps has a consequence. Without versioning guidance in the README, renaming a field or changing a nesting level is an uncoordinated wire change between two services you control, and nothing here will warn you at build time.
The licence is the clearest thing in the file. You may take Apache-2.0 or MIT at your option, and the repository ships both texts as `LICENSE-APACHE` and `LICENSE-MIT`. Contributions carry the same choice: unless a contributor states otherwise, a contribution submitted under the Apache-2.0 terms is dual licensed on those terms. For a library that ends up inside both Apache-licensed services and permissively licensed ones, that dual option means one dependency satisfies both policies.
Editorial conclusion
Adopt Serde when your types cross a process boundary and you want one set of traits shared across formats, and expect to add a format crate per wire format you use. Do not reach for it to hide a schema that changes without warning, because the README shows no versioning guidance. Before pinning, check the two minimum Rust versions in the badges, since adding `features = ["derive"]` moves your floor from Rust 1.56 to Rust 1.71.
Frequently asked questions
What is Serde in Rust?
A framework for serializing and deserializing Rust data structures efficiently and generically. The core crate supplies the `Serialize` and `Deserialize` traits, and each data format lives in its own crate, such as `serde_json = "1.0"`.
How do I install Serde?
Add it to `[dependencies]` in Cargo.toml. The core crate is always required, and you only add `features = ["derive"]` when you want `#[derive(Serialize, Deserialize)]` to work on types in your own crate.
How do I use Serde?
Derive the traits on your struct or enum, then call a format crate's functions to convert in each direction. The README's example derives `Serialize`, `Deserialize` and `Debug` on a two-field struct, then calls `serde_json::to_string` and `serde_json::from_str`.
What is the difference between serde and serde_json?
`serde` is the framework holding the traits and the derive macros, and `serde_json` is one data format living in its own crate. You need the core dependency either way, and the format crate only for the formats you actually use.
How do I use serde_json?
Add `serde_json = "1.0"` alongside the core dependency, then call `serde_json::to_string` to write and `serde_json::from_str` to read. Output is compact, so serializing a struct with x and y yields `{"x":1,"y":2}`.
Official sources
Add this badge to your README
If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.
[](https://hysenlabs.com/projects/serde-rs-serde)Star history chart for your README
[](https://hysenlabs.com/projects/serde-rs-serde)Was this useful?