C3 versus Rust and C++: a modern C with explicit limits

New Programming Languages versus Rust / C++

A graphics application opens an image, reserves memory and then encounters an error before drawing anything. Every resource already acquired must still be released. C3 brings tools for making that work easier to express while keeping C’s direct access to memory and existing libraries. The same design can support a program that loads neural-network weights onto a GPU. Its attraction is practical control. Its central limitation is equally practical: the person writing the program still has to get the lifetime of that memory right.

The creator

The C3 language project

Context Free’s conversation with C3’s creator. Watch the original interview.
Beyond replacing old C programs
In an August 2026 essay, the creator described a broader ambition: recover the convenience of procedural application development, with useful strings, arrays and reusable components. The intended audience includes people building applications that would otherwise use C++ or other general-purpose languages.
A design preference to test
The essay explains a preference for organising programs around procedures and data. It supplies the project’s motivation; whether that makes a particular team more productive requires evidence from that team. Read the design account.

What changes when a C library is used from C3?

A C3 slice keeps an address and a length together. A deferred action can release a resource when execution leaves its scope. Modules organise names without mandatory header files, and optional results let a function return either a value or a failure. These features reduce some of the bookkeeping familiar to a C programmer. Compatibility at the binary interface allows C and C3 routines to call each other; it does not make an arbitrary C source file a valid C3 program. Language features · C interoperability.

The community package raylib.c3l gives a concrete example. Its interface replaces several separate address-and-length arguments with slices, introduces optional results for some file operations and provides blocks that close a drawing mode automatically. Its maintainer describes learning C3 as a reason for creating the package. This is a documented community choice, with testing concentrated on Linux, rather than a major studio’s production adoption. The language project also demonstrates mixed C and C3 code in an older vkQuake fork. The raylib adaptation · The vkQuake demonstration.

Where the safety improvements stop

C3 manages memory manually. Local variables are normally initialised to zero, although explicit uninitialised declarations are available. Temporary allocations can be released together at the end of a pool, and deferred cleanup can cover early returns. A saved pointer can nevertheless outlive the storage it refers to. Checking that its address is nonzero cannot establish that the storage is still valid. Memory management · Initialisation rules.

In checked builds, C3 detects errors such as an array index outside its bounds, a null dereference, integer division by zero and a violated contract. Its own specification lists detection of access outside an object’s lifetime as implementation-dependent. Undefined behaviour therefore remains part of the language. The usual O0 and O1 settings enable checks, while O2 and higher normally disable them; safety can be configured separately. A comparison must say which setting was used. The specified limits · Checked and unchecked modes · Separate project settings.

Rust’s safe interfaces enforce ownership and borrowing rules that C3 does not provide. Rust still depends on correct unsafe implementations and foreign interfaces, so neither a language choice nor the word “safe” certifies an entire application. C++ also offers established resource-lifetime techniques and, since C++20, modules. C3 should be assessed against those present capabilities, rather than treating C++ as if it had stopped evolving. C3’s comparison with Rust · Rust’s unsafe boundary · C++ modules.

What the November measurements show

LangArena publishes programs and results for several languages. The run dated 4 November 2026 used an AMD Ryzen 7 3800X, 78 GB of memory and x86-64 Linux. Three workloads illustrate different outcomes: drawing a Mandelbrot set, finding a path through a maze and building an expression tree. C3 was close to the other implementations in the first, took less time in the second and more time in the third. These are measurements of particular programs and build profiles.

Elapsed CPU times in seconds. Mandelbrot: C3 0.905, C 0.905, C++ 0.915, Rust 0.950. Maze search: 0.430, 0.452, 0.853, 0.849. Expression tree: 1.064, 1.050, 0.663, 0.612.
Figure 1. Reported elapsed time for each workload’s iteration batch, after warm-up. All axes start at zero. Build profiles differ; the record supplies no uncertainty intervals. Enlarge the figure · Original results.
CPU time in seconds for the complete measured batch; lower is better. C and C++ use Clang and Clang++ respectively.
WorkloadC3CC++Rust
Mandelbrot0.9050.9050.9150.950
Maze search0.4300.4520.8530.849
Expression tree1.0641.0500.6630.612

