Follow

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

Example:

· · Web · 1 · 2 · 2

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"
🥳

Show thread
Sign in to participate in the conversation
Mastodon

Server run by the main developers of the project 🐘 It is not focused on any particular niche interest - everyone is welcome as long as you follow our code of conduct!