Is it possible to move these to a new location? I want them to all go into repo/.zig or repo/tmp/zig or something to simplify my gitignore…
zig-out can be changed with the --prefix, -p flag. (since the default structure mimics most systems you can use this to install software!)
there are also more specific --prefix-lib-dir, --prefix-exe-dir and --prefix-include-dir
.zig-cache can be changed with --cache-dir, also --global-cache-dir if you ever want to change that.
Unfortunately it does not seem like you can change zig-pkg yet.
1 Like
someone beat me to making a pr https://codeberg.org/ziglang/zig/pulls/31950
Ah, excellent. Thanks vulpesx, your responses here are really appreciated…
I am messing with these justfile rules in case anyone is curious:
build: (_zig "-Doptimize=Debug")
build-release: (_zig "-Doptimize=ReleaseSmall")
build-windows: (_zig "-Dtarget=x86_64-windows-gnu")
...
test: (_zig "test --summary all")
# REMIND: add --pkg-dir when possible
_zig +ARGS:
zig build -p tmp/zig-out --cache-dir tmp/zig-cache {{ARGS}}