HeadlinesBriefing favicon HeadlinesBriefing.com

MCPP: Modern C++23 Module-First Build Tool

Hacker News •
×

MCPP is a modern C++23 module-first build tool written in pure C++23 modules, offering full self-hosting capabilities. It automatically handles `import std`, provides file-level incremental builds, and requires zero manual configuration. Built with 43+ C++23 modules, MCPP constructs itself without external dependencies.

Key features include semantic version constraint resolution, a lockfile system, and multi-package workspace support. The tool integrates bundled GCC 16 and LLVM 20 toolchains into an isolated sandbox, preventing system pollution. Its modular ecosystem allows seamless use of community libraries from mcpplibs and custom package indices.

Installation is streamlined via xlings or one-line commands, with short aliases like `mbuild` for ease. Projects created with `mcpp new` default to C++23 modules, and dependencies are managed through `mcpp.toml`. File-level optimizations and automatic BMI caching ensure efficient recompilation.

MCPP supports Linux, macOS ARM64, and Windows x86_64. While in early development, it welcomes contributions. Developers can start with `mcpp new hello` to create a project, build it, and run tests automatically. The tool’s design prioritizes modernity, leveraging C++23 features like module partitions and partitions.

The project’s GitHub repository includes documentation, examples, and a community forum. Users are encouraged to report feedback via issues. MCPP’s modular approach and self-hosting model make it a promising solution for modern C++ development.