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, doc_auto_cfg))]
10
11pub mod allocator;
12
13/// Helper function to load a secret key from a file.
14pub mod load_secret_key;
15pub use load_secret_key::get_secret_key;
16
17/// Cli parsers functions.
18pub mod parsers;
19pub use parsers::{
20    hash_or_num_value_parser, parse_duration_from_secs, parse_duration_from_secs_or_ms,
21    parse_ether_value, parse_socket_address,
22};
23
24#[cfg(all(unix, any(target_env = "gnu", target_os = "macos")))]
25pub mod sigsegv_handler;
26
27/// Signal handler to extract a backtrace from stack overflow.
28///
29/// This is a no-op because this platform doesn't support our signal handler's requirements.
30#[cfg(not(all(unix, any(target_env = "gnu", target_os = "macos"))))]
31pub mod sigsegv_handler {
32    /// No-op function.
33    pub fn install() {}
34}