Skip to content

feat: module extension to import Zig packages#669

Draft
aherrmann wants to merge 65 commits into
mainfrom
pkg-import
Draft

feat: module extension to import Zig packages#669
aherrmann wants to merge 65 commits into
mainfrom
pkg-import

Conversation

@aherrmann

Copy link
Copy Markdown
Member

Closes #232

work in progress

Adds a module extension zig_packages that accepts build.zig.zon files, extracts the package dependency graph, and generates package import repos and a hub repo.
Adds a repository rule zig_package that fetches a given Zig package and evaluates the build.zig file to determine the module dependency graph.

aherrmann added 24 commits June 17, 2026 14:28
They are read by zon2json, which is opaque to Bazel.
Zig packages support lazy dependencies that are only fetched when
demanded during `build.zig`. Bazel repo rules do not support this type
of laziness, repo rules themselves are fetched lazily, but only at repo
granularity. So, we fetch eagerly here.
add a test case to confirm the error message
to avoid macos segfault
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.

Consider package manager integration for Zig.

1 participant