diff options
| author | Zuhaitz <zuhaitz.zechhub@gmail.com> | 2026-01-12 15:59:15 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-01-12 15:59:15 +0000 |
| commit | 06381baa771238282d64c58aef9c3f7734799b6d (patch) | |
| tree | cb489c22ae02c39da720836cb3588cf3edc21778 /README.md | |
| parent | 9a54f2f52fdaf9364b0f757f5cdcbf09de230919 (diff) | |
| parent | 19fa2f2d880a693af2dd6346b120bb88e615f4e5 (diff) | |
Merge pull request #2 from binoculars/feat/zig
feat: add zig compiler support
Diffstat (limited to 'README.md')
| -rw-r--r-- | README.md | 18 |
1 files changed, 17 insertions, 1 deletions
@@ -443,6 +443,7 @@ Zen C is designed to work with most C11 compilers. Some features rely on GNU C e ```bash zc run app.zc --cc clang +zc run app.zc --cc zig ``` ### Test Suite Status @@ -451,9 +452,22 @@ zc run app.zc --cc clang |:---|:---:|:---|:---| | **GCC** | **100%** | All Features | None. | | **Clang** | **100%** | All Features | None. | +| **Zig** | **100%** | All Features | None. Uses `zig cc` as a drop-in C compiler. | | **TCC** | **~70%** | Basic Syntax, Generics, Traits | No `__auto_type`, No Intel ASM, No Nested Functions. | -> **Recommendation:** Use **GCC** or **Clang** for production builds. TCC is excellent for rapid prototyping due to its compilation speed but misses some advanced C extensions Zen C relies on for full feature support. +> **Recommendation:** Use **GCC**, **Clang**, or **Zig** for production builds. TCC is excellent for rapid prototyping due to its compilation speed but misses some advanced C extensions Zen C relies on for full feature support. + +### Building with Zig + +Zig's `zig cc` command provides a drop-in replacement for GCC/Clang with excellent cross-compilation support. To use Zig: + +```bash +# Compile and run a Zen C program with Zig +zc run app.zc --cc zig + +# Build the Zen C compiler itself with Zig +make zig +``` --- @@ -482,6 +496,8 @@ make test # Run with different compiler ./tests/run_tests.sh --cc clang +./tests/run_tests.sh --cc zig +./tests/run_tests.sh --cc tcc ``` ### Extending the Compiler |
