Skip to content

Add cached per-source custom rules with tracked generated artifacts - #60

Merged
godofecht merged 9 commits into
mainfrom
feat/custom-rule-template-build-graph
Oct 17, 2026
Merged

godofecht merged 9 commits into
mainfrom
feat/custom-rule-template-build-graph

Conversation

@godofecht

@godofecht godofecht commented Oct 17, 2026 •

Copy link
Copy Markdown
Owner

Summary

Implement a scoped native analogue of CMake 4.5 add_custom_rule() using tracked per-source Zig Run actions. CustomRule/CustomRuleBinding accept <SOURCE>, <OUTPUT>, optional tracked <GENERATOR>, and derive overrides; generated C/C++ sources enter compilation through LazyPath. Preserve the existing custom_commands path and migrate the generated-code example to the new API.

Verification

GitHub Actions CI passed on this PR head (cee53d89): all unit-test jobs and the example matrix completed successfully on Zig 0.14.1, 0.15.2, and 0.16.0. The example matrix includes generated-code. CMake interop and corpus jobs also passed. No local Zig binary was available.

Scope

This is intentionally not full CMake 4.5 file-set semantics: one generated source per input, no depfile/byproducts/configurators yet; custom rules currently require Zig native compilation and explicitly enabled system commands. See docs/CUSTOM_RULES.md.

@godofecht
godofecht marked this pull request as ready for review October 17, 2026 13:27
@godofecht
godofecht merged commit f47253e into main Oct 17, 2026
11 checks passed
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.

1 participant