←back to thread

Zig is hard but worth it

(ratfactor.com)
401 points signa11 | 6 comments | | HN request time: 0.683s | source | bottom
1. ok123456 ◴[] No.36152055[source]
One annoying thing I ran into when trying zig is they don't distribute debs any more for Debian distributions. They just tell you to use a snap. I don't have snap, and don't want it.

Compiling it requires the latest llvm toolchian (16), which is only realistically going to be available as a package if you're on a bleeding edge distribution.

replies(4): >>36152162 #>>36152563 #>>36154601 #>>36158861 #
2. pacaro ◴[] No.36152162[source]
I understand this, but haven't found this to be an issue personally. I just download the pre built tarball, expand it, make sure that /opt/zig-latest symlinks to the right folder, and setup path

That's more work than apt-get install for sure, but not so much more

replies(1): >>36154333 #
3. netule ◴[] No.36152563[source]
Zig's in the process of getting added to the mainline Debian repositories: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=995670

Hopefully, this process will continue soon as the bug seems to be getting a bit stale.

4. hellcow ◴[] No.36154333[source]
You can also use something like zigup to make fetching the latest master/managing multiple versions easier.
5. eatonphil ◴[] No.36154601[source]
What's wrong with downloading the binary? curl + mv + chown should do it?
6. AndyKelley ◴[] No.36158861[source]
let me clarify some facts.

1. we never distributed debs for debian distributions. I have, however, been patiently collaborating with Debian maintainers with regards to the zig ITP: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=995670

2. we don't tell you to "just use a snap.". Please see https://github.com/ziglang/zig/#installation

3. we tag releases soon after llvm tags releases for the convenience of package maintainers. Distributions with LLVM 14 can package Zig 0.9.1; distributions with LLVM 15 can package Zig 0.10.1, etc.