From 517e5dbb06b9c7a964fa3fbb123963e9275689dc Mon Sep 17 00:00:00 2001 From: Matthias Seitz Date: Mon, 23 Dec 2024 10:46:35 +0100 Subject: [PATCH] chore: disable default std serde_json feature (#13513) --- Cargo.toml | 2 +- crates/chainspec/Cargo.toml | 3 ++- crates/ethereum/evm/Cargo.toml | 3 ++- crates/fs-util/Cargo.toml | 2 +- crates/net/network-types/Cargo.toml | 2 +- crates/net/peers/Cargo.toml | 1 + crates/optimism/chainspec/Cargo.toml | 1 + crates/primitives-traits/Cargo.toml | 3 ++- crates/primitives/Cargo.toml | 3 ++- crates/storage/codecs/Cargo.toml | 3 ++- crates/trie/common/Cargo.toml | 3 ++- 11 files changed, 17 insertions(+), 9 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 5822a0bee..4b0e15d4f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -522,7 +522,7 @@ rayon = "1.7" rustc-hash = { version = "2.0", default-features = false } schnellru = "0.2" serde = { version = "1.0", default-features = false } -serde_json = "1.0.94" +serde_json = { version = "1.0.94", default-features = false, features = ["alloc"] } serde_with = { version = "3", default-features = false, features = ["macros"] } sha2 = { version = "0.10", default-features = false } shellexpand = "3.0.0" diff --git a/crates/chainspec/Cargo.toml b/crates/chainspec/Cargo.toml index bc3fcf04e..b050a0d90 100644 --- a/crates/chainspec/Cargo.toml +++ b/crates/chainspec/Cargo.toml @@ -52,7 +52,8 @@ std = [ "reth-ethereum-forks/std", "derive_more/std", "reth-network-peers/std", - "reth-trie-common/std" + "reth-trie-common/std", + "serde_json/std" ] arbitrary = [ "alloy-chains/arbitrary", diff --git a/crates/ethereum/evm/Cargo.toml b/crates/ethereum/evm/Cargo.toml index 4ee072599..d12d4d6d7 100644 --- a/crates/ethereum/evm/Cargo.toml +++ b/crates/ethereum/evm/Cargo.toml @@ -51,5 +51,6 @@ std = [ "alloy-primitives/std", "revm-primitives/std", "secp256k1/std", - "reth-ethereum-forks/std" + "reth-ethereum-forks/std", + "serde_json/std" ] diff --git a/crates/fs-util/Cargo.toml b/crates/fs-util/Cargo.toml index 907e89499..10718687e 100644 --- a/crates/fs-util/Cargo.toml +++ b/crates/fs-util/Cargo.toml @@ -14,6 +14,6 @@ workspace = true [dependencies] # misc -serde_json.workspace = true +serde_json = { workspace = true, features = ["std"] } serde.workspace = true thiserror.workspace = true diff --git a/crates/net/network-types/Cargo.toml b/crates/net/network-types/Cargo.toml index 932527b91..cd73106ad 100644 --- a/crates/net/network-types/Cargo.toml +++ b/crates/net/network-types/Cargo.toml @@ -20,7 +20,7 @@ reth-ethereum-forks.workspace = true # misc serde = { workspace = true, optional = true } humantime-serde = { workspace = true, optional = true } -serde_json = { workspace = true } +serde_json = { workspace = true, features = ["std"] } # misc tracing.workspace = true diff --git a/crates/net/peers/Cargo.toml b/crates/net/peers/Cargo.toml index 9e7ccc308..b099da918 100644 --- a/crates/net/peers/Cargo.toml +++ b/crates/net/peers/Cargo.toml @@ -44,6 +44,7 @@ std = [ "serde_with/std", "thiserror/std", "url/std", + "serde_json/std" ] secp256k1 = ["dep:secp256k1", "enr/secp256k1"] net = ["std", "dep:tokio", "tokio?/net"] diff --git a/crates/optimism/chainspec/Cargo.toml b/crates/optimism/chainspec/Cargo.toml index 27fdfabe1..1f5ecdffc 100644 --- a/crates/optimism/chainspec/Cargo.toml +++ b/crates/optimism/chainspec/Cargo.toml @@ -62,5 +62,6 @@ std = [ "derive_more/std", "reth-network-peers/std", "thiserror/std", + "serde_json/std", "op-alloy-consensus/std" ] diff --git a/crates/primitives-traits/Cargo.toml b/crates/primitives-traits/Cargo.toml index 8c2fc715b..a84394033 100644 --- a/crates/primitives-traits/Cargo.toml +++ b/crates/primitives-traits/Cargo.toml @@ -89,7 +89,8 @@ std = [ "secp256k1?/std", "thiserror/std", "alloy-trie/std", - "op-alloy-consensus?/std" + "op-alloy-consensus?/std", + "serde_json/std" ] secp256k1 = ["dep:secp256k1"] test-utils = [ diff --git a/crates/primitives/Cargo.toml b/crates/primitives/Cargo.toml index e5907d870..71c7a635a 100644 --- a/crates/primitives/Cargo.toml +++ b/crates/primitives/Cargo.toml @@ -117,7 +117,8 @@ std = [ "secp256k1?/std", "reth-trie-common/std", "op-alloy-consensus?/std", - "op-alloy-rpc-types?/std" + "op-alloy-rpc-types?/std", + "serde_json/std" ] reth-codec = [ "dep:reth-codecs", diff --git a/crates/storage/codecs/Cargo.toml b/crates/storage/codecs/Cargo.toml index ba5873c58..7a17b16da 100644 --- a/crates/storage/codecs/Cargo.toml +++ b/crates/storage/codecs/Cargo.toml @@ -60,7 +60,8 @@ std = [ "alloy-genesis?/std", "alloy-trie?/std", "serde/std", - "op-alloy-consensus?/std" + "op-alloy-consensus?/std", + "serde_json/std" ] alloy = [ "dep:alloy-consensus", diff --git a/crates/trie/common/Cargo.toml b/crates/trie/common/Cargo.toml index a48410ffc..02994c13d 100644 --- a/crates/trie/common/Cargo.toml +++ b/crates/trie/common/Cargo.toml @@ -72,7 +72,8 @@ std = [ "nybbles/std", "reth-primitives-traits/std", "serde?/std", - "serde_with?/std" + "serde_with?/std", + "serde_json/std" ] eip1186 = [ "alloy-rpc-types-eth/serde",