Currently, our codebase relies on boost::program_options for parameter parsing. While powerful, Boost is a massive dependency that bloats our build times, complicates our CI/CD pipelines, and feels unnecessarily heavy since we only need to parse INI-format configuration files.
I propose replacing boost::program_options with ini-cpp (specifically the C++17 wrapper: SSARCandy/ini-cpp). It provides a modern, header-only implementation that perfectly meets our strict requirements:
- Native support for default values.
- Native support for extracting vectors (
GetVector<T>).
- Built-in capabilities to dump/write the configuration back to a file.
Pros of switching to ini-cpp:
- Faster Compile Times:
ini-cpp is a lightweight, header-only library. It removes the need to build and link against compiled Boost libraries.
- Cleaner Syntax: It leverages modern C++17, replacing Boost's verbose macro-like option declarations with a very clean, straightforward
reader.Get<T>() API.
- Simplified Dependency Management: We can drop the heavy Boost requirement from our CMake/vcpkg setups, shrinking our project footprint.
GitHub Repository: https://github.com/SSARCandy/ini-cpp
Official Documentation: https://ssarcandy.tw/ini-cpp/index.html
API Reference (inih namespace): https://ssarcandy.tw/ini-cpp/namespaceinih.html
Currently, our codebase relies on
boost::program_optionsfor parameter parsing. While powerful, Boost is a massive dependency that bloats our build times, complicates our CI/CD pipelines, and feels unnecessarily heavy since we only need to parse INI-format configuration files.I propose replacing
boost::program_optionswithini-cpp(specifically the C++17 wrapper: SSARCandy/ini-cpp). It provides a modern, header-only implementation that perfectly meets our strict requirements:GetVector<T>).Pros of switching to
ini-cpp:ini-cppis a lightweight, header-only library. It removes the need to build and link against compiled Boost libraries.reader.Get<T>()API.GitHub Repository: https://github.com/SSARCandy/ini-cpp
Official Documentation: https://ssarcandy.tw/ini-cpp/index.html
API Reference (inih namespace): https://ssarcandy.tw/ini-cpp/namespaceinih.html