Comment by runevault
2 years ago
With the amount Zig promoted being able to use it to compile c (and maybe c++ I forget) only to decide no LLVM at all seems wild. Without a LOT more people chipping in to support the odds of even coming close to the platform support of LLVM seems incredibly unlikely as well. I would understand planning to add another backend of their own for those who want that, but just getting rid of LLVM seems... rash?
It might be rash if work had already started on it, but as with the other proposals on the issue tracker not labeled with "accepted", this is just a call for discussion and counter-proposals. At this point it's just the team collecting feedback, learning about affected use cases, and gauging feasibility -- opposite of rash, I'd say.
If you read the text in the linked issue you'll see that there they're not entirely removing the LLVM backend. They're just decoupling it from the main binary, so you can still easily use LLVM as a backend if you have it installed on your system.
Makes sense, kind of silly to have to bundle a 100MB+ copy of LLVM if you don't need it for the common case, and if you're a developer you'll probably have it installed already anyway.
The problem could be that it'll be hard to guarantee that your Zig installation works properly with the version of LLVM you have installed? We'll see..
It’ll still output LLVM bitcode, but it won’t depend on LLVM libs anymore
https://github.com/ziglang/zig/issues/13265
This was exactly my take on it.
I'd recently been reading a bit more about zig, and even tried out using it as an easy way to compile c++ with llvm without having to fuss with system packages -- transitioning from c/c++ to zig was a major selling point
It just seems really abrupt, certainly unexpected. I'm not saying it's the right/wrong thing for the project -- just really really out of left field from my point of view
I did the pre-1.0 language thing once with Clojure and don't really feel like doing it again, but I've certainly been keeping my eye on Zig because it has some interesting ideas. But this set of changes, even if it is still possible to wire it up yourself, makes me way less interested.
>and maybe c++ I forget
I use Zig as a C++ compiler on my Rust project since it was the least painful way to do cross-compilation in GitHub Actions.