C+

Install

Install the C+ toolchain

cpc ships as a prebuilt binary — no Rust toolchain and no compile step. Native builds require clang to assemble and link the final binary. C+ is pre-1.0 and moving quickly; pin a version for any real work. Version 0.0.28 runs on macOS, Linux, and Windows. A macOS host cross-compiles for iOS through Xcode; Android and ESP32 use their target toolchains. WebAssembly uses cpc-wasm.

macOS (Apple Silicon)

Install with Homebrew:

brew install netdur/cplus/cplus
cpc --version

This installs prebuilt cpc, cpc-lsp, and cpc-bindgen with no compile step; update later with brew upgrade cplus. Add the C toolchain through the Xcode Command Line Tools:

xcode-select --install

Linux (x86-64) & Windows (x86-64)

Download the .deb (Linux) or .zip (Windows) from the GitHub releases page. ARM Linux and ARM Windows hosts are planned. On Linux, install clang from your distribution's package manager so cpc build can link.

Verify

cpc --version

The front-end commands — cpc check, cpc fmt, cpc lsp, cpc query — need no external tools. Commands that produce or run native code, including cpc build, cpc run, cpc test, and native object or assembly emission, invoke clang.

Cross-compilation

On macOS, cpc cross-compiles to iOS with the SDK supplied by Xcode. Android builds use the Android NDK, and ESP32 builds use Espressif's esp-clang. See Targets & cross-compilation for the target and artifact model.

Next

Compile your first program in Getting started, or browse the full manual.