“There and Back Again: An Incremental C++ Modules Design"
summary
Clang implements an incremental modules workflow that compiles modular headers into PCM/AST blobs, uses module maps to map headers to modules, and yields 10–50% faster average compile times for deployed Google sources where ~10% of headers are modularized. The design proposes C++ Modules TS syntax plus an export macros opt‑in to carry include‑guard macros, an import legacy mode that synthesizes stable modules for third‑party headers, and a path to rewrite headers into true module interface units.
AI-written summary · about
chapters (20)
- 0:00Introduction and speaker background
- 1:04Talk overview and goals
- 1:46Why incremental modules design matters
- 4:16What are C++ modules?
- 7:27C++'s existing module system
- 11:13How clang implements modules
- 17:36Production use of clang modules
- 19:46Challenges in module implementation
- 23:40Goals beyond compile-time speed
- 26:50Modules TS syntax overview
- 31:07Incremental transition to modules TS
- 35:39Combining clang modules and TS approach
- 40:51Handling non-modular libraries
- 44:52Proposal for C++ committee
- 46:24Q&A session begins
- 51:43Modules as architecture vs optimization
- 53:30Implementation vs interface separation
- 55:17Modules and name lookup
- 56:43Nested modules and hierarchy
- 57:45Closing remarks and summary
related talks
58mKnockin' on Header's Door: An Overview of C++ Modules
34mPractical C++20 Modules and the future of tooling around C++ Modules
59mC++ Modules
49mConverting to C++20 Modules
59mC++ Modules and Large-Scale Development
01h 00mAdding C++ modules-ts to the GNU Compiler
36mC++ Modules: Year 2021
01h 11mA Practical Introduction to C++20's Modules
