appentry
English | 简体中文
A minimalist command-line argument parsing library
Document
Hello World:
/*
$ myapp --help
Usage: target\debug\appentry.exe [Options]
Options:
-x, --x <i32>
-y, --y <i32>
$ myapp -x 1 -y 2
3
*/
Multiple methods and docs:
/// Print the application version
///
/// # Arguments
///
/// This function takes no arguments
/// Add two numbers
///
/// # Arguments
///
/// * `x` - The first number to add
/// * `y` -
/*
$ myapp --help
Desc: Add two numbers
Usage: target\debug\appentry.exe -p/--plus [Options]
Options:
-x, --x <i32> The first number to add
-y, --y <i32>
Desc: Print the application version
Usage: target\debug\appentry.exe -v/--version
$ myapp --version
myapp 0.1.0
*/