The C+ Manual
C+ compiles to native code through LLVM. It has no garbage collector, no exceptions, no closures, no overloading, no implicit conversions, and no null. Memory is managed manually and checked through ownership and borrowing rules, with C ABI compatibility in both directions.
This manual documents C+ 0.0.30. The source of truth for behavior is the tagged compiler and package tree at v0.0.30.
Start here
- Getting started installs the toolchain and builds the first program.
- A tour of C+ walks through a complete project in one sitting.
- The C+ guide covers the judgment calls that syntax alone does not answer.
- Language reference lists the complete surface compactly.
- Language specification records the normative rules.
- C+ 0.0.30 release notes record every shipped change and migration item.
- Reproducible proofs link claims to programs and commands that exercise them.
Platforms in 0.0.30
C+ programs run across seven supported platform families:
macos linux windows ios android esp32 wasm
The native cpc toolchain runs on macOS, Linux, and Windows. It self-links executables on those hosts and cross-compiles static libraries and headers for iOS, Android, and ESP32. The wasm platform is used through cpc-wasm; it is not a native cpc --target value. See Platforms and targets for target names and artifact behavior.
Facet has native backends for the supported application platforms:
| Platform | Facet backend | Status in 0.0.30 |
|---|---|---|
| macOS | facet_appkit | Supported |
| iOS | facet_uikit | Supported; simulator exercised, device build available |
| Android | facet_android | Supported |
| Linux | facet_gtk | Supported |
| Windows | facet_winui | Supported (default; facet_win32 is deprecated as an explicit opt-out) |
Facet applications use facet_runtime: register windows with app.window(name, factory, chrome:), register routes on each window, and start the application with App::run.
What changed in 0.0.30 (and 0.0.29)
- WinUI 3 on Windows: facet_winui, agent_winui, and winui are now the default Windows UI and agent backends for
facet_runtimeandfacet_agent.facet_win32is deprecated and remains reachable as an explicit opt-out (facet_runtime/win32::select()). - App environment and assets (appenv):
appenvprovidesapp_data_dir,cache_dir,no_backup_dir,resource_dir,asset_path,read_asset,read_asset_text, andapp_idfrom the first line ofmainon macOS, Linux, Windows, iOS, and Android.cpc buildstages<root>/assets/*intotarget/assets/<target>/<mode>/and mirrors them beside self-linked binaries (cpc build --print-asset-dirprints the staged tree for external builders). - One
[package] app_idacross platforms:cpc init --app-idwritesapp_idintoCplus.tomland each platform manifest;cpc buildchecks validity (E0415) and warns on drift (W0008). - Unified
hybrid_webpage bridge (facet/hybrid_page): JavaScript callswindow.facet.postMessage(str)up, native dispatchesHybridWebViewMessageReceived(e.detail.message) down, and C+ reads payloads viahybrid_page::message(sender)across AppKit, UIKit, Android, GTK, and WinUI. - Liquid Glass & Material 3 UI parity: iOS 26 Liquid Glass tab bars, blur effects, and push navigation in
facet_uikit; Material 3 dynamic palette tokens, tab bars, bottom sheets, and dialogs infacet_android; bundled Material Symbols icon font (facet/icon_font),named_sizetypography roles, and file drop/save-panel support. - Language intrinsics & target features:
#bitcast::[T](v)reinterprets bits between same-width floats and integers (replacingfN::from_bits/.to_bits(), introduced in 0.0.29);#target_feature("avx2")queries enabled ISA extensions alongside--target-cpuand--target-feature;stdlib/template(Template) receives unjoined string literal parts and arguments;stdlib/pathadds path manipulation helpers. - Compiler soundness, diagnostics, and doctests: Generic
impltemplates are checked at definition time and treat unboundedTas move-only with potential drop; type aliases are resolved before borrow/move/drop checks; W0009 warns on discardedStatusreturns; E1010 rejects@viewblocks on leaf controls (scroll { ... }now takes a@viewblock);cpc testextracts both bare```and```cplusdoctest fences and fails on unclosed fences.
C plus packages
The language core supplies types, ownership, control flow, compilation, and the C ABI. The standard library, UI stack, platform bindings, services, data libraries, and numerical libraries live in packages. See the package index and modules and packages.
Versioned manual
The clean /docs URLs always serve Doc::CURRENT. Frozen releases remain available under /docs/{version}. Every page also has a raw Markdown representation by appending .md; /llms.txt indexes the current manual and /llms-full.txt concatenates it.