logo

Writing a C Compiler, in Zig

Posted by tosh |4 hours ago |6 comments

fuhsnn 2 hours ago[1 more]

Looking at the repo, the author seemed a little fed up [1] with the nature of lower level language and quitted.

[1] https://github.com/asibahi/paella/blob/main/writeup/c19.md#u...

scatbot 2 hours ago[1 more]

Cool project. Feels like writing a C compiler in Zig aligns nicely with the old "maintain it in Zig" idea that was part of Zig's early value proposition. Is that still considered a relevant goal today?

Longer term it also makes me wonder whether something like this could eventually reduce reliance on Clang/LLVM for the C frontend in zig's toolchain.

flossly an hour ago[1 more]

I thought Zig has a C compiler built in? Or is it just the Zig build system that's able to compile C, but uses an external compiler for that?

Still a proper programmer-flex to build another one.