A cargo-style package and project manager for C and C++, written in pure Rust.
ccpm brings the cargo workflow to C and C++. You describe a project in one manifest, lock its dependencies, and build it with a single command. devkitPro and the Nintendo Switch are the first supported target.
Warning
ccpm is a work in progress. It is under active development and not yet stable, so expect rough edges and breaking changes.
- One
ccpm.tomlmanifest per project, with a generatedccpm.locklockfile. - Workspaces and
dev/releasebuild profiles. - A real version solver built on pubgrub, with semver and pacman version models side by side.
- Dependencies from the ccpkg registry, from git, or from a local path.
- A subprocess plugin system that adds toolchains and targets without rebuilding ccpm.
- First-class devkitPro support: install the toolchain, build, and package a Switch
.nro. - The ccpkg registry: a sparse HTTP index, a publish API, and a devkitPro mirror.
- Runs on Linux, macOS, and Windows.
- Pure Rust, with no C library bindings.
ccpm builds from source with a recent stable Rust toolchain:
git clone https://github.com/GGLinnk/ccpm.git
cd ccpm
cargo install --path crates/ccpm-cliThis installs the ccpm binary onto your PATH.
Create a project, install a toolchain, and build it:
ccpm new hello-switch
cd hello-switch
ccpm toolchain install switch
ccpm buildBuild in release mode and deploy to a Switch on your network:
ccpm run --release --host 192.168.1.42| Command | What it does |
|---|---|
ccpm new <name> |
Create a new project in a new directory. |
ccpm init [path] |
Add a manifest to an existing directory. |
ccpm build |
Build the current project. |
ccpm run |
Build and deploy to a Switch. |
ccpm add <pkg> |
Add a dependency to the manifest. |
ccpm remove <pkg> |
Remove a dependency. |
ccpm search <query> |
Search the package index. |
ccpm update |
Re-resolve dependencies and rewrite the lockfile. |
ccpm publish |
Publish the current package to a registry. |
ccpm login <token> |
Store a registry API token. |
ccpm clean |
Remove the build output. |
ccpm tree |
Print the resolved dependency tree. |
ccpm toolchain |
Install or check a devkitPro toolchain. |
ccpm plugin |
List, add, link, or remove plugins. |
ccpkg is the package registry for ccpm.
It is to ccpm what crates.io is to cargo: a sparse HTTP index of every package and every version, served with a publish API and resolved by a backtracking solver.
The public instance lives at pkg.ccpm-rs.com.
Publish a package:
ccpm login <your-api-token>
ccpm publishRun your own registry and web frontend with Docker:
docker compose up -dThe server exposes the index on port 8080, and the web frontend serves on port 3000.
ccpkg mirrors the devkitPro package repository so every version stays available, even after upstream prunes it.
- The mirror refreshes automatically once a week.
- An optional mode allows a manual refresh at most once an hour.
Enable the manual refresh endpoint when starting the server:
ccpkg serve --allow-manual-refreshEvery server option also reads from an environment variable, so the same settings work in a shell or in a container.
ccpm keeps the package manager generic and moves toolchain knowledge into plugins. A plugin is a small executable that ccpm drives over a stable protocol, so a new target ships without changing the core. devkitPro and the Nintendo Switch are the first target, with 3DS, Wii, and GBA on the roadmap.
Manage plugins from the CLI:
ccpm plugin list
ccpm plugin add ./path/to/pluginccpm is released under the MIT License.
Note
Large language models were involved in building this project.