7 releases

0.3.1 Dec 30, 2023
0.3.0 Dec 29, 2023
0.2.2 Dec 29, 2023
0.1.3 Dec 28, 2023
0.0.1 Dec 28, 2023

#17 in #args

Download history 9/week @ 2023-12-22 22/week @ 2023-12-29 114/week @ 2024-03-01 15/week @ 2024-03-08 13/week @ 2024-03-15 39/week @ 2024-03-29

70 downloads per month

MIT license

23KB
520 lines

rs-args

Static Badge


Overview

A simple, easy to use command argument parser for Rust.

Installation

  1. Initialise a cargo project ( you can skip this if you already have one )
cargo init
Createdbinary (application) package
  1. Add rs-args as a dependency
rs-args = "<latest version>"

Usage

Now that you installed rs-args in your cargo project, you have access to the rs_args module. This allows you to automatically parse arguments.

You can call

let args = rs_args::parse_arguments();

to retrieve the program arguments and parse them automaticaly, or you can call

rs_args::get_named(...) 
// or
rs_args::get_positional(...)
// etc.

to directly retrieve the argument values.

Dependencies

~310–760KB
~18K SLoC