Building C++ Modules
summary
Modularized a real build2 utility (≈30 modules, unit tests) and sees 2.5x–3x faster builds with Clang and a modularized libstdc++; compilers emit a binary module interface (BMI) plus object file for an interface unit, so the build system must order BMI builds and supply BMIs to importers; BMIs depend on compiler options so build systems often perform side builds or rebuild BMIs per-option. Guidance: separate interface and implementation units, avoid including headers in the module purview, keep modules cohesive.
AI-written summary · about
chapters (16)
- 0:00Introduction to C++ modules
- 1:04Why use C++ modules
- 3:19Demo of build speedup
- 5:39What is a module
- 9:14Module consumer perspective
- 10:42Module producer perspective
- 17:36Build system implications
- 21:35Build pipeline examples
- 27:57Module design guidelines
- 29:20Module granularity
- 31:53Module interface structure
- 34:47Where to put includes and imports
- 39:28Module naming conventions
- 41:17Modularizing existing codebases
- 47:54Backwards compatibility levels
- 53:20Q&A session
related talks
01h 01mPractical C++ Modules
59mC++ Modules
58mKnockin' on Header's Door: An Overview of C++ Modules
01h 00mSo, you want to use C++ Modules ... cross-platform?
01h 28m2024 Update: C++ Modules - C++ Developers Get Started Today!
26mC++ Modules Myth Busting
34mPractical C++20 Modules and the future of tooling around C++ Modules
01h 00m“Deploying C++ modules to 100s of millions of lines of code"
