LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

mcpp

C++23 module-first build tool and package manager

TLDR

Create a new modular C++ project
$ mcpp new [project_name]
copy
Build the project in the current directory
$ mcpp build
copy
Build and run the default target
$ mcpp run
copy
Run tests (auto-discovered under tests/)
$ mcpp test
copy
Add a dependency from the package index
$ mcpp add [package]
copy
Install a bundled toolchain (e.g. GCC 16)
$ mcpp toolchain install gcc 16
copy
Package a release tarball (vendored mode by default)
$ mcpp pack
copy
Diagnose the local environment
$ mcpp self doctor
copy

SYNOPSIS

mcpp [global-options] command [args]

DESCRIPTION

mcpp is a modern C++ build tool aimed at C++23 module-first development. It creates, builds, tests, and packages projects that use `import std`, module interface units, and module partitions, with automatic module dependency analysis and file-level incremental builds.Projects are described by a mcpp.toml manifest. By convention, `src/main.cpp` becomes a binary target and tests under `tests/` are discovered by mcpp test. The first build downloads a host-aware default toolchain (GCC or LLVM depending on platform) into an isolated sandbox under ~/.mcpp/, so system compilers are not required.Dependency management resolves SemVer constraints against package indices (default: mcpp-index / mcpplibs), writes a lockfile, and can pull modules from index, Git, or local paths. Multi-package workspaces share one lockfile and target directory. mcpp pack produces distributable artifacts (system, vendored, self-contained, or fully static musl builds on Linux).The tool is early-stage and self-hosted (written in pure C++23 modules). Full option lists for each subcommand are available via mcpp command --help.

PARAMETERS

new name

Scaffold a modular project (optional --template for library-provided templates).
build
Compile the project (incremental; Ninja backend).
run [-- args]
Build and run the default target.
test [pattern]
Discover, build, and run tests; filter by name pattern.
clean
Remove build outputs under the target directory.
add / remove / update
Manage dependencies declared in mcpp.toml.
search
Search configured package indices.
pack
Bundle a release package (--mode system | vendored | self-contained | static).
publish
Publish a package to a configured index.
toolchain install|list|default ...
Install, list, or select sandboxed compiler toolchains.
cache / index
Manage BMI/build cache and package indices.
self doctor|version|env|config|explain ...
Environment checks and self-maintenance commands.
why [toolchain|runtime|deps]
Explain resolved build decisions.
explain CODE
Print a detailed explanation for an error code.
--offline
Use only already available local state (no downloads or index refresh). Also MCPP_OFFLINE=1.
--version
Print the mcpp version.

CONFIGURATION

Project manifest: mcpp.toml (package metadata, dependencies, toolchains, workspaces).Lockfile: mcpp.lock.Per-user data and sandboxed toolchains: ~/.mcpp/ (registry, caches, install layout).

INSTALL

yay -S mcpp-bin
copy
brew install mcpp-community/mcpp/mcpp-m
copy

CAVEATS

Name clash: many Linux/Homebrew distributions ship an unrelated mcpp C preprocessor. Package names for this build tool are often mcpp-m / mcpp-bin (AUR) or the Homebrew tap formula mcpp-m, while the installed command remains mcpp. Prefer the install paths from the project README if which mcpp points at the preprocessor.Early-stage software: interfaces and behavior may change between releases. The first build can take a long time while toolchains download into ~/.mcpp/.

HISTORY

mcpp is a community project under mcpp-community focused on native C++23 modules and self-hosting. It builds on the xlings toolchain/package foundation and is inspired by tools such as Cargo, xmake, and Ninja.

SEE ALSO

xmake(1), cargo(1), ninja(1), cmake(1), meson(1)

RESOURCES

Braincup
Open source brain training for math, memory and focus
Braincup mini-games
41 mini-games · Apache-2.0
No ads · No tracking
Play in browser
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid
276 stars
From the maker of Linux Command Library
Copied to clipboard
Braincup
Open source brain training for math, memory and focus. 41 mini-games, from mental arithmetic to Sudoku, N-Back and Solo Chess.
Apache-2.0 licensed · No ads · No tracking · No account
From the maker of Linux Command Library
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid