Crates.io | flood-tide |
lib.rs | flood-tide |
version | 0.2.11 |
source | src |
created_at | 2020-12-25 06:46:00.260534 |
updated_at | 2024-06-09 08:23:37.889585 |
description | command line flag and option parse utilities |
homepage | |
repository | https://github.com/aki-akaguma/flood-tide |
max_upload_size | |
id | 327094 |
size | 365,456 |
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?
clap - is the most popular and complete one
structopt - clap parser that uses procedural macros
gumdrop - a simple parser that uses procedural macros
argh - procedural macros
rustop - traditional macro
pico-args - a simple use
getopts - a simple use
docopt - a simple use
The comparing performance and .text size.
name |
bench |
.text |
Δ bench |
Δ .text |
---|---|---|---|---|
cmp_null_void | 1.327 kc | 316 kib | 0.000 kc | 0 kib |
cmp_flood_tide | 6.315 kc | 356 kib | 4.988 kc | 40 kib |
cmp_pure_rust | 7.951 kc | 368 kib | 6.624 kc | 52 kib |
cmp_gumdrop | 11.346 kc | 432 kib | 10.019 kc | 116 kib |
cmp_argh | 20.851 kc | 385 kib | 19.524 kc | 69 kib |
cmp_pico_args | 39.187 kc | 393 kib | 37.860 kc | 77 kib |
cmp_rustop | 379.726 kc | 465 kib | 378.399 kc | 149 kib |
cmp_clap | 415.422 kc | 988 kib | 414.095 kc | 671 kib |
cmp_clap3 | 495.219 kc | 840 kib | 493.893 kc | 524 kib |
cmp_structopt | 553.679 kc | 862 kib | 552.352 kc | 546 kib |
cmp_getopts | 637.986 kc | 395 kib | 636.659 kc | 78 kib |
cmp_commander | 665.407 kc | 412 kib | 664.080 kc | 95 kib |
cmp_lapp | 1115.093 kc | 451 kib | 1113.766 kc | 135 kib |
cmp_args | 2101.706 kc | 427 kib | 2100.379 kc | 110 kib |
cmp_app | 2192.245 kc | 630 kib | 2190.918 kc | 313 kib |
name |
bench |
.text |
Δ bench |
Δ .text |
---|---|---|---|---|
cmp_null_void | 1.405 kc | 316 kib | 0.000 kc | 0 kib |
cmp_flood_tide | 5.603 kc | 356 kib | 4.197 kc | 40 kib |
cmp_pure_rust | 7.845 kc | 368 kib | 6.439 kc | 52 kib |
cmp_gumdrop | 8.737 kc | 432 kib | 7.332 kc | 116 kib |
cmp_argh | 23.114 kc | 385 kib | 21.708 kc | 69 kib |
cmp_pico_args | 41.325 kc | 393 kib | 39.920 kc | 77 kib |
cmp_rustop | 394.432 kc | 465 kib | 393.026 kc | 149 kib |
cmp_clap | 426.678 kc | 988 kib | 425.273 kc | 671 kib |
cmp_clap3 | 495.857 kc | 840 kib | 494.452 kc | 524 kib |
cmp_structopt | 576.224 kc | 862 kib | 574.818 kc | 546 kib |
cmp_getopts | 657.353 kc | 395 kib | 655.948 kc | 78 kib |
cmp_commander | 673.761 kc | 412 kib | 672.356 kc | 95 kib |
cmp_lapp | 1089.452 kc | 451 kib | 1088.047 kc | 135 kib |
cmp_args | 2066.320 kc | 427 kib | 2064.915 kc | 110 kib |
cmp_app | 2171.903 kc | 630 kib | 2170.498 kc | 313 kib |
us
is micro seconds.text
is elf .text section sizeΔ
(delta) is the difference from cmp_null_voidcmp_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.