bevy_clap

Crates.iobevy_clap
lib.rsbevy_clap
version0.1.0
sourcesrc
created_at2022-02-08 00:13:03.005849
updated_at2022-02-08 00:13:03.005849
descriptionA bevy plugin to parse CLI arguments with clap
homepage
repositoryhttps://github.com/Diggsey/bevy_clap
max_upload_size
id528734
size5,160
Diggory Blake (Diggsey)

documentation

README

bevy_clap

A bevy plugin to parse command line arguments with clap.

Usage

#[derive(clap::Parser)]
#[clap(name = "demo")]
struct Context {
   /// More verbose output
   #[clap(long)]
   verbose: bool,
   /// An optional name
   #[clap(short, long)]
   name: Option<String>,
}

fn main() {
    App::new()
        // ...
        .add_plugin(ClapPlugin::<Context>::default())
        // ...
        .run();
}

The Context value will be added as a clap resource on startup.

Commit count: 2

cargo fmt