C+

Install

Install the C+ toolchain

cpc ships as a prebuilt binary — no Rust toolchain and no compile step. The one external requirement is a C toolchain (clang) to assemble and link the final native binary. C+ is pre-1.0 and moving quickly; pin a version for any real work.

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 at all. Only cpc build / cpc run invoke clang to produce a native binary.

Cross-compilation

From any host, cpc cross-compiles to iOS, Android, and the ESP32 with --target. See Targets & cross-compilation.

Next

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