1 unstable release
0.1.0 | Feb 8, 2022 |
---|
#1322 in Game dev
53 downloads per month
4KB
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.
lib.rs
:
bevy_clap
Dependencies
~19–35MB
~589K SLoC