Open-source project
c3lang/c3c avatar
c3lang/c3c

c3c: the C3 language compiler, a modernized C with C ABI compatibility

Compiler for the C3 language

5,964 stars412 forksC3MIT

At a glance

What is it?
c3c is the compiler for the C3 language, a procedural language that keeps C syntax and binary compatibility while adding modules, generics, slices and result-based error handling. Here is how it installs, how its generic modules work, and where it is the wrong choice.
Who is it for?
Adopt c3c if you write systems or application code in C and want modules, slices and generics without giving up C ABI compatibility, or if you want to convert a portion of an existing C codebase and keep linking against the rest.
Can I use it commercially?
Yes. MIT is a permissive licence: you can use, modify and sell software built on it, as long as you keep its copyright and licence notices.
Is it still maintained?
Yes. The repository received new commits within the last day.
What is it written in?
Mainly C3, according to GitHub's language statistics.

Answers come from the project's GitHub data, last synced on November 15, 2026, and from our analysis. They are not legal advice.

From daily snapshots

Star history

  • c3lang/c3c5,964 ★ · +129
Star history
Repository2026-09-242026-11-15
c3lang/c3c5.8k6k

129 Stars in the last 52 days, measured from the daily GitHub snapshot. Compare with other projects

Editorial analysis

What c3c solves, and who it is for

C3 is a general-purpose language for native software: applications, games, tools, servers, libraries and systems code. The compiler in this repository, c3c, is the tool that turns it into binaries. The pitch is deliberately conservative. The README calls C3 "an evolution, not a revolution" and lists its design principles as staying close to C, changing only what is necessary, and keeping C ABI compatibility with excellent C integration. That framing tells you the intended audience: programmers who already write C and are unhappy with header files, manual namespacing and the preprocessor, but who are not willing to abandon their existing C libraries or their build assumptions.

The README is explicit that C3 owes its inspiration to the C2 language, described as iterating on top of C without inventing an entirely new language. So the target reader is not someone shopping for a new paradigm. It is someone maintaining C who wants slices, modules, generics and defer without a rewrite of everything they link against. Full ABI compatibility is the load-bearing claim here: the README notes that vkQuake was compiled with a portion of the code converted to C3 and built with c3c, which is the concrete demonstration that mixing C and C3 in one project is meant to work without effort.

How C3's generic modules and C interop actually work

The mechanism worth understanding before you install anything is generic modules. In the README's stack example, a module is declared as module stack <Type>;, so the type parameter applies to the entire module rather than to a single function or struct. The struct Stack and its methods are written once against Type. Instantiation happens at the alias: alias IntStack = Stack {int}; produces a complete copy of the module with Type bound to int, and alias DoubleStack = Stack {double}; produces another with double. The README notes that a second alias of Stack {int} would not create a further copy, because the parameterization already exists.

Two smaller details in the same example carry weight. Methods are attached to the type with dot syntax, so Stack.push(&my_stack, element) and my_stack.push(element) are the same call, and the receiver is an explicit pointer named this. The example also shows that importing an external C function from libc is straightforward.

The README's list of differences from C is the best summary of the surface area: no mandatory header files, a new semantic macro system, module-based namespacing, slices, operator overloading, compile-time reflection, enhanced compile-time execution, generics, result-based zero-overhead error handling, defer, value methods, associated enum data, no preprocessor, less undefined behaviour with added runtime checks in safe mode, and optional pre- and post conditions. That is a long list, and it is also the honest answer to whether this is C with a few tweaks. It is not.

Getting c3c: precompiled binaries and the first real program

The README points at precompiled binaries for Windows x64, Linux x64, macOS Arm64 and OpenBSD x64, each linked from the latest GitHub release, with per-platform install instructions in the README. The README also says to see the instructions for building C3 from source if you would rather compile the compiler yourself. Building from source is a CMake project: the repository root has CMakeLists.txt, CMakePresets.json and CMakeSettings.json, plus a build-with-docker.sh script and a flake.nix for Nix users. The repository also carries a c3c.1 man page and an install/ directory.

Once c3c is on your PATH, the smallest real use is the stack example from the README, which exercises modules, generics and C interop at once. The README shows the module source and a driver that imports it:

c3
import stack;

alias IntStack = Stack {int};
alias DoubleStack = Stack {double};

The C3 manual at c3-lang.org is the fuller reference, and there is a browser playground at learn-c3.org if you want to try the language before installing anything.

Platform support is uneven, and the support matrix says so

