Tech

C++ Modules Are Here — But Your Build Tools Are Stuck in 1995

A solo dev's MCPP tool aims to fix what compilers won't.

Alex Novak|
C++ Modules Are Here — But Your Build Tools Are Stuck in 1995
Photo by TStudio on Pexels

The C++ module feature has been the standard's big promise for a decade: faster compiles, cleaner code, no more header hell. Yet most developers still wrestle with Makefiles and CMake scripts that feel like they were written when floppy disks were cutting edge. And then a random post on Hacker News appears — a solo developer, no corporate backing, offering a new tool called MCPP. Five points, zero comments. That's it. That's the revolution.

But don't let the silence fool you. Sometimes the most important ideas arrive unannounced, wrapped in a humble Show HN. And if C++ is ever going to leave the 20th century behind, it's going to take people like this — not committees, not megacorps — to drag the build systems into the present.

The Module Promise, Broken by Build Tools

C++ modules were supposed to change everything. Instead of parsing thousands of lines of headers every time you compile, the compiler could precompile a module once and reuse it. That's the theory. In practice, adoption has been slow because the build tools — the very thing that makes projects manageable — haven't caught up.

CMake, the de facto standard, only added proper module support in version 3.28, released in late 2023. And even then, it's clunky. You have to explicitly declare module dependencies, manage the module map file, and hope the compiler you're using actually implements the spec correctly. GCC and Clang have been moving forward, but MSVC? Let's not even go there.

The result? A developer who wants to use modules faces a choice: either invest hours in fighting the build system, or stick with the old, battle-tested headers. Most choose the latter. That's why modules haven't taken over the world — not because the feature is bad, but because the tooling is a mess.

“C++ modules are a great idea executed poorly by every major build system. And the people who could fix it are too busy shipping other features.”

MCPP: A One-Person Answer to a Billion-Dollar Problem

Enter MCPP. No website, no documentation, just a GitHub repo and a comment section. The developer's pitch is simple: “Anyone like C++'s module features? Feel free to try MCPP and talk with me.”

It's not a lot to go on. But the very existence of MCPP is a statement. While the big players — JetBrains, Microsoft, the GNU project — are rolling out incremental updates that barely address the pain, this person decided to build something from scratch. That takes guts. And it might just work.

What does MCPP actually do? Based on the sparse details, it's a build tool that handles modules directly, without the awkward abstraction layers that plague CMake and Make. It probably parses module files, resolves dependencies, and feeds them to the compiler in the right order. Sounds obvious, but try doing that with CMake and you'll be writing custom scripts within a week.

Why Big Tech Isn't Solving This

You'd think Google or Microsoft would have poured resources into fixing module build tooling by now. They haven't. Why? Because their internal build systems — Bazel, MSBuild — are already so complex that adding modules on top is just another layer of pain. They have the manpower, but they're stuck in their own legacy.

Meanwhile, the open-source community is fragmented. CMake is maintained by a small team that's perpetually underfunded. Meson is nicer but still niche. And Autotools? Let's not. The people who could build a clean, module-first build system are too busy arguing about package managers on Reddit.

That's where a lone developer with a strong opinion and a lot of free time can make a difference. MCPP doesn't carry the weight of compatibility across 20 years of bizarre build configurations. It can start fresh. And that's exactly what the C++ ecosystem needs — a break from the past.

The Odds Are Stacked Against It

Let's be realistic. MCPP is not going to replace CMake tomorrow. It has zero traction, no corporate sponsor, and the C++ community is famously conservative. But that doesn't mean it's worthless. Every major tool we use today — from git to gcc — started as a small project that people dismissed.

The real question is: will the developer stick with it? Building a tool is one thing. Maintaining it, responding to issues, and convincing the world to adopt it is another. The Hacker News post has five points and no comments. That's not exactly a roaring endorsement. But it's a start.

If you're a C++ developer who's been burned by modules, try MCPP. Give the developer feedback. If it's good, promote it. If it's bad, say so. That's how open source works — not by waiting for the next big release, but by getting your hands dirty.

The Verdict

C++ modules are the future, but only if we build the tools to make them usable. MCPP is a tiny step in that direction, and it deserves more attention than a five-point Show HN. Whether it succeeds or fails, it's a reminder that the biggest problems in software are often solved by the smallest forces.

So go check out MCPP. Wield it, break it, and tell the developer what you think. Or stay with your headers and your CMake scripts, and watch the world move on without you.

The choice is yours. But I know which side I'm on.

Advertisement
#c++#build-tools#modules#cpp#open-source
分享到:XfWB