Draft 0.50 experimental systems language

Familiar syntax.
Native systems.

C~ brings C#-style structure to native systems work. It compiles to deterministic C23 for desktop programs, freestanding images, Cosmopolitan executables, ESP-IDF firmware, and trusted managed applications on ESP32—without the CLR.

  • Explicit ownership
  • Native binaries
  • Portable standard library
  • ESP32 managed apps

01

Predictable by design

Left-to-right evaluation, automatic reference counting, and block-scoped defer make ownership and cleanup explicit.

02

Native at the boundary

Deterministic C23 output, native imports, exported C ABI functions, inline assembly, and runtime-effect contracts keep every boundary visible.

03

Built for real targets

Use the same language and standard-library surface for hosted programs, ESP-IDF firmware, controlled GNU/ELF freestanding images, and x86-64 Cosmopolitan APEs.

Current implementation

One language, several execution models.

C~ keeps target choices explicit. Hosted applications can lean on native libraries and profile-guided optimization; firmware and freestanding programs provide the services their standard library needs; ESP32 can also load trusted C~ applications at runtime.

0.50Language draft
22Runtime ABI
3Managed Module ABI
3Debug metadata

Standard library

Useful above the metal

Strings and strict UTF-8, incremental line reading, stable merge sorting, files, collections, math, geometry, time, random numbers, threads, mutexes, and TLS ship as source with the compiler.

  • Generic collections
  • Rune-aware text
  • Portable runtime services

Native performance

Controlled release builds

Select size, speed, or aggressive optimization, baseline or AVX2 code generation, precise or fast floating point, LTO, and hosted PGO without hiding the resolved native flags.

  • /O1 and -Os size profiles
  • Compiler-resolved header caching
  • Stack-usage reports

Hosted

Desktop-native applications

Build Windows and Linux executables, load allowlisted native libraries, and use the full synchronous I/O and threading surface. The HostedIo example combines a 12-worker packet renderer with a flattened SAH BVH.

  • Native imports
  • Packet SIMD
  • Measured benchmarks

ESP-IDF storage

Filesystems that notice removal

Draft 0.46 adds block devices, primary MBR partitions, explicit FAT formatting and mounts, T-CAN485 SDSPI support, and generation-aware removable-media handling.

  • ESP32 and ESP32-C3
  • LittleFS and FAT
  • Per-process file state

Managed ESP32 apps

Load, run, reclaim

Managed Module ABI 3 packages checked resident ELFs with optional Xtensa code overlays. Schema-3 references compile without provider source, and Runtime ABI 22 keeps managed calls cleanup-safe across returns and exceptions.

  • Checked managed imports
  • Independent state and heaps
  • Redirected process I/O

Tooling

Edit and debug in context

VS Code and Visual Studio share project-aware language services. Source-file changes refresh project membership while unchanged syntax trees are reused. Native debugging maps execution back to C~ source.

  • Diagnostics and completion
  • Semantic navigation
  • Logical breakpoints

Managed modules are ESP-IDF-only trusted native code. Checked cross-module calls now work; canonical descriptor substitution, shared generic implementations, and complete cross-module exception and resource handling remain in development.

A taste of C~

Small language. Clear intent.

Some panels show excerpts. Follow each example link for the complete program and target setup.

01 / INTRO

Start with types you already know.

C~ keeps familiar C#-style structure while producing a native program through its GNU C23 backend.

View the complete example
using System;

namespace Examples;

public static class Program
{
    [EntryPoint]
    public static void Main()
    {
        uint left = 2u;
        uint right = 3u;
        uint result = left + right;
        Console.WriteLine(result);
    }
}

Open source

The compiler, specification, standard library, and 29 example projects are all in one place.