Skip to content

feat(rules): Zig .zig-cache and zig-out - #19

Merged
Finjineersdev merged 1 commit into
mainfrom
rules-zig
Dec 1, 2026
Merged

Finjineersdev merged 1 commit into
mainfrom
rules-zig

Conversation

@Finjineersdev

Copy link
Copy Markdown
Owner

What

Adds a rule for Zig projects (build.zig in the folder):

Path Class Restore
.zig-cache Safe zig build
zig-cache (Zig 0.12 and older) Safe zig build
zig-out Safe zig build

Source: https://ziglang.org/learn/build-system/ ("There are two generated directories in this output: .zig-cache and zig-out"; zig-out is the "installation prefix").

Adds zig.toml to BUNDLED, match fixtures for both cache names, a nomatch fixture without build.zig, and the README table row.

Closes #18

How tested

  • rule_fixtures_produce_the_expected_candidates covers the new fixtures; plan --rules engine/rules on a copy of the match fixture lists .zig-cache and zig-out as Safe.
  • Engine checks: fmt ok, clippy ok, cargo test --locked 148 passed, rules-check 13 rule files, 37 artifacts: ok (snapshot updated).

Note: this and the Haskell rule PR both add a line to BUNDLED, the README table and the rules-check snapshot, so whichever merges second needs a small rebase.

A Zig project (build.zig in the folder) writes two folders on every
`zig build`: the local cache .zig-cache and the install prefix zig-out
("There are two generated directories in this output: `.zig-cache` and
`zig-out`", https://ziglang.org/learn/build-system/). Zig 0.12 and older
named the cache zig-cache, so that name is offered too. All three are
Safe: the next zig build recreates them with no download.

Adds zig.toml to BUNDLED, match fixtures for both cache names, a
nomatch fixture without build.zig, and the README table row. The
rules-check snapshot counts 13 files and 37 artifacts.
@Finjineersdev
Finjineersdev merged commit 741b5b9 into main Dec 1, 2026
6 checks passed
@Finjineersdev
Finjineersdev deleted the rules-zig branch December 1, 2026 09:52
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.

Zig projects: offer .zig-cache and zig-out

1 participant