personal_website/src/cli.rs

21 lines
472 B
Rust
Raw Normal View History

2024-03-23 20:28:03 +00:00
use clap::Parser;
#[derive(Debug, Clone, Parser)]
#[command(version, about, long_about = None)]
pub struct CliArgs {
/// Port to bind to
#[arg(short, long)]
pub port: Option<u16>,
2024-03-23 20:28:03 +00:00
/// Host ip to bind to, usually not required to change
#[arg(long)]
pub host: Option<String>,
2024-03-23 20:28:03 +00:00
/// Extra debugging output
#[arg(long, short)]
pub debug: bool,
#[arg(long, short, default_value="./config.toml")]
pub config: camino::Utf8PathBuf,
2024-03-23 20:28:03 +00:00
}