Command line flag and option parse utilities.
no_std
and std
are supported.-a
)--long
)-abc
::= -a
-b
-c
)-long
)--abbr
::= --abbreviate
)no_std
/a
)in examples directory.
This parser is not a new special idea. It's just comparing characters one by one. Is there anything simpler than this?
The comparing performance and .text size.
| name
| bench
| .text
| Δ bench
| Δ .text
|
|:-------------------|------------:|---------:|------------:|---------:|
| cmpnullvoid | 1.213 kc | 342 kib | 0.000 kc | 0 kib |
| cmpfloodtide | 5.439 kc | 386 kib | 4.226 kc | 43 kib |
| cmpgumdrop | 10.686 kc | 456 kib | 9.473 kc | 114 kib |
| cmppurerust | 11.052 kc | 390 kib | 9.839 kc | 47 kib |
| cmpargh | 23.644 kc | 429 kib | 22.431 kc | 86 kib |
| cmppicoargs | 152.401 kc | 457 kib | 151.188 kc | 114 kib |
| cmprustop | 429.309 kc | 497 kib | 428.096 kc | 155 kib |
| cmpclap | 488.611 kc | 925 kib | 487.399 kc | 583 kib |
| cmpgetopts | 695.832 kc | 428 kib | 694.620 kc | 85 kib |
| cmpstructopt | 697.229 kc | 1083 kib | 696.016 kc | 741 kib |
| cmpcommander | 712.974 kc | 437 kib | 711.762 kc | 94 kib |
| cmplapp | 1113.328 kc | 476 kib | 1112.115 kc | 133 kib |
| cmpargs | 2017.061 kc | 489 kib | 2015.848 kc | 146 kib |
| cmpapp | 2348.416 kc | 720 kib | 2347.203 kc | 377 kib |
us
is micro seconds.text
is elf .text section sizeΔ
(delta) is the difference from cmpnullvoidcmp_null_void
is non parser, support only --help
and --version
cmp_pure_rust
is newly written with sting matchThis project is licensed under either of
at your option.