Techcable/zig-plain-argparse
[WIP] An lightweight argument parser for Zig. Uses imperative (rather than declarative) parsing.
[WIP] A "plain" argument parsing library for Zig.
The key feature is that it parses arguments imperatively (not declaratively).
This makes it lower-level than zig-clap, which is more declarative (and probably better for general use).
Hopefully this more imperitive design reduce the amount of compile time magic . :)
I couldn't understand zig-clap well enough to implement "proper" subcommands.
In this more imperative style of parsing, subcommands are not a problem because they are just positional values.
You can parse a subcommand as a Zig enum, then create a new parser for the remaining arguments.
Also another plus side is zero allocation ;)
Parser
is a thin wrapper around [][]const u8
)