Allow hyper_serde to only depend on serde_core for potentially faster compile times. (#39467)

Serde_core was released which has all the traits and allows some crates
to have parallel compile times.
More information can be found here:
https://github.com/serde-rs/serde/tree/master/serde_core
serde_bytes already depends on on serde_core. Additionally added serde
and serde_core to dependabot group.

Signed-off-by: Narfinger <Narfinger@users.noreply.github.com>

Testing: Compilation is the test.

---------

Signed-off-by: Narfinger <Narfinger@users.noreply.github.com>
This commit is contained in:
Narfinger 2025-09-25 17:54:21 +02:00 committed by GitHub
parent a4c8ffe753
commit e3e2dcb5a2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 12 additions and 5 deletions

View file

@ -38,6 +38,10 @@ updates:
objc2-related: objc2-related:
patterns: patterns:
- "objc2*" - "objc2*"
serde-related:
patterns:
- "serde"
- "serde_core"
servo-media-related: servo-media-related:
patterns: patterns:
- "servo-media*" - "servo-media*"

1
Cargo.lock generated
View file

@ -4051,6 +4051,7 @@ dependencies = [
"mime", "mime",
"serde", "serde",
"serde_bytes", "serde_bytes",
"serde_core",
"serde_test", "serde_test",
] ]

View file

@ -130,6 +130,7 @@ script_traits = { path = "components/shared/script" }
selectors = { git = "https://github.com/servo/stylo", branch = "2025-09-02" } selectors = { git = "https://github.com/servo/stylo", branch = "2025-09-02" }
serde = "1.0.226" serde = "1.0.226"
serde_bytes = "0.11" serde_bytes = "0.11"
serde_core = "1.0.226"
serde_json = "1.0" serde_json = "1.0"
servo-media = { git = "https://github.com/servo/media" } servo-media = { git = "https://github.com/servo/media" }
servo-media-dummy = { git = "https://github.com/servo/media" } servo-media-dummy = { git = "https://github.com/servo/media" }

View file

@ -21,8 +21,9 @@ headers = { workspace = true }
http = { workspace = true } http = { workspace = true }
hyper = { workspace = true } hyper = { workspace = true }
mime = { workspace = true } mime = { workspace = true }
serde = { workspace = true }
serde_bytes = { workspace = true } serde_bytes = { workspace = true }
serde_core = { workspace = true }
[dev-dependencies] [dev-dependencies]
serde = { workspace = true }
serde_test = "1.0" serde_test = "1.0"

View file

@ -73,10 +73,10 @@ use http::HeaderMap;
use hyper::header::{HeaderName, HeaderValue}; use hyper::header::{HeaderName, HeaderValue};
use hyper::{Method, StatusCode, Uri}; use hyper::{Method, StatusCode, Uri};
use mime::Mime; use mime::Mime;
use serde::de::{self, Error, MapAccess, SeqAccess, Visitor};
use serde::ser::{SerializeMap, SerializeSeq};
use serde::{Deserialize, Deserializer, Serialize, Serializer};
use serde_bytes::{ByteBuf, Bytes}; use serde_bytes::{ByteBuf, Bytes};
use serde_core::de::{self, Error, MapAccess, SeqAccess, Visitor};
use serde_core::ser::{SerializeMap, SerializeSeq};
use serde_core::{Deserialize, Deserializer, Serialize, Serializer};
/// Deserialises a `T` value with a given deserializer. /// Deserialises a `T` value with a given deserializer.
/// ///
@ -164,7 +164,7 @@ pub struct Ser<'a, T: 'a> {
impl<'a, T> Ser<'a, T> impl<'a, T> Ser<'a, T>
where where
Ser<'a, T>: serde::Serialize, Ser<'a, T>: serde_core::Serialize,
{ {
/// Returns a new `Ser` wrapper. /// Returns a new `Ser` wrapper.
#[inline(always)] #[inline(always)]