Skip to content

feat(zig): be less strict on the zig executable#643

Merged
dmtrKovalenko merged 1 commit into
dmtrKovalenko:mainfrom
chpf:dont-be-overly-restrictive-on-zig
Jul 1, 2026
Merged

feat(zig): be less strict on the zig executable#643
dmtrKovalenko merged 1 commit into
dmtrKovalenko:mainfrom
chpf:dont-be-overly-restrictive-on-zig

Conversation

@chpf

@chpf chpf commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

Some zig version managers (notably the popular https://github.com/marler8997/anyzig ) hog the zig executable.
Anyzig in particular does not return success on an invocation without a build.zig.zon with the field minimum_zig_version in the cwd.

This change makes the zig executable check less strict on the assumptions of the zig executable and simply checks if it is present and callable.
This change makes cargo build work when zig is installed via anyzig.

Works on my machine™️

@dmtrKovalenko

Copy link
Copy Markdown
Owner

that's cool - will it figure out that this project requires 0.16 version of zig ?

@chpf

chpf commented Jul 1, 2026

Copy link
Copy Markdown
Contributor Author

Anyzig looks at the build.zig.zon of the folder and downloads/executes whatever version is specified in the minimum_zig_version field. Its works with master-commits, version tags and whatever seamlessly. I've been using it for a while since it essentially removes the need to think about what zig I've installed for which project as long as it uses the zig build system.

I can't see the CI failure btw. Github just shows an empty error box and shat itself. Since this change was tiny I just tested it locally on windows 11, don't know what went wrong.

@dmtrKovalenko dmtrKovalenko merged commit 3826905 into dmtrKovalenko:main Jul 1, 2026
50 of 51 checks passed
@chpf chpf deleted the dont-be-overly-restrictive-on-zig branch July 1, 2026 17:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants