Crates.io | thunder |
lib.rs | thunder |
version | 0.3.1 |
source | src |
created_at | 2018-03-29 15:52:41.381508 |
updated_at | 2018-05-16 22:30:35.952564 |
description | Create simple commandline apps with *zero* boilerplate! |
homepage | |
repository | https://github.com/spacekookie/thunder |
max_upload_size | |
id | 58085 |
size | 22,334 |
Write simple commandline applications in Rust with zero boilerplate. Bind Rust functions to CLI functions and options with macros. This crate uses clap.rs for the actual argument parsing.
// ... ignore the imports for now ...
struct MyApp;
/// Describe your application with style ✨
#[thunderclap]
impl MyApp {
/// Say hello to someone
fn hello(name: &str) {
println!("Hello {}", name);
}
}
fn main() {
MyApp::start();
}
This prints
USAGE:
MyApp [SUBCOMMAND]
FLAGS:
-h, --help Prints help information
-V, --version Prints version information
SUBCOMMANDS:
hello Say hello to someone
help Prints this message or the help of the given subcommand(s)
Check the documentation for more examples.