Fire Hpp Versions Save

A C++ library that uses clever tricks to create super low-code, yet fully functional CLIs

v0.2

3 years ago

v0.2 is mostly a matured version of v0.1, in a sense that not many new features were added, however existing features were improved. In summary, a lot of breaking changes and a lot of internal structural changes. The rationale is to make most of the breaking changes early in development, so that new features can be added to a "more final" version of the library.

Release notes

Breaking changes:

  • Include fire as <fire-hpp/fire.hpp> not <fire.hpp>.
  • Hyphens are also written when specifying argument names. So instead of fire::arg("x") and fire::arg("long-name") you write fire::arg("-x") and fire::arg("--long-name").
  • Name/position and description are now both the first argument. Eg. now it's fire::arg({name, description}, default value) instead of fire::arg(name, description, default value).
  • Variadic arguments are now specified as fire::arg(fire::variadic()) instead of fire::arg::vector().
  • No more FIRE_NO_SPACE_ASSIGNMENT(...).

New library features:

  • FIRE(...) now works with positional/variadic argument, previously needed FIRE_NO_SPACE_ASSIGNMENT(...). This was a HUGE change internally, had to implement a totally new argument introspection algorithm.
  • fire.hpp now compiles without exception support, but you need to use FIRE_NO_EXCEPTIONS(...) instead of FIRE(...), which has limitations.
  • Program descriptions.
  • Positional arguments can be supplied with custom names.

Improvements:

  • In program -- --some-text --some-text is interpreted as positional, per convention.
  • Much cleaner help messages. Clarified a few error messages too.
  • Accept arguments in a manner similar to make -j8 <=> make -j 8 if unambiguous.
  • Misc bug fixes.

Integration

v0.1

3 years ago

Features:

  • Flags, named, positional, vector parameters
  • Optional parameters, default values
  • Conversions to arithmetic types
  • Parameter descriptions
  • All of this using just function signatures