Add CLI argument documentation

This commit is contained in:
Michael Bradley 2025-05-24 14:18:55 -04:00
parent aa07b193b6
commit 5047931d17
Signed by: MichaelBradley
SSH key fingerprint: SHA256:o/aaeYtRubILK7OYYjYP12DmU7BsPUhKji1AgaQ+ge4

View file

@ -19,15 +19,19 @@ pub struct AppSettings {
#[command(flatten)] #[command(flatten)]
source: Source, source: Source,
/// The port the app should listen for connections on
#[arg(short, long, default_value = "25565")] #[arg(short, long, default_value = "25565")]
port: u16, port: u16,
} }
/// The source for the world configuration, either an existing world from a peer, a specific seed, or none (which implies a random seed)
#[derive(Args)] #[derive(Args)]
#[group(required = false, multiple = false)] #[group(required = false, multiple = false)]
struct Source { struct Source {
/// Passing the same seed will always generate the same world
#[arg(short, long)] #[arg(short, long)]
seed: Option<Seed>, seed: Option<Seed>,
/// <ip>:<port> to a peer's world
#[arg(short, long)] #[arg(short, long)]
connect: Option<SocketAddr>, connect: Option<SocketAddr>,
} }