#getopt #macro #define #concisely #no-std

no-std getopts-macro

Using macros to concisely define the getopts

2 releases

new 0.1.1 Mar 15, 2025
0.1.0 Mar 15, 2025

#1373 in Rust patterns

Download history 93/week @ 2025-03-10

93 downloads per month

MIT license

10KB
150 lines

Using macros to concisely define the getopts

use getopts_macro::getopts_options;

let _options = getopts_options! {
    -z --zero           "...";
    -v --verbose*       "...";
    -T --threads=NUM    "...";
    -i --ignore*=FILE   "...";
    -h --help*          "...";
    -V --version*       "...";
};

Dependencies

~1.5MB
~21K SLoC