mirror of
https://github.com/pezkuwichain/serde.git
synced 2026-04-27 14:37:55 +00:00
Compare commits
9 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| ff3aee490a | |||
| 10bcfc0047 | |||
| 2f03899197 | |||
| 3bea3b6989 | |||
| 85bf29c446 | |||
| 900c922f41 | |||
| 9cf3f2ed7d | |||
| 1ffbeb9516 | |||
| 1051c5e6b7 |
@@ -10,6 +10,7 @@ resolver = "2"
|
|||||||
|
|
||||||
[patch.crates-io]
|
[patch.crates-io]
|
||||||
serde = { path = "serde" }
|
serde = { path = "serde" }
|
||||||
|
serde_core = { path = "serde_core" }
|
||||||
|
|
||||||
[workspace.dependencies]
|
[workspace.dependencies]
|
||||||
proc-macro2 = { version = "1.0.74", default-features = false }
|
proc-macro2 = { version = "1.0.74", default-features = false }
|
||||||
|
|||||||
+2
-2
@@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "serde"
|
name = "serde"
|
||||||
version = "1.0.220"
|
version = "1.0.221"
|
||||||
authors = ["Erick Tryzelaar <erick.tryzelaar@gmail.com>", "David Tolnay <dtolnay@gmail.com>"]
|
authors = ["Erick Tryzelaar <erick.tryzelaar@gmail.com>", "David Tolnay <dtolnay@gmail.com>"]
|
||||||
build = "build.rs"
|
build = "build.rs"
|
||||||
categories = ["encoding", "no-std", "no-std::no-alloc"]
|
categories = ["encoding", "no-std", "no-std::no-alloc"]
|
||||||
@@ -15,7 +15,7 @@ repository = "https://github.com/serde-rs/serde"
|
|||||||
rust-version = "1.56"
|
rust-version = "1.56"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
serde_core = { version = "=1.0.220", path = "../serde_core", default-features = false, features = ["result"] }
|
serde_core = { version = "=1.0.221", path = "../serde_core", default-features = false, features = ["result"] }
|
||||||
serde_derive = { version = "1", optional = true, path = "../serde_derive" }
|
serde_derive = { version = "1", optional = true, path = "../serde_derive" }
|
||||||
|
|
||||||
[package.metadata.playground]
|
[package.metadata.playground]
|
||||||
|
|||||||
@@ -0,0 +1,14 @@
|
|||||||
|
#[macro_export]
|
||||||
|
#[deprecated = "
|
||||||
|
This macro has no effect on any version of Serde released in the past 2 years.
|
||||||
|
It was used long ago in crates that needed to support Rustc older than 1.26.0,
|
||||||
|
or Emscripten targets older than 1.40.0, which did not yet have 128-bit integer
|
||||||
|
support. These days Serde requires a Rust compiler newer than that so 128-bit
|
||||||
|
integers are always supported.
|
||||||
|
"]
|
||||||
|
#[doc(hidden)]
|
||||||
|
macro_rules! serde_if_integer128 {
|
||||||
|
($($tt:tt)*) => {
|
||||||
|
$($tt)*
|
||||||
|
};
|
||||||
|
}
|
||||||
+5
-3
@@ -95,7 +95,7 @@
|
|||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
// Serde types in rustdoc of other crates get linked to here.
|
// Serde types in rustdoc of other crates get linked to here.
|
||||||
#![doc(html_root_url = "https://docs.rs/serde/1.0.220")]
|
#![doc(html_root_url = "https://docs.rs/serde/1.0.221")]
|
||||||
// Support using Serde without the standard library!
|
// Support using Serde without the standard library!
|
||||||
#![cfg_attr(not(feature = "std"), no_std)]
|
#![cfg_attr(not(feature = "std"), no_std)]
|
||||||
// Show which crate feature enables conditionally compiled APIs in documentation.
|
// Show which crate feature enables conditionally compiled APIs in documentation.
|
||||||
@@ -231,10 +231,12 @@ macro_rules! tri {
|
|||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
pub use serde_core::{
|
pub use serde_core::{
|
||||||
de, forward_to_deserialize_any, ser, serde_if_integer128, Deserialize, Deserializer, Serialize,
|
de, forward_to_deserialize_any, ser, Deserialize, Deserializer, Serialize, Serializer,
|
||||||
Serializer,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#[macro_use]
|
||||||
|
mod integer128;
|
||||||
|
|
||||||
// Used by generated code and doc tests. Not public API.
|
// Used by generated code and doc tests. Not public API.
|
||||||
#[doc(hidden)]
|
#[doc(hidden)]
|
||||||
#[path = "private/mod.rs"]
|
#[path = "private/mod.rs"]
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "serde_core"
|
name = "serde_core"
|
||||||
version = "1.0.220"
|
version = "1.0.221"
|
||||||
authors = ["Erick Tryzelaar <erick.tryzelaar@gmail.com>", "David Tolnay <dtolnay@gmail.com>"]
|
authors = ["Erick Tryzelaar <erick.tryzelaar@gmail.com>", "David Tolnay <dtolnay@gmail.com>"]
|
||||||
build = "build.rs"
|
build = "build.rs"
|
||||||
categories = ["encoding", "no-std", "no-std::no-alloc"]
|
categories = ["encoding", "no-std", "no-std::no-alloc"]
|
||||||
@@ -36,7 +36,7 @@ rustdoc-args = [
|
|||||||
# is compatible with exactly one serde release because the generated code
|
# is compatible with exactly one serde release because the generated code
|
||||||
# involves nonpublic APIs which are not bound by semver.
|
# involves nonpublic APIs which are not bound by semver.
|
||||||
[target.'cfg(any())'.dependencies]
|
[target.'cfg(any())'.dependencies]
|
||||||
serde_derive = { version = "=1.0.220", path = "../serde_derive" }
|
serde_derive = { version = "=1.0.221", path = "../serde_derive" }
|
||||||
|
|
||||||
|
|
||||||
### FEATURES #################################################################
|
### FEATURES #################################################################
|
||||||
|
|||||||
+17
-1
@@ -4,9 +4,25 @@ The `serde_core` crate contains Serde's trait definitions with **no support for
|
|||||||
In crates that derive an implementation of `Serialize` or `Deserialize`, you
|
In crates that derive an implementation of `Serialize` or `Deserialize`, you
|
||||||
must depend on the [`serde`] crate, not `serde_core`.
|
must depend on the [`serde`] crate, not `serde_core`.
|
||||||
|
|
||||||
|
[`serde`]: https://crates.io/crates/serde
|
||||||
|
|
||||||
In crates that handwrite implementations of Serde traits, or only use them as
|
In crates that handwrite implementations of Serde traits, or only use them as
|
||||||
trait bounds, depending on `serde_core` is permitted. But `serde` re-exports all
|
trait bounds, depending on `serde_core` is permitted. But `serde` re-exports all
|
||||||
of these traits and can be used for this use case too. If in doubt, disregard
|
of these traits and can be used for this use case too. If in doubt, disregard
|
||||||
`serde_core` and always use `serde`.
|
`serde_core` and always use `serde`.
|
||||||
|
|
||||||
[`serde`]: https://crates.io/crates/serde
|
Crates that depend on `serde_core` instead of `serde` are able to compile in
|
||||||
|
parallel with `serde_derive` even when `serde`'s "derive" feature is turned on,
|
||||||
|
as shown in the following build timings.
|
||||||
|
|
||||||
|
<br>
|
||||||
|
|
||||||
|
| When `serde_json` depends on `serde` |
|
||||||
|
|---|
|
||||||
|
| <img src="https://github.com/user-attachments/assets/78dc179c-6ab1-4059-928c-1474b0d9d0bb"> |
|
||||||
|
|
||||||
|
<br>
|
||||||
|
|
||||||
|
| When `serde_json` depends on `serde_core` |
|
||||||
|
|---|
|
||||||
|
| <img src="https://github.com/user-attachments/assets/6b6cff5e-3e45-4ac7-9db1-d99ee8b9f5f7"> |
|
||||||
|
|||||||
@@ -1,9 +0,0 @@
|
|||||||
// No longer used. Old versions of serde used this macro for supporting targets
|
|
||||||
// that did not yet have 128-bit integer support.
|
|
||||||
#[macro_export]
|
|
||||||
#[doc(hidden)]
|
|
||||||
macro_rules! serde_if_integer128 {
|
|
||||||
($($tt:tt)*) => {
|
|
||||||
$($tt)*
|
|
||||||
};
|
|
||||||
}
|
|
||||||
+20
-5
@@ -7,17 +7,35 @@
|
|||||||
//! In crates that derive an implementation of `Serialize` or `Deserialize`, you
|
//! In crates that derive an implementation of `Serialize` or `Deserialize`, you
|
||||||
//! must depend on the [`serde`] crate, not `serde_core`.
|
//! must depend on the [`serde`] crate, not `serde_core`.
|
||||||
//!
|
//!
|
||||||
|
//! [`serde`]: https://crates.io/crates/serde
|
||||||
|
//!
|
||||||
//! In crates that handwrite implementations of Serde traits, or only use them
|
//! In crates that handwrite implementations of Serde traits, or only use them
|
||||||
//! as trait bounds, depending on `serde_core` is permitted. But `serde`
|
//! as trait bounds, depending on `serde_core` is permitted. But `serde`
|
||||||
//! re-exports all of these traits and can be used for this use case too. If in
|
//! re-exports all of these traits and can be used for this use case too. If in
|
||||||
//! doubt, disregard `serde_core` and always use `serde`.
|
//! doubt, disregard `serde_core` and always use `serde`.
|
||||||
//!
|
//!
|
||||||
//! [`serde`]: https://crates.io/crates/serde
|
//! Crates that depend on `serde_core` instead of `serde` are able to compile in
|
||||||
|
//! parallel with `serde_derive` even when `serde`'s "derive" feature is turned on,
|
||||||
|
//! as shown in the following build timings.
|
||||||
|
//!
|
||||||
|
//! <br>
|
||||||
|
//!
|
||||||
|
//! <table>
|
||||||
|
//! <tr><td align="center">When <code>serde_json</code> depends on <code>serde</code></td></tr>
|
||||||
|
//! <tr><td><img src="https://github.com/user-attachments/assets/78dc179c-6ab1-4059-928c-1474b0d9d0bb"></td></tr>
|
||||||
|
//! </table>
|
||||||
|
//!
|
||||||
|
//! <br>
|
||||||
|
//!
|
||||||
|
//! <table>
|
||||||
|
//! <tr><td align="center">When <code>serde_json</code> depends on <code>serde_core</code></td></tr>
|
||||||
|
//! <tr><td><img src="https://github.com/user-attachments/assets/6b6cff5e-3e45-4ac7-9db1-d99ee8b9f5f7"></td></tr>
|
||||||
|
//! </table>
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
// Serde types in rustdoc of other crates get linked to here.
|
// Serde types in rustdoc of other crates get linked to here.
|
||||||
#![doc(html_root_url = "https://docs.rs/serde/1.0.220")]
|
#![doc(html_root_url = "https://docs.rs/serde/1.0.221")]
|
||||||
// Support using Serde without the standard library!
|
// Support using Serde without the standard library!
|
||||||
#![cfg_attr(not(feature = "std"), no_std)]
|
#![cfg_attr(not(feature = "std"), no_std)]
|
||||||
// Show which crate feature enables conditionally compiled APIs in documentation.
|
// Show which crate feature enables conditionally compiled APIs in documentation.
|
||||||
@@ -222,9 +240,6 @@ macro_rules! tri {
|
|||||||
#[macro_use]
|
#[macro_use]
|
||||||
mod macros;
|
mod macros;
|
||||||
|
|
||||||
#[macro_use]
|
|
||||||
mod integer128;
|
|
||||||
|
|
||||||
pub mod de;
|
pub mod de;
|
||||||
pub mod ser;
|
pub mod ser;
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "serde_derive"
|
name = "serde_derive"
|
||||||
version = "1.0.220"
|
version = "1.0.221"
|
||||||
authors = ["Erick Tryzelaar <erick.tryzelaar@gmail.com>", "David Tolnay <dtolnay@gmail.com>"]
|
authors = ["Erick Tryzelaar <erick.tryzelaar@gmail.com>", "David Tolnay <dtolnay@gmail.com>"]
|
||||||
categories = ["no-std", "no-std::no-alloc"]
|
categories = ["no-std", "no-std::no-alloc"]
|
||||||
description = "Macros 1.1 implementation of #[derive(Serialize, Deserialize)]"
|
description = "Macros 1.1 implementation of #[derive(Serialize, Deserialize)]"
|
||||||
|
|||||||
@@ -13,7 +13,7 @@
|
|||||||
//!
|
//!
|
||||||
//! [https://serde.rs/derive.html]: https://serde.rs/derive.html
|
//! [https://serde.rs/derive.html]: https://serde.rs/derive.html
|
||||||
|
|
||||||
#![doc(html_root_url = "https://docs.rs/serde_derive/1.0.220")]
|
#![doc(html_root_url = "https://docs.rs/serde_derive/1.0.221")]
|
||||||
#![cfg_attr(not(check_cfg), allow(unexpected_cfgs))]
|
#![cfg_attr(not(check_cfg), allow(unexpected_cfgs))]
|
||||||
// Ignored clippy lints
|
// Ignored clippy lints
|
||||||
#![allow(
|
#![allow(
|
||||||
|
|||||||
@@ -18,4 +18,4 @@ rustversion = "1.0"
|
|||||||
serde = { path = "../serde", features = ["rc"] }
|
serde = { path = "../serde", features = ["rc"] }
|
||||||
serde_derive = { path = "../serde_derive", features = ["deserialize_in_place"] }
|
serde_derive = { path = "../serde_derive", features = ["deserialize_in_place"] }
|
||||||
serde_test = "1.0.176"
|
serde_test = "1.0.176"
|
||||||
trybuild = { version = "1.0.97", features = ["diff"] }
|
trybuild = { version = "1.0.108", features = ["diff"] }
|
||||||
|
|||||||
Reference in New Issue
Block a user