mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-12 08:51:09 +00:00
Improve Client CLI help readability (#2073)
Currently the CLI `-h/--help` commad output is almost unreadable as (for some commands) it: - doesn't provide a short brief of what the command does. - doesn't separate the options description in smaller paragraphs. - doesn't use a smart wrap strategy for lines longer than the number of columns in the terminal. Follow some pics taken with a 100 cols wide term ## Short help (./node -h) ### Before  ### After  ## Long help (./node --help) ### Before  ### After  --------- Co-authored-by: command-bot <>
This commit is contained in:
@@ -48,6 +48,7 @@ pub struct ImportParams {
|
||||
pub wasm_method: WasmExecutionMethod,
|
||||
|
||||
/// The WASM instantiation method to use.
|
||||
///
|
||||
/// Only has an effect when `wasm-execution` is set to `compiled`.
|
||||
/// The copy-on-write strategies are only supported on Linux.
|
||||
/// If the copy-on-write variant of a strategy is unsupported
|
||||
@@ -65,6 +66,7 @@ pub struct ImportParams {
|
||||
pub wasmtime_instantiation_strategy: WasmtimeInstantiationStrategy,
|
||||
|
||||
/// Specify the path where local WASM runtimes are stored.
|
||||
///
|
||||
/// These runtimes will override on-chain runtimes when the version matches.
|
||||
#[arg(long, value_name = "PATH")]
|
||||
pub wasm_runtime_overrides: Option<PathBuf>,
|
||||
@@ -74,12 +76,12 @@ pub struct ImportParams {
|
||||
pub execution_strategies: ExecutionStrategiesParams,
|
||||
|
||||
/// Specify the state cache size.
|
||||
///
|
||||
/// Providing `0` will disable the cache.
|
||||
#[arg(long, value_name = "Bytes", default_value_t = 67108864)]
|
||||
pub trie_cache_size: usize,
|
||||
|
||||
/// DEPRECATED
|
||||
/// Switch to `--trie-cache-size`.
|
||||
/// DEPRECATED: switch to `--trie-cache-size`.
|
||||
#[arg(long)]
|
||||
state_cache_size: Option<usize>,
|
||||
}
|
||||
@@ -115,26 +117,23 @@ impl ImportParams {
|
||||
/// Execution strategies parameters.
|
||||
#[derive(Debug, Clone, Args)]
|
||||
pub struct ExecutionStrategiesParams {
|
||||
/// The means of execution used when calling into the runtime for importing blocks as
|
||||
/// part of an initial sync.
|
||||
/// Runtime execution strategy for importing blocks during initial sync.
|
||||
#[arg(long, value_name = "STRATEGY", value_enum, ignore_case = true)]
|
||||
pub execution_syncing: Option<ExecutionStrategy>,
|
||||
|
||||
/// The means of execution used when calling into the runtime for general block import
|
||||
/// (including locally authored blocks).
|
||||
/// Runtime execution strategy for general block import (including locally authored blocks).
|
||||
#[arg(long, value_name = "STRATEGY", value_enum, ignore_case = true)]
|
||||
pub execution_import_block: Option<ExecutionStrategy>,
|
||||
|
||||
/// The means of execution used when calling into the runtime while constructing blocks.
|
||||
/// Runtime execution strategy for constructing blocks.
|
||||
#[arg(long, value_name = "STRATEGY", value_enum, ignore_case = true)]
|
||||
pub execution_block_construction: Option<ExecutionStrategy>,
|
||||
|
||||
/// The means of execution used when calling into the runtime while using an off-chain worker.
|
||||
/// Runtime execution strategy for offchain workers.
|
||||
#[arg(long, value_name = "STRATEGY", value_enum, ignore_case = true)]
|
||||
pub execution_offchain_worker: Option<ExecutionStrategy>,
|
||||
|
||||
/// The means of execution used when calling into the runtime while not syncing, importing or
|
||||
/// constructing blocks.
|
||||
/// Runtime execution strategy when not syncing, importing or constructing blocks.
|
||||
#[arg(long, value_name = "STRATEGY", value_enum, ignore_case = true)]
|
||||
pub execution_other: Option<ExecutionStrategy>,
|
||||
|
||||
|
||||
Reference in New Issue
Block a user