thunder
thunder copied to clipboard
⚡ Zero-boilerplate commandline argument parsing in Rust
Hi, check this code out: ``` use thunder::thunderclap; struct MyApp; #[thunderclap] impl MyApp { fn hello(name: &str) -> Result { println!("Hello {}", name); } } fn main() { MyApp::hello("kat"); }...
Consider this simple snippet: ```rust use thunder; use clap; use thunder::thunderclap; struct MyApp; #[thunderclap(param: String: "A global var")] impl MyApp { /// Scan a directory fn scan(source_dir: String) { println!("param={}",...
The [Loki example](https://github.com/rust-clique/thunder/blob/master/examples/loki.rs) does not compile. ``` $ cargo run help Compiling test-thunder v0.1.0 (/home/xxx/tmp/test-thunder) error: custom attribute panicked --> src/main.rs:9:1 | 9 | #[thunderclap(example: Option: "Error, here", another_example: String:...
Hello! After talking about thunder with @spacekookie, she told me about a effort to rewrite thunder to have a better usability and code. Thinking about that, I thought about proposing...
For example, it's not clear how to run app with more than one parameter: ```rust /// App #[thunderclap] impl App { /// run fn run(token: &'a str, listening_address: &'b str)...
> `#[thunderclap(drunk: bool: "Thor drinks a lot", hammers: Option: "This isn't a joke about being drunk")]` > > hmmmm > > `#[thunderclap(drunk: bool = "Thor drinks a lot", hammers: Option...
When i didn't provide a valid boolean, i got a not so nice error message: ``` thor bla aged thread 'main' panicked at 'Failed to parse value. Double check!: ParseBoolError...
It could enable more features and make the code base easier to work with and contribute to