Skip to content

Commit 16a496a

Browse files
committed
Depend on serde_core instead of serde
This crate does not make use of serde derive macros, thus it can depend on `serde_core` instead of `serde` to speed up users' compile times. See the documentation of [`serde_core`](https://docs.rs/serde_core) for more details.
1 parent 4b53a29 commit 16a496a

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

Cargo.toml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,18 @@ default = ["std"]
2323
std = []
2424

2525
[dependencies]
26-
serde = { version = "1.0.60", optional = true, default-features = false, features = ["alloc"] }
26+
serde = { package = "serde_core", version = "1.0.220", optional = true, default-features = false, features = ["alloc"] }
2727
# Use portable-atomic crate to support platforms without atomic CAS.
2828
# See "no_std support" section in readme for more information.
2929
#
3030
# Enable require-cas feature to provide a better error message if the end user forgets to use the cfg or feature.
3131
extra-platforms = { package = "portable-atomic", version = "1.3", optional = true, default-features = false, features = ["require-cas"] }
3232

33+
# serde v1.0.220 is the first version that released with `serde_core`.
34+
# This is required to avoid conflict with other `serde` users which may require an older version.
35+
[target.'cfg(any())'.dependencies]
36+
serde = { version = "1.0.220", default-features = false }
37+
3338
[dev-dependencies]
3439
serde_test = "1.0"
3540

0 commit comments

Comments
 (0)