reth_cli_util/
lib.rs

1//! This crate defines a set of commonly used cli utils.
2
3#![doc(
4    html_logo_url = "https://raw.githubusercontent.com/paradigmxyz/reth/main/assets/reth-docs.png",
5    html_favicon_url = "https://avatars0.githubusercontent.com/u/97369466?s=256",
6    issue_tracker_base_url = "https://github.com/paradigmxyz/reth/issues/"
7)]
8#![cfg_attr(not(test), warn(unused_crate_dependencies))]
9#![cfg_attr(docsrs, feature(doc_cfg))]
10
11pub mod allocator;
12pub mod cancellation;
13
14/// Helper function to load a secret key from a file.
15pub mod load_secret_key;
16pub use load_secret_key::{get_secret_key, parse_secret_key_from_hex};
17
18/// Cli parsers functions.
19pub mod parsers;
20pub use parsers::{
21    hash_or_num_value_parser, parse_duration_from_secs, parse_duration_from_secs_or_ms,
22    parse_ether_value, parse_socket_address,
23};
24
25#[cfg(all(unix, any(target_env = "gnu", target_os = "macos")))]
26pub mod sigsegv_handler;
27
28/// Signal handler to extract a backtrace from stack overflow.
29///
30/// This is a no-op because this platform doesn't support our signal handler's requirements.
31#[cfg(not(all(unix, any(target_env = "gnu", target_os = "macos"))))]
32pub mod sigsegv_handler {
33    /// No-op function.
34    pub fn install() {}
35}