Hacker Timesnew | past | comments | ask | show | jobs | submitlogin

is zig running well on mac?

We have local developer environment and we deal quite often with python, go, or some brew packages version not being correctly installed before starting the tools.

would that be a good usecase for zig?



I use Zig on Mac, Windows and Linux (but most on Mac). It works without issues (also as a Clang compatible C/C++/ObjC compiler and linker replacement).

I would recommend managing the Zig installation through a tool like zvm (https://github.com/tristanisham/zvm). This lets you easily update to the latest dev version and switch between stable versions (similar to rustup or nvm).

The other install options are working too of course (install via brew - although in the past this was a bit brittle, or download and unpack prebuilt archives https://ziglang.org/download/) but those options are not as convenient for switching between the stable and dev version.


(I had been using zigup.) Interesting that they are using Go for this tool - not sure how that makes me feel!


I guess zvm was created before zig's package management solution (which added network and archive support to the stdlib). With those in place a zvm written in zig would be just as trivial as in go.


Do you mean using Zig to compile the native libraries for python, go, etc? Sure, the build scripts would need to be updated to use `zig cc`. Zig is already packaged for brew so they could add it as a build dependency.

But it is still pre 1.0 so expect new versions to break old-ish code. I'd say package managers should wait for the 1.0 release.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: