Aren’t there plenty of existing option-parsing libraries already? Yes, there are, but none of the ones that I had seen had the ease of use I wanted. The primary design goal for dropt is to have minimal barriers to entry. Specifically, this includes:

Secondary goals include being secure, performant, maintainable, and extensible; minimizing memory usage; and gracefully failing if memory is exhausted.


dropt provides basic option-parsing features:

The implementation is intended to be minimalistic. What dropt does not do:


There’s no formal documentation yet, but for now, see dropt_example.c or droptxx_example.cpp.


Version History