-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
std.Build: support exposing and depending on zig modules #14538
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
New API introduced: std.Build.addModule This function exposes a zig module with the given name, which can be used by packages that depend on this one via std.Build.Dependency.module. std.Build.Pkg and related functionality is deleted. Every use case has a straightforward upgrade path using the new Module struct. std.Build.OptionsStep.getPackage is replaced by std.Build.OptionsStep.createModule. std.Build.CompileStep.addPackagePath is replaced by std.Build.CompileStep.addAnonymousModule. This partially addresses #14307 by renaming some of the instances of "package" to "module". Closes #14278
mitchellh
added a commit
to mitchellh/libxev
that referenced
this pull request
Feb 5, 2023
Addresses the updates from ziglang PR ziglang/zig#14538
usdogu
added a commit
to extism/zig-pdk
that referenced
this pull request
Feb 7, 2023
rrbutani
added a commit
to rrbutani/rosettaboy
that referenced
this pull request
Feb 8, 2023
This is needed for the nix package to build on macOS. Also bumps the zig deps and has `build.zig` changes to match ziglang/zig#14498 and ziglang/zig#14538.
jbboehr
pushed a commit
to jbboehr/rosettaboy
that referenced
this pull request
Feb 9, 2023
This is needed for the nix package to build on macOS. Also bumps the zig deps and has `build.zig` changes to match ziglang/zig#14498 and ziglang/zig#14538.
jbboehr
pushed a commit
to jbboehr/rosettaboy
that referenced
this pull request
Feb 10, 2023
This is needed for the nix package to build on macOS. Also bumps the zig deps and has `build.zig` changes to match ziglang/zig#14498 and ziglang/zig#14538.
jbboehr
pushed a commit
to jbboehr/rosettaboy
that referenced
this pull request
Feb 10, 2023
This is needed for the nix package to build on macOS. * bump the zig deps and has `build.zig` changes to match ziglang/zig#14498 and ziglang/zig#14538. * only change preInstall on darwin * drop the `SDL2` lowercase fix - doesn't appear to be necessary anymore. * upgrade zig in github actions and pass in nim/zig versions (@jbboehr)
jbboehr
pushed a commit
to jbboehr/rosettaboy
that referenced
this pull request
Feb 10, 2023
This is needed for the nix package to build on macOS. * bump the zig deps and has `build.zig` changes to match ziglang/zig#14498 and ziglang/zig#14538. * only change preInstall on darwin * drop the `SDL2` lowercase fix - doesn't appear to be necessary anymore. * upgrade zig in github actions and pass in nim/zig versions (@jbboehr)
jbboehr
pushed a commit
to jbboehr/rosettaboy
that referenced
this pull request
Feb 10, 2023
This is needed for the nix package to build on macOS. * bump the zig deps and has `build.zig` changes to match ziglang/zig#14498 and ziglang/zig#14538. * only change preInstall on darwin * drop the `SDL2` lowercase fix - doesn't appear to be necessary anymore. * upgrade zig in github actions and pass in nim/zig versions (@jbboehr)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
breaking
Implementing this issue could cause existing code to no longer compile or have different behavior.
enhancement
Solving this issue will likely involve adding new logic or components to the codebase.
zig build system
std.Build, the build runner, `zig build` subcommand, package management
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
New API introduced: std.Build.addModule
This function exposes a zig module with the given name, which can be used by packages that depend on this one via std.Build.Dependency.module.
std.Build.Pkg and related functionality is deleted. Every use case has a straightforward upgrade path using the new Module struct.
std.Build.OptionsStep.getPackage is replaced by
std.Build.OptionsStep.createModule.
std.Build.CompileStep.addPackagePath is replaced by std.Build.CompileStep.addAnonymousModule.
This partially addresses #14307 by renaming some of the instances of "package" to "module", which is why this pull request is marked as "breaking".
real-world example usage
Closes #14278