feat: no_std for reth-evm (#14561)

This commit is contained in:
Arsenii Kulikov
2025-02-18 16:54:56 +04:00
committed by GitHub
parent 67a98860e2
commit 29f4ca2a61
14 changed files with 20 additions and 12 deletions

View File

@@ -18,7 +18,7 @@ reth-consensus.workspace = true
reth-db.workspace = true
reth-engine-primitives.workspace = true
reth-errors.workspace = true
reth-evm.workspace = true
reth-evm = { workspace = true, features = ["metrics"] }
reth-network-p2p.workspace = true
reth-payload-builder.workspace = true
reth-payload-primitives.workspace = true

View File

@@ -57,4 +57,5 @@ std = [
"reth-chainspec/std",
"alloy-evm/std",
"reth-execution-types/std",
"reth-evm/std",
]

View File

@@ -49,6 +49,7 @@ std = [
"reth-consensus-common?/std",
"alloy-rpc-types-eth?/std",
"reth-storage-api?/std",
"reth-evm?/std",
]
arbitrary = [
"std",

View File

@@ -47,8 +47,6 @@ metrics-util = { workspace = true, features = ["debugging"] }
[features]
default = ["std"]
std = [
"dep:metrics",
"dep:reth-metrics",
"reth-consensus/std",
"reth-primitives/std",
"reth-primitives-traits/std",
@@ -66,6 +64,12 @@ std = [
"reth-execution-errors/std",
"reth-execution-types/std",
"reth-storage-errors/std",
"futures-util/std",
]
metrics = [
"std",
"dep:metrics",
"dep:reth-metrics",
]
test-utils = [
"dep:parking_lot",

View File

@@ -36,7 +36,7 @@ pub mod execute;
mod aliases;
pub use aliases::*;
#[cfg(feature = "std")]
#[cfg(feature = "metrics")]
pub mod metrics;
pub mod noop;
pub mod state_change;

View File

@@ -8,13 +8,13 @@ use crate::{
system_calls::OnStateHook,
Database,
};
use alloc::{sync::Arc, vec::Vec};
use alloy_eips::eip7685::Requests;
use parking_lot::Mutex;
use reth_execution_errors::BlockExecutionError;
use reth_execution_types::{BlockExecutionResult, ExecutionOutcome};
use reth_primitives::{EthPrimitives, NodePrimitives, RecoveredBlock};
use revm_database::State;
use std::sync::Arc;
/// A [`BlockExecutorProvider`] that returns mocked execution results.
#[derive(Clone, Debug, Default)]

View File

@@ -82,4 +82,5 @@ std = [
"alloy-op-evm/std",
"revm-database/std",
"revm-optimism/std",
"reth-evm/std",
]

View File

@@ -48,6 +48,7 @@ std = [
"reth-optimism-primitives/std",
"reth-primitives-traits/std",
"reth-storage-api?/std",
"reth-evm?/std",
]
arbitrary = [
"std",

View File

@@ -20,7 +20,7 @@ reth-consensus.workspace = true
reth-db.workspace = true
reth-db-api.workspace = true
reth-etl.workspace = true
reth-evm.workspace = true
reth-evm = { workspace = true, features = ["metrics"] }
reth-exex.workspace = true
reth-fs-util.workspace = true
reth-network-p2p.workspace = true

View File

@@ -15,7 +15,7 @@ workspace = true
# async
tokio = { workspace = true, features = ["sync", "rt"] }
tracing-futures.workspace = true
futures-util.workspace = true
futures-util = { workspace = true, features = ["std"] }
# metrics
reth-metrics.workspace = true