Skip to content
Myr

README.md

This file

Path

serde_core/README.md

28 lines · 1.0 KiB · Markdown

Last changed by

Merge pull request #2973 from dtolnay/timingsDavid Tolnaybefore adoption85bf29c

History of this file

Take it

Merge pull request #2964 from dtolnay/serdecoredocDavid Tolnaybefore adoption79f3484

lines 1–2why, one step back
1The `serde_core` crate contains Serde's trait definitions with **no support for
2#\[derive()\]**.

Merge pull request #2608 from osiewicz/extract_serde_coreDavid Tolnaybefore adoption723fcac

line 3why, one step back
3

Merge pull request #2964 from dtolnay/serdecoredocDavid Tolnaybefore adoption79f3484

lines 4–5why, one step back
4In crates that derive an implementation of `Serialize` or `Deserialize`, you
5must depend on the [`serde`] crate, not `serde_core`.

Merge pull request #2608 from osiewicz/extract_serde_coreDavid Tolnaybefore adoption723fcac

line 6why, one step back
6

Merge pull request #2973 from dtolnay/timingsDavid Tolnaybefore adoption85bf29c

lines 7–8why, one step back
7[`serde`]: https://crates.io/crates/serde
8

Merge pull request #2964 from dtolnay/serdecoredocDavid Tolnaybefore adoption79f3484

lines 9–12why, one step back
9In crates that handwrite implementations of Serde traits, or only use them as
10trait bounds, depending on `serde_core` is permitted. But `serde` re-exports all11of these traits and can be used for this use case too. If in doubt, disregard12`serde_core` and always use `serde`.

Merge pull request #2608 from osiewicz/extract_serde_coreDavid Tolnaybefore adoption723fcac

line 13why, one step back
13

Merge pull request #2973 from dtolnay/timingsDavid Tolnaybefore adoption85bf29c

lines 14–28why, one step back
14Crates that depend on `serde_core` instead of `serde` are able to compile in
15parallel with `serde_derive` even when `serde`'s "derive" feature is turned on,16as shown in the following build timings.1718<br>1920| When `serde_json` depends on `serde` |21|---|22| <img src="https://github.com/user-attachments/assets/78dc179c-6ab1-4059-928c-1474b0d9d0bb"> |2324<br>2526| When `serde_json` depends on `serde_core` |27|---|28| <img src="https://github.com/user-attachments/assets/6b6cff5e-3e45-4ac7-9db1-d99ee8b9f5f7"> |