Simplify and standardize C++ development. Inspired by Rust's Cargo, Cup brings modern project management and dependency handling to the rich C++ ecosystem.
While C++ boasts a mature ecosystem, project setup and dependency management often involve complex, inconsistent workflows. Cup solves this by abstracting CMake complexities through:
- CMake Abstraction: Dynamically generates tailored CMake scripts based on standardized project structures
- Minimal Configuration: Define projects (name/type/dependencies) in simple config files – no CMake expertise needed
- Extensible Plugins: Adapt to specialized build scenarios (e.g., Qt apps) via lightweight plugins
Design Philosophy:
Cup was born from the need for Cargo-like simplicity in C++ development. Traditional CMake workflows require manual source file management where file(GLOB) breaks incremental builds. Cup automates this by:
- Generating CMake scripts from TOML configurations
- Using one TOML file per build target for clarity
- Providing plugins for complex scenarios where pure configuration falls short
- Offering VSCode integration for seamless development
We believe build operations should be templated, not scripted. Unlike Rust's build.rs (which becomes unreadable), Cup strikes the perfect balance between configuration simplicity and CMake's power through its plugin system.
- Download the standalone
cupbinary from Releases
OR run:cup install @Anglebase/Cup && cup build -r - Move the binary to your system path (e.g.,
~/bin/or/usr/local/bin/) - Ensure the directory is in your
PATH
| Command | Description |
|---|---|
cup new <name> [--type <type>] |
Create new project (default: binary) |
cup build |
Build current project |
cup clean |
Clean build artifacts |
cup run |
Build & execute the project (if applicable) |
cup install <@user/repo> |
Install dependency locally |
cup uninstall <@user/repo> |
Uninstall local dependency |
cup list |
Show information (e.g., installed packages) |
| Type | Output |
|---|---|
binary |
Executable (default) |
static |
Static library (.a/.lib) |
shared |
Shared library (.so/.dll) |
module |
Module library (plugins) |
interface |
Header-only library |
📚 Full Documentation
Advanced features and customization guides
🧩 VSCode Extension:
Get IntelliSense autocompletion for cup.toml and one-click project execution
Contribute:
Submit issues, suggestions, or code via GitHub Repository