no-pico-args
no_std compatible version of pico-args.
This is a fork of the popular pico-args crate
by RazrFalcon, with the goal of making it
no_std compatible. All the types (mainly OsString and OsStr) have been converted to String and &str
respectively, to make it no_std compatible. You will still need the alloc crate though.
One limitation this adds, is that it only supports UTF8 arguments.
See pico-args for more information about the actual crate.
Build features
-
stdEnables use of
std-related functions. Disabling this will make the libraryno_stdcompatible. -
eq-separatorAllows parsing arguments separated by
=This feature adds about 1KiB to the resulting binary -
short-space-optMakes the space between short keys and their values optional (e.g.
-w10) Ifeq-separatoris enabled, then it takes precedence and the '=' is not included. Ifeq-separatoris disabled, then-K=valuegives an error instead of returning"=value". The optional space is only applicable for short keys because--keyvaluewould be ambiguous -
combined-flagsAllows combination of flags, e.g.
-abcinstead of-a -b -cIfshort-space-optoreq-separatorare enabled, you must parse flags after values, to prevent ambiguities
Attribution
This crate is a fork of pico-args
by RazrFalcon and does not really add any value to the original code, other than making
it no_std compatible. The entire logic is taken from the original crate, with only minor changes.
License
MIT