mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 10:59:55 +00:00
chore: make reth-ethereum-evm compile with no-std (#8935)
This commit is contained in:
@ -33,3 +33,6 @@ reth-revm = { workspace = true, features = ["test-utils"] }
|
|||||||
secp256k1.workspace = true
|
secp256k1.workspace = true
|
||||||
serde_json.workspace = true
|
serde_json.workspace = true
|
||||||
|
|
||||||
|
[features]
|
||||||
|
default = ["std"]
|
||||||
|
std = []
|
||||||
@ -6,6 +6,9 @@ use reth_evm::execute::BlockValidationError;
|
|||||||
use reth_primitives::{Receipt, Request};
|
use reth_primitives::{Receipt, Request};
|
||||||
use revm_primitives::Log;
|
use revm_primitives::Log;
|
||||||
|
|
||||||
|
#[cfg(not(feature = "std"))]
|
||||||
|
use alloc::{string::ToString, vec::Vec};
|
||||||
|
|
||||||
sol! {
|
sol! {
|
||||||
#[allow(missing_docs)]
|
#[allow(missing_docs)]
|
||||||
event DepositEvent(
|
event DepositEvent(
|
||||||
|
|||||||
@ -31,6 +31,11 @@ use revm_primitives::{
|
|||||||
db::{Database, DatabaseCommit},
|
db::{Database, DatabaseCommit},
|
||||||
BlockEnv, CfgEnvWithHandlerCfg, EnvWithHandlerCfg, ResultAndState,
|
BlockEnv, CfgEnvWithHandlerCfg, EnvWithHandlerCfg, ResultAndState,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#[cfg(not(feature = "std"))]
|
||||||
|
use alloc::{sync::Arc, vec, vec::Vec};
|
||||||
|
|
||||||
|
#[cfg(feature = "std")]
|
||||||
use std::sync::Arc;
|
use std::sync::Arc;
|
||||||
|
|
||||||
/// Provides executors to execute regular ethereum blocks
|
/// Provides executors to execute regular ethereum blocks
|
||||||
|
|||||||
@ -7,6 +7,10 @@
|
|||||||
)]
|
)]
|
||||||
#![cfg_attr(not(test), warn(unused_crate_dependencies))]
|
#![cfg_attr(not(test), warn(unused_crate_dependencies))]
|
||||||
#![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))]
|
#![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))]
|
||||||
|
#![cfg_attr(not(feature = "std"), no_std)]
|
||||||
|
|
||||||
|
#[cfg(not(feature = "std"))]
|
||||||
|
extern crate alloc;
|
||||||
|
|
||||||
use reth_chainspec::ChainSpec;
|
use reth_chainspec::ChainSpec;
|
||||||
use reth_evm::{ConfigureEvm, ConfigureEvmEnv};
|
use reth_evm::{ConfigureEvm, ConfigureEvmEnv};
|
||||||
|
|||||||
Reference in New Issue
Block a user