1use clap::{Parser, Subcommand};
2
3pub const DEFAULT_PERSISTENCE_THRESHOLD: u64 = 2;
5
6pub const DEFAULT_MEMORY_BLOCK_BUFFER_TARGET: u64 = 2;
8
9#[derive(Debug, Subcommand)]
10pub enum Command {
11 Node(KabuArgsNode),
12 Remote(KabuArgs),
13}
14
15#[derive(Parser, Debug)]
16#[command(name="Kabu", version, about, long_about = None)]
17pub struct AppArgs {
18 #[command(subcommand)]
19 pub command: Command,
20}
21
22#[derive(Parser, Debug)]
23pub struct KabuArgsNode {}
24
25#[derive(Parser, Debug)]
26pub struct KabuArgs {
27 #[arg(long, default_value = "config.toml")]
28 pub kabu_config: String,
29
30 #[arg(long = "engine.persistence-threshold", default_value_t = DEFAULT_PERSISTENCE_THRESHOLD)]
33 pub persistence_threshold: u64,
34
35 #[arg(long = "engine.memory-block-buffer-target", default_value_t = DEFAULT_MEMORY_BLOCK_BUFFER_TARGET)]
37 pub memory_block_buffer_target: u64,
38}