3 ms·
Zig does not have a good package manager, does it?
by Thaxll 3y ago
Zig does not have a good package manager, does it?
- bsder 3y agoI don't believe Zig wants to have "package manager" at all. It has the ability to pull in a package/module. However, I believe that having a "package manager" is explicitly an anti-goal. I'm in agreement. It's become pretty clear that having any form of "package repository" without also allocating the necessary manpower to curate that repository causes disasters.
- wavemode 3y ago> I don't believe Zig wants to have "package manager" at all. ? it's literally one of the project's main milestones: https://github.com/ziglang/zig/projects?type=classic https://github.com/ziglang/zig/projects?type=classic
- bsder 3y agoWe're probably talking past one another due to my imprecision: Zig can manage packages. It can pull in a Zig package using a reference to a Git repository on GitHub, for example. It can pin that to a hash and cache it. It can specify dependencies. This is, strictly speaking, a "package manager" but is not what people normally think of when you mention that. Zig does not have blessed mechanisms that pull from a central repository of packages. Having a central repository is normally what people think of when they talk about a "package manager" (node, cargo, deno, etc.). Yes, those managers could conceivably not use the central repository and specify everything explicitly, but nobody ever uses them like that.
- papichulo2023 3y agoSo same as Golang? Still package manager though.
- baby 3y agoThat sounds like a horrible decision
- rofrol 3y agoit has package manager as golang has. Just no central repository of packages. https://ziggit.dev/t/build-system-tricks/3531 https://ziggit.dev/t/build-system-tricks/3531
- eyegor 3y agoIt has one now, but I haven't played around enough to call it "good" or "bad". It feels more like a hack than something like cargo/pip/nuget/npm/etc, but it's a lot better than the normal c/cpp experience. build.zig.zon discussion: https://zig.news/edyu/zig-package-manager-wtf-is-zon-2-0110-update-1jo3 https://zig.news/edyu/zig-package-manager-wtf-is-zon-2-0110-... Example howto: https://ziggit.dev/t/how-to-package-a-zig-source-module-and-how-to-use-it/3457 https://ziggit.dev/t/how-to-package-a-zig-source-module-and-... Actual docs: https://ziglang.org/download/0.11.0/release-notes.html#Package-Management https://ziglang.org/download/0.11.0/release-notes.html#Packa...
- papichulo2023 3y agoAre you experienced with vcpkg or just repeating old facts? Considering you are merging c and cpp seems the earlier. I would take vcpkg over npm or pip any day.
- galangalalgol 3y agoThe problem with vcpkg is the problem with conan, bazel, meson, or hunter. There isn't just one, and they don't reliably play well with each other so that when I receive or deliver a dependency to some other organization, they work together.
- AndyKelley 3y agoI think the upcoming 0.12 release will be a good time to try it out. It was a major focus during this release cycle.
- otabdeveloper4 3y agoYou shouldn't need one. Use Nix instead, they did 99% of the work for you already.
- rofrol 3y ago> Zig does not have a good package manager, does it? This describes upcoming changes in zig 0.12 https://ziggit.dev/t/build-system-tricks/3531 https://ziggit.dev/t/build-system-tricks/3531