mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 10:59:55 +00:00
chore: no_std in reth-codec (#9587)
This commit is contained in:
@ -390,7 +390,7 @@ alloy-primitives = "0.7.2"
|
||||
alloy-dyn-abi = "0.7.2"
|
||||
alloy-sol-types = "0.7.2"
|
||||
alloy-rlp = "0.3.4"
|
||||
alloy-trie = "0.4"
|
||||
alloy-trie = { version = "0.4", default-features = false }
|
||||
alloy-rpc-types = { version = "0.2", default-features = false, features = [
|
||||
"eth",
|
||||
] }
|
||||
|
||||
@ -19,12 +19,12 @@ alloy-consensus = { workspace = true, optional = true }
|
||||
alloy-eips = { workspace = true, optional = true }
|
||||
alloy-genesis = { workspace = true, optional = true }
|
||||
alloy-primitives.workspace = true
|
||||
alloy-trie.workspace = true
|
||||
alloy-trie = { workspace = true, optional = true }
|
||||
|
||||
# misc
|
||||
bytes.workspace = true
|
||||
modular-bitfield = { workspace = true, optional = true }
|
||||
serde.workspace = true
|
||||
serde = { workspace = true, optional = true }
|
||||
|
||||
[dev-dependencies]
|
||||
alloy-eips = { workspace = true, default-features = false, features = [
|
||||
@ -43,10 +43,11 @@ proptest-arbitrary-interop.workspace = true
|
||||
|
||||
[features]
|
||||
default = ["std", "alloy"]
|
||||
std = ["alloy-primitives/std", "bytes/std"]
|
||||
std = ["alloy-primitives/std", "bytes/std", "serde/std"]
|
||||
alloy = [
|
||||
"dep:alloy-consensus",
|
||||
"dep:alloy-eips",
|
||||
"dep:alloy-genesis",
|
||||
"dep:modular-bitfield",
|
||||
"dep:alloy-trie",
|
||||
]
|
||||
|
||||
@ -22,6 +22,11 @@ pub use reth_codecs_derive::*;
|
||||
use alloy_primitives::{Address, Bloom, Bytes, FixedBytes, U256};
|
||||
use bytes::Buf;
|
||||
|
||||
#[cfg(not(feature = "std"))]
|
||||
extern crate alloc;
|
||||
#[cfg(not(feature = "std"))]
|
||||
use alloc::vec::Vec;
|
||||
|
||||
#[cfg(any(test, feature = "alloy"))]
|
||||
mod alloy;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user