C+
Introduction · View as Markdown

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.28. The source of truth for behavior is the tagged compiler and package tree at v0.0.28.

Start here

Platforms in 0.0.28

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.28
macOS facet_appkit Supported
iOS facet_uikit Supported; simulator exercised, device build available
Android facet_android Supported
Linux facet_gtk Supported
Windows facet_win32 Supported

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. The pre-0.0.28 app.screen, Screen::chrome, runtime::Window, and global content-navigation APIs have been removed.

What changed in 0.0.28

  • Applications use the package entry key; [[bin]] and [lib] were removed. C-facing library products use [library].
  • async fn main and async #[test] are driven by the compiler. Synchronous callers consume futures with .wait() or future::wait_or_cancel; executor::block_on and executor::run were removed.
  • guard let complements use else Pattern, without pipe delimiters.
  • Facet application/runtime and agent integration moved into the facet_runtime and facet_agent packages.
  • sqlite/raw replaces the separate sqlite_ffi package, static_arena replaces static-arena, and terminal/backend replaces terminal/appkit.
  • cpc query complete, MCP complete_at, and LSP completion share the same compiler implementation. LSP and MCP retain a warm project session.
  • The package manager supports exact tagged dependencies, a per-user package store, local overrides, and Android Maven/AAR dependency resolution.
  • Native capability packages cover notifications, application links, camera, location, sensors, biometrics, secure storage, permissions, file picking, haptics, sharing, HTTP, and filesystem watching, with platform implementations or explicit unsupported outcomes.

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.