mirror of
https://github.com/paradigmxyz/reth.git
synced 2026-02-19 03:04:27 -05:00
fix(storage-api): gate reth-chain dependency behind std feature
The reth-chain crate is inherently std-only (uses BTreeMap, Arc, etc.) and was breaking the riscv32imac no_std builds by pulling in serde_core which doesn't support no_std properly. This makes reth-chain optional and only enables it when std feature is active, gating the block_writer module that uses Chain behind std.
This commit is contained in:
@@ -13,7 +13,7 @@ workspace = true
|
||||
|
||||
[dependencies]
|
||||
# reth
|
||||
reth-chain.workspace = true
|
||||
reth-chain = { workspace = true, optional = true }
|
||||
reth-db-models.workspace = true
|
||||
reth-chainspec.workspace = true
|
||||
reth-db-api = { workspace = true, optional = true }
|
||||
@@ -38,6 +38,7 @@ serde_json = { workspace = true, optional = true }
|
||||
[features]
|
||||
default = ["std"]
|
||||
std = [
|
||||
"dep:reth-chain",
|
||||
"reth-chainspec/std",
|
||||
"alloy-consensus/std",
|
||||
"alloy-eips/std",
|
||||
@@ -61,7 +62,7 @@ db-api = [
|
||||
]
|
||||
|
||||
serde = [
|
||||
"reth-chain/serde",
|
||||
"reth-chain?/serde",
|
||||
"reth-ethereum-primitives/serde",
|
||||
"reth-db-models/serde",
|
||||
"reth-execution-types/serde",
|
||||
@@ -80,7 +81,7 @@ serde-bincode-compat = [
|
||||
"reth-execution-types/serde-bincode-compat",
|
||||
"reth-primitives-traits/serde-bincode-compat",
|
||||
"reth-trie-common/serde-bincode-compat",
|
||||
"reth-chain/serde-bincode-compat",
|
||||
"reth-chain?/serde-bincode-compat",
|
||||
"reth-ethereum-primitives/serde-bincode-compat",
|
||||
"alloy-eips/serde-bincode-compat",
|
||||
"alloy-consensus/serde-bincode-compat",
|
||||
|
||||
@@ -85,7 +85,9 @@ pub use primitives::*;
|
||||
mod block_indices;
|
||||
pub use block_indices::*;
|
||||
|
||||
#[cfg(feature = "std")]
|
||||
mod block_writer;
|
||||
#[cfg(feature = "std")]
|
||||
pub use block_writer::*;
|
||||
|
||||
mod state_writer;
|
||||
|
||||
Reference in New Issue
Block a user