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 fileTake it
Merge pull request #2964 from dtolnay/serdecoredocDavid Tolnaybefore adoption79f3484
lines 1–2why, one step back1The `serde_core` crate contains Serde's trait definitions with **no support for2#\[derive()\]**.Merge pull request #2608 from osiewicz/extract_serde_coreDavid Tolnaybefore adoption723fcac
line 3why, one step back3Merge pull request #2964 from dtolnay/serdecoredocDavid Tolnaybefore adoption79f3484
lines 4–5why, one step back4In crates that derive an implementation of `Serialize` or `Deserialize`, you5must depend on the [`serde`] crate, not `serde_core`.Merge pull request #2608 from osiewicz/extract_serde_coreDavid Tolnaybefore adoption723fcac
line 6why, one step back6Merge pull request #2973 from dtolnay/timingsDavid Tolnaybefore adoption85bf29c
lines 7–8why, one step back7[`serde`]: https://crates.io/crates/serde8Merge pull request #2964 from dtolnay/serdecoredocDavid Tolnaybefore adoption79f3484
lines 9–12why, one step back9In crates that handwrite implementations of Serde traits, or only use them as10trait 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 back13Merge pull request #2973 from dtolnay/timingsDavid Tolnaybefore adoption85bf29c
lines 14–28why, one step back14Crates that depend on `serde_core` instead of `serde` are able to compile in15parallel 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"> |