medusa
General template for building command line interface (CLI) using (and written in) Rust
Running the example
- Run the example without arguments
- Run the example with arguments
How to use
- Add crates dependencies in your
Cargo.toml
...
[]
= "0.2.1"
...
- Import the library
...
use ;
...
- Create example function as your CLI option handler
...
...
- Create your handler and add some actions
...
let mut handler: Handler = new;
handler.add;
handler.add;
...
- 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