Zq: Command-line ZON processor

Hi, I’ve started a jq-like utility project but for ZON. Seeing how quickly ZON is being developed and adopted in the compiler, it might prove useful already.

So, if you’re using Zig master, try running this in the zq repo:

zig targets | zig build exe -- -r .libc
10 Likes

Thanks for working on this, this will be very useful!

Note that the README on Codeberg refers to a github repo which either doesn’t exist or is private. EDIT: This is now fixed

3 Likes

Added -s, --set option for setting simple fields:

zq -i build.zig.zon -o build.zig.zon -s 1.0.0 .version

That way, depending on zq will allow user packages to define build steps that update .version and .minimum_zig_version in their build.zig.zon (it’ll be even easier once we’re able to import build.zig.zon in build.zig).

3 Likes

You can now import zq as a module!

Here’s how liza uses it to initialize the package fingerprint for you:

2 Likes