initial commit

This commit is contained in:
yggverse 2025-09-08 13:55:50 +03:00
parent fc65ac65d5
commit 1f2eb60318
8 changed files with 442 additions and 0 deletions

30
src/argument.rs Normal file
View file

@ -0,0 +1,30 @@
use clap::Parser;
use std::path::PathBuf;
#[derive(Parser, Debug)]
#[command(version, about, long_about = None)]
pub struct Argument {
/// Bind server `host:port` to listen incoming connections on it
#[arg(short, long, default_value_t = String::from("127.0.0.1:1965"))]
pub bind: String,
/// Filepath to server identity in PKCS (PFX) format
#[arg(short, long)]
pub identity: PathBuf,
/// Passphrase to unlock encrypted identity
#[arg(short, long, default_value_t = String::new())]
pub password: String,
/// btracker-fs directory
#[arg(short, long)]
pub storage: PathBuf,
/// Listing items limit
#[arg(short, long, default_value_t = 20)]
pub limit: usize,
/// Default index capacity
#[arg(short, long, default_value_t = 1000)]
pub capacity: usize,
}