OSS TanbouSign in with GitHub

decouple Rust data types from formats through shared Serialize and Deserialize traits

OSS scale score 260.9OSS health 100
About these scores

OSS scale score is an unbounded metric that log-compresses and weights Stars, Watchers, Forks, and Contributors. Discovery score is the current OSS scale score minus the score at discovery. Update pace is commits in the last 30 days, growth momentum is the OSS scale score difference within the recent observation window, and OSS health is a 0–100 rating based on available recency, Community Health, and release data.

Stars
10,861
Primary language
Rust
License
Apache-2.0
Repository last updated
Sep 22, 2026
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.

Sources: [2][3]

Official sources

  1. [1]serde-rs/serde — GitHub repository(2026-10-06)
  2. [2]Serde 1.0.229 — README(2026-10-06)
  3. [3]Serde 1.0.229 — Cargo.toml(2026-10-06)
  4. [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. 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. 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. 3

    Verify the round trip

    Confirm the serialized output and the following deserialized = Point { x: 1, y: 2 } output.

    serialized = {"x":1,"y":2}
Check the official README

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
Write a related article

Share a guide or use case for this OSS in Markdown. Articles are published after administrator approval.

Report incorrect information

Tell us if any listing information is incorrect or outdated.

After reading this page, do you know what to do next?