Thanks to many contributors, but especially Vexu, `zig translate-c` is now fully self-hosted.


· · Web · 1 · 2 · 1

I should clarify: it's using libclang, which is a C++ library. There is a C API wrapper on top of that. Then it is Zig code that uses the libclang C API wrapper to translate C code into Zig source code, format it, and write it to a file.

But this is definitely a meaningful step towards a self-hosted compiler! Today 5,156 lines of C++ were deleted from the Zig source repository.

And now most open issues with regards to translating C code are labeled as "contributor friendly"

Sign in to participate in the conversation

The original server operated by the Mastodon gGmbH non-profit