I’ve been having a lot of fun learning Zig doing Advent of Code puzzles.
This is my first little utility project Zigbar — suggestion for better name welcome! It generates a prompt for ZSH showing the current project git branch, language, etc.
I run this build in a GitHub action to generate releases.
I then wrote a self-update command so that I can run zigbar update which fetches, verifies, and updates the binary. (I’m embedding the minisign public key during the build process.)
I like that the JSON parser in the Zig std lib allows partial schema, e.g:
Nice! I was thinking of adding a signed release workflow to Liza, but I actually found it easier to update Zig executable projects by simply git pulling latest changes, building with zig build exe and already having their installed executables (zig-out/bin/exe) in $PATH.
Building from source does require zig, but downloading binaries requires a dependency as well – minisign. It’s a choice, but for small enough projects building from source is also viable.
I’m using zig-minisign library for verification, so it’s a dependency that can be compiled in without needed the full minisign for updating which is nice.
I do actually just use git to distribute many of my projects, especially since I use JavaScript for most things!
zshbar does not appear to be taken. That’s better: it isn’t a bar for Zig, it’s a bar for ZSH.
Especially in the early, heady stage of learning a new language, people often want to tag their projects with the name of that language. This is almost never a good idea. Unless Zig, the language, is the topic of the project, it doesn’t need to be in the name, and should not be.