Boost logo

Boost :

From: Hassan Sajjad (hassan.sajjad069_at_[hidden])
Date: 2024-03-21 17:34:48


Hi.

Preface:

C++20 modules and header-units are a great addition to C++. There are
numerous benefits of these. One of them is a faster compilation.
Conventional build-systems however are unable to benefit from C++20 modules
or header-units. Boost current build-system b2 does not support C++20
modules or header-units. CMake does not support C++20 header-units
https://gitlab.kitware.com/cmake/cmake/-/issues/25293.

I developed the build-system HMake https://github.com/HassanSajjad-302/HMake.
It is in C++ and MIT Licenced. It supports drop-in header-files to
header-units replacement. While compilers support processing a header-file
as header-unit, no other build-system supports this feature.

With this I compiled SFML with C++20 header-units
https://www.reddit.com/r/cpp/comments/1555g6b/hmake_build_system_02_compiling_an_sfml_example/.
In the post, I mentioned that 2-3.5x speed-up was achieved but I did some
more testing recently and an even better speed-up of 2.7-4.7x was achieved
i.e., the speed of header-units is further improving with recent iterations.

Proposal:

I want to propose my build-system HMake for boost. Besides its already
state-of-the-art C++20 modules and header-units support, it will be the
first to support https://lists.isocpp.org/sg15/2023/11/2106.php or
https://lists.isocpp.org/sg15/2023/11/2146.php if any of this gets
implemented. These papers present ideas for faster module adoption and
avoiding redundant module compilations. These need support from
build-system. This way boost could be a breeding ground for C++20 modules
adoption. Also, I have good experience with boost's current build-system b2
as a good portion of HMake's current API is inspired by it.

Timeframe:

I will complete this proposal in 3 months.

Deliverables:

1) 2-months: Boost basic configuration compiled with C++20 header-units.
This is more of a lone sprint.
2) 3-months: All boost current configurations + new with header-units and
modules + tests and examples. This will require more active involvement by
the current maintainers.
I will give weekly updates here and will make a video after 2 months
presenting the progress made. This will be to help other contributors so
they can ensure that their library is fully supported.

Cost:

Standard C++ Developer Compensation for 3 months (Negotiable). Payments are
to be issued monthly. But you can back out at any point in case you are
unsatisfied with development speed or direction.

Impact:

While I don't see any reason for it to be a flop, it is an engineering
endeavor so there is some inherent risk. The best-case scenario is that it
improves Boost usability and 2.5x compilation speed improvement starts a
domino effect for HMake and C++20 header-units and modules adoption.

Best,
Hassan Sajjad


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk