mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 10:59:55 +00:00
chore: no_std for reth-execution-types (#14465)
This commit is contained in:
@ -23,4 +23,11 @@ strum = { workspace = true, features = ["derive"] }
|
||||
reth-nippy-jar.workspace = true
|
||||
|
||||
[features]
|
||||
default = ["std"]
|
||||
std = [
|
||||
"alloy-primitives/std",
|
||||
"derive_more/std",
|
||||
"serde/std",
|
||||
"strum/std",
|
||||
]
|
||||
clap = ["dep:clap"]
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
use crate::StaticFileTargets;
|
||||
use std::time::Duration;
|
||||
use core::time::Duration;
|
||||
|
||||
/// An event emitted by the static file producer.
|
||||
#[derive(Debug, PartialEq, Eq, Clone)]
|
||||
|
||||
@ -7,6 +7,9 @@
|
||||
)]
|
||||
#![cfg_attr(not(test), warn(unused_crate_dependencies))]
|
||||
#![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))]
|
||||
#![cfg_attr(not(feature = "std"), no_std)]
|
||||
|
||||
extern crate alloc;
|
||||
|
||||
mod compression;
|
||||
mod event;
|
||||
@ -14,9 +17,9 @@ mod segment;
|
||||
|
||||
use alloy_primitives::BlockNumber;
|
||||
pub use compression::Compression;
|
||||
use core::ops::RangeInclusive;
|
||||
pub use event::StaticFileProducerEvent;
|
||||
pub use segment::{SegmentConfig, SegmentHeader, SegmentRangeInclusive, StaticFileSegment};
|
||||
use std::ops::RangeInclusive;
|
||||
|
||||
/// Default static file block count.
|
||||
pub const DEFAULT_BLOCKS_PER_STATIC_FILE: u64 = 500_000;
|
||||
|
||||
@ -1,8 +1,12 @@
|
||||
use crate::{BlockNumber, Compression};
|
||||
use alloc::{
|
||||
format,
|
||||
string::{String, ToString},
|
||||
};
|
||||
use alloy_primitives::TxNumber;
|
||||
use core::{ops::RangeInclusive, str::FromStr};
|
||||
use derive_more::Display;
|
||||
use serde::{Deserialize, Serialize};
|
||||
use std::{ops::RangeInclusive, str::FromStr};
|
||||
use strum::{AsRefStr, EnumString};
|
||||
|
||||
#[derive(
|
||||
@ -338,8 +342,8 @@ impl SegmentRangeInclusive {
|
||||
}
|
||||
}
|
||||
|
||||
impl std::fmt::Display for SegmentRangeInclusive {
|
||||
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
||||
impl core::fmt::Display for SegmentRangeInclusive {
|
||||
fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
|
||||
write!(f, "{}..={}", self.start, self.end)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user