The most useful thing in the README is the support matrix, because it is candid. Windows x64, Windows Aarch64, macOS x64, macOS Aarch64 and Linux x86 and x64 all list a native compiler, target support with cross compilation in most cases, and yes for stack traces, threads, sockets and inline asm. The mobile rows are a different story. iOS Aarch64 has no native compiler and is marked untested for target support and stack traces, though threads and sockets are listed as yes. Android Aarch64 and Android x64 have no native compiler and are untested across target support, stack traces, threads and sockets. Inline asm is marked yes with an asterisk on every row except Linux Riscv32 and Riscv64, where it is untested.

That pattern matters if you are choosing c3c for a product rather than a side project. Desktop and server targets are covered, which matches the stated audience of applications, games, tools and servers. Mobile is not a supported story yet, and the README does not claim otherwise. The README states the current stable version is 0.8.5 and that the upcoming 0.8.6 release will further refine the standard library and fix bugs. The release list shows v0.8.5 dated 2026-10-10, v0.8.5_1 dated 2026-10-13, and a prerelease tagged 2026-11-02.

C3 versus Zig: two answers to the same question

The comparison people reach for is Zig, and the difference in approach is real rather than cosmetic. Zig's stated direction is a language that is also its own build system and its own C compiler, with comptime as the metaprogramming mechanism. C3 takes the other road: it keeps C's procedural shape, keeps the C ABI as the integration point, and adds the ergonomics C programmers ask for, which in this README means modules instead of headers, a semantic macro system instead of the preprocessor, slices, generics via generic modules, and result-based error handling instead of error codes or exceptions. If your reason for looking at Zig is that you want one toolchain to build C and Zig together, c3c is not that. If your reason is that you want C with fewer footguns and you intend to keep linking against C libraries, C3's design principles are aimed exactly at you.

The honest trade-off is ecosystem. The README links a non-curated list of user projects at c3lang/c3-showcase and a Discord for discussion. Treat the ecosystem as something you verify yourself against the libraries you actually need. A language that compiles C headers cleanly still needs someone to have written the binding you want.

Licence, release cadence and what upgrading costs

The repository is MIT licensed, with a separate LICENSE_SRC file alongside the main LICENSE. MIT is permissive: it allows use in closed-source products provided the copyright notice and permission notice are preserved, but this is a general description of the licence text, not legal advice, and the LICENSE_SRC file exists for a reason you should read before shipping. If you vendor c3c into a build pipeline or redistribute binaries, read both files and confirm which one covers the components you are shipping.

On cadence, the release list shows v0.8.5 on 2026-10-10 and v0.8.5_1 on 2026-10-13, with a prerelease tagged 2026-11-02 and the last push to the repository on 2026-11-02. That is a project that ships often, and the README's own "current status" section says the standard library is still being refined and bugs fixed. For an adopter, the practical cost is that the standard library is the moving part, not the compiler binary. Pin the compiler version you build against, keep the releasenotes.md file in the repository in your review loop, and expect that a language at 0.8.x may change standard library APIs between minor versions. Do not assume a stability guarantee for the standard library without checking.

Editorial conclusion

Adopt c3c if you write systems or application code in C and want modules, slices and generics without giving up C ABI compatibility, or if you want to convert a portion of an existing C codebase and keep linking against the rest. Do not adopt it if you need a mature third-party package ecosystem, a language with a large hiring pool, or mobile targets: the support matrix marks iOS and Android target support and stack traces as untested (Android threads and sockets too), with no native compiler on those platforms. Before committing, check the release notes for the version you download, confirm that your target appears in the support matrix with the features you need, and pick a small module of an existing C project to convert first, since the README's vkQuake example shows partial conversion rather than a full rewrite.

Frequently asked questions

What is the C3 language?

C3 is a general-purpose programming language for building fast native software: applications, games, tools, servers, libraries and systems code. The README describes it as an evolution of C rather than a revolution, keeping familiar C syntax and semantics while adding modules, slices, generics, defer and result-based error handling.

Is there a C3 language?

Yes. C3 is developed in the c3lang/c3c repository under the MIT licence, with a manual at c3-lang.org and a browser playground at learn-c3.org. The current stable compiler version stated in the README is 0.8.5.

What is C3 code?

C3 code is source written in the C3 language for the c3c compiler. A C3 file declares a module, can import other modules, and can declare extern functions to call C libraries directly, as the README's example does with a libc function.

Official sources

  1. c3lang/c3c on GitHub
  2. License: MIT
  3. Project website
  4. README
  5. Releases
Add this badge to your README

If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.

Add this badge to your README

markdown
[![Hysen Labs](https://hysenlabs.com/badge/c3lang-c3c.svg)](https://hysenlabs.com/projects/c3lang-c3c)

Star history chart for your README

markdown
[![Star history](https://hysenlabs.com/chart/c3lang-c3c.svg)](https://hysenlabs.com/projects/c3lang-c3c)

Was this useful?