Skip to content

Use rules_zig for Windows prebuild actions#1237

Merged
frankslin merged 1 commit into
BYVoid:masterfrom
frankslin:bazel-build-refactoring
May 20, 2026
Merged

Use rules_zig for Windows prebuild actions#1237
frankslin merged 1 commit into
BYVoid:masterfrom
frankslin:bazel-build-refactoring

Conversation

@frankslin
Copy link
Copy Markdown
Collaborator

Remote Linux builds execute the Windows prebuild genrules in a clean Bazel action environment, where a host-installed zig binary is not available on PATH. This caused //node:opencc_node_windows_zig to fail with zig: command not found under BuildBuddy remote execution.

Add the BCR rules_zig module, register its Zig toolchains, and wire the Node and Jieba Windows prebuild genrules to the resolved Zig toolchain via $(ZIG_BIN). This keeps the existing shell scripts reusable while making the Zig executable a declared Bazel toolchain input.

Use Zig 0.15.2 because rules_zig 0.14.0 bundled version index exposes 0.15.2 and 0.16.0, not 0.14.1. Bump rules_cc to 0.2.18 to match the version selected by rules_zig and avoid a Bzlmod direct-dependency mismatch.

Remote Linux builds execute the Windows prebuild genrules in a clean Bazel action environment, where a host-installed zig binary is not available on PATH. This caused //node:opencc_node_windows_zig to fail with zig: command not found under BuildBuddy remote execution.

Add the BCR rules_zig module, register its Zig toolchains, and wire the Node and Jieba Windows prebuild genrules to the resolved Zig toolchain via $(ZIG_BIN). This keeps the existing shell scripts reusable while making the Zig executable a declared Bazel toolchain input.

Use Zig 0.15.2 because rules_zig 0.14.0 bundled version index exposes 0.15.2 and 0.16.0, not 0.14.1. Bump rules_cc to 0.2.18 to match the version selected by rules_zig and avoid a Bzlmod direct-dependency mismatch.
@frankslin frankslin merged commit 956708c into BYVoid:master May 20, 2026
32 checks passed
@frankslin frankslin deleted the bazel-build-refactoring branch May 20, 2026 18:19
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