The workload definitions specify a 400 × 400 Mandelbrot image repeated 100 times, a 1,400 × 1,400 maze searched 70 times and an expression workload with 11,000 operations repeated 100 times. Preparation and warm-up precede the C3 timer; final checking and cleanup follow it. The values are batch durations, not average latencies of one operation. Workload definitions · Timing procedure.

The compiler versions were C3 0.8.5_1, Rust 1.99.1 and Clang/Clang++ 23.1.4. C3’s standard profile used O1 with a generic CPU target; C and C++ used O2 with stack protection, and Rust used Cargo’s release profile. The alternative C3 “Fast” profile, using O3 and the native CPU target, reported 0.901, 0.465 and 0.877 seconds for these same three workloads. More aggressive compilation did not improve every result. C3 profiles · Build commands · Version and timing record.

The programs also differ in their data structures and memory handling. For example, the maze implementations use different queue and visited-cell representations. LangArena discloses AI assistance in translating its programs. Shared checksums are useful consistency checks, but they do not establish equivalent behaviour for every possible input. Without repeated controlled trials, the small Mandelbrot differences establish no general winner. These published CPU results were inspected here; the physical trials were not repeated. They measure neither GPU inference nor C3 0.8.6. Source and methodology.

What has matured, and what still needs scrutiny?

Version 0.8.6 adds versioned library fetching, checksums and packaging of source libraries. A matching checksum can confirm that downloaded bytes match the declared digest; trust in the publisher and correctness of the library remain separate questions. The release also tightens conversion rules and fixes compiler and library defects. Its announcement reports smaller executables in checked mode: that is a size improvement, not a measured increase in execution speed. November release notes.

Community activity provides useful examples without establishing industrial maturity. The official showcase warns that projects have varying levels of completion and are not endorsed by the language team. Its contribution policy requires contributors to understand submitted code and disclose substantial AI assistance. The raylib package separately discloses AI-generated changes, incomplete manual review and limited platform testing. Using an assistant to develop a C3 library is a different claim from using C3 to execute a model. Community showcase · Contribution policy · The package’s disclosure.

What this language can contribute to artificial intelligence

The community project llm-runner supplies a concrete, experimental application. In the revision available on 28 November, C3 loads model weights, handles tokenisation and exposes native resources to a GPU inference engine using Vulkan. JavaScript describes and coordinates model operations; separate Shady programs perform GPU calculations. The project documents image-generation and vision components, including Flux and Depth Anything. This establishes a role for C3 in inference infrastructure. It does not establish that the models’ providers use C3 internally. Inference engine and division of work.

The useful language properties are direct memory access, native library integration and explicit cleanup. Its C3 safetensors reader maps a weight file into memory and arranges cleanup when an error interrupts loading. On supported GPUs, the engine can use cooperative matrix operations, but that acceleration belongs to the combined implementation and hardware. There is no matched Rust or C++ inference comparison in the reviewed material. The project’s validation notes also acknowledge earlier numerical errors and corrections. Weight loading and cleanup · GPU paths and validation limits.

No influential AI provider’s internal adoption was established in the sources examined. Nor is there evidence here that C3 makes model behaviour safer. The engine explicitly treats its extensions as trusted code with file and GPU access. The evidence supports an experimental use, with a concrete contribution to resource handling; it does not support a claim of production readiness, secure isolation or superior model performance.

Where does C3 earn a place?

C3 offers a credible way to build native applications around C libraries with clearer handling of lengths, errors and cleanup. A team considering it should first try a bounded component, exercise failed loads and early returns, and measure the actual workload with the checks it intends to retain. Rust remains the stronger reference when enforced memory-lifetime rules are central to the decision. C++ remains a substantial alternative for established native software. C3’s place in this collection rests on a concrete design, inspectable programs and explicit limitations. Its emerging inference work adds a reason to follow it, while leaving industrial adoption and comparative AI performance to be demonstrated.

Liked this post? Follow this blog to get more.