medusa
General template for building command line interface (CLI) using (and written in) Rust
How to use
- Add crates dependencies in your
Cargo.toml
...
[]
= "0.1.0"
...
- Import the library
...
use ;
...
- Create example function as your CLI option handler
...
...
- Create your handler using HashMap
...
use HashMap;
let mut handlers: = new;
handlers.insert;
handlers.insert;
...
- Register your handler into CLI command
...
use env;
let mut command: CommandLine = new;
command.set_handler;
command.run;
...
- Test your Rust code if it's really works
- Compile your code