Zen C is a systems programming language that transpiles to human-readable C or C11 while keeping full C ABI compatibility. It targets developers who want modern language features with C-level performance.
Overview
Zen C is positioned as a modern systems language: you write in Zen C syntax and the toolchain emits GNU C/C11 (or other backends) so programs can link and run like ordinary C code. The language includes type inference, pattern matching, generics, traits, and manual memory management with RAII-style capabilities.
The standard library covers vectors, strings, maps, I/O, filesystem paths, networking, threads, JSON, regex, and more. A built-in unit testing framework runs named tests with assert and expect helpers. Tooling includes a Language Server for editors, a JIT-powered REPL, and debugging support with standard C debuggers such as LLDB.
You can build the compiler on Windows with MinGW, use make on Unix-like environments, or produce a portable Actually Portable Executable with Cosmopolitan Libc for several operating systems and architectures. Output backends include C, C++, CUDA, Objective-C, JSON AST dumps, and others, with compiler backends such as GCC, Clang, Zig cc, and TCC.
Zen C is designed to interoperate with C and C++ code, including C++ headers via dedicated backend modes and GPU kernels through CUDA transpilation. Environment variable ZCROOT can point the compiler at the standard library from any working directory.
Key features
- Transpiles to GNU C11/C++
- Full C ABI compatibility
- Built-in LSP and REPL
- Rich standard library modules
- Multiple compiler and output backends
- Built-in unit testing
- CUDA and C++ interop options
- Portable APE binary builds
Use cases
- Systems code with C ergonomics
- C/C++ interoperability projects
- Cross-platform CLI tooling
- GPU kernels via CUDA backend