Earlier quoted context omitted.
Zig actually bundles LLVM's Clang, which it uses to compile C with the `zig cc` command. But the long term goal seems to not be so tightly coupled to LLVM, so I'm expecting that to move elsewhere. They still do some clever stuff around compiler-rt, allowing it to be better at cross-compilation than raw Clang, but the bulk of it is mostly just Clang. There is also another C compiler written in Zig, Aro[1], which seems…
They're not planning on dropping Clang.
Writing a C Compiler, in Zig (2025)
21–30 of 74 posts
Re: Writing a C Compiler, in Zig (2025)
#22Earlier quoted context omitted.
They're not planning on dropping Clang.
They kinda are: "This issue is to fully eliminate LLVM, Clang, and LLD libraries from the Zig project." https://github.com/ziglang/zig/issues/16270
Re: Writing a C Compiler, in Zig (2025)
#23Earlier quoted context omitted.
They kinda are: "This issue is to fully eliminate LLVM, Clang, and LLD libraries from the Zig project." https://github.com/ziglang/zig/issues/16270
I find that a very bold move, how will they reivent the wheel on the man-years of optimization work went into LLVM to their own compiler infrastructure?
Re: Writing a C Compiler, in Zig (2025)
#24Earlier quoted context omitted.
They kinda are: "This issue is to fully eliminate LLVM, Clang, and LLD libraries from the Zig project." https://github.com/ziglang/zig/issues/16270
I find that a very bold move, how will they reivent the wheel on the man-years of optimization work went into LLVM to their own compiler infrastructure?
we should really happy that language evolution has started again. language monoculture was really dreary and unproductive.
20 years ago you would be called insane for throwing away all the man-years of optimization baked into oracle, and I guess postgres or mysql if you were being low rent. and look where we are today, thousands of people can build databases.
Re: Writing a C Compiler, in Zig (2025)
#25Earlier quoted context omitted.
I think Rust is "higher level" than C or Zig in the sense that there are most abstractions than C or Zig. Its not Javascript, but it is possible to program Rust without worrying too much about low level concerns.
Which is still a crazy claim considering Rust is often told about having strong bureaucracy around even sharing variables (borrow checker).
The actual hard part of Rust is dealing with async, especially when building libraries. But thats the cost of a zero-cost async abstraction I suppose.
Re: Writing a C Compiler, in Zig (2025)
#26Looking 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...
Feels like maybe something lost in translation with their explanation - they say they were fed up of data structures etc. but they returned to Rust? I’m assuming there’s something a bit more nuanced about what they got tired of with Zig
Re: Writing a C Compiler, in Zig (2025)
#27Earlier quoted context omitted.
They're not planning on dropping Clang.
They kinda are: "This issue is to fully eliminate LLVM, Clang, and LLD libraries from the Zig project." https://github.com/ziglang/zig/issues/16270
Re: Writing a C Compiler, in Zig (2025)
#28Looking 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...
> I do not know if it is me being bored with the project, or annoyed with having to build and design a data structure, that has soured me on this project. But I have really at this point lost most motivation to continue this chapter. The way Zig is designed, it makes me deal with the data structure and memory management complexity head on, and it is tiresome. It is not "simpler" than, say, Rust: it just leaves the programmer to deal with the complexity, gaslighting the user claiming it is absolutely necessary.
[0] https://github.com/asibahi/paella/blob/main/writeup/c19.md#u...
Re: Writing a C Compiler, in Zig (2025)
#29Re: Writing a C Compiler, in Zig (2025)
#30Earlier quoted context omitted.
I agree with you that package management has nothing to do with how low-level a language is. That being said Rust is definitely a much higher level language than either C or Zig. The availability of `Arc` and `Box`, the existence and reliance on `drop`, and all of `async` are things that just wouldn't exist in Zig and allow Rust programmers to think at higher levels of abstraction when it comes to memory management.…
> That being said Rust is definitely a much higher level language than either C or Zig. The availability of `Arc` and `Box`, the existence and reliance on `drop` I mean, C++ have RAII and stuff like unique pointer, does that make it higher level than Zig? And what if you don't use Arc or Box? Is your program now lower level than baseline Rust? As I said, depends a lot about what you mean by low level.