Merged
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR updates the zaudio library to be compatible with Zig 0.15.1, addressing compilation issues by replacing deprecated APIs and updating standard library usage patterns.
Key changes:
- Updated build script to use new Zig 0.15.1 APIs for library creation and module management
- Replaced deprecated
callconv(.C)withcallconv(.c)throughout the codebase - Updated memory allocation and standard library function calls to match new API signatures
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| build.zig.zon | Updates minimum Zig version requirement to 0.15.1 |
| build.zig | Replaces deprecated addStaticLibrary with new module/library creation pattern |
| src/zaudio.zig | Updates calling conventions, memory alignment API, ArrayList deinit, and sleep function calls |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
| const mem = mem_allocator.?.alignedAlloc( | ||
| u8, | ||
| mem_alignment, | ||
| .fromByteUnits(mem_alignment), |
There was a problem hiding this comment.
The fromByteUnits method expects a power-of-2 alignment value. Consider validating that mem_alignment (16) is a valid alignment or use a compile-time assertion to ensure this constraint is met.
hazeycode
added a commit
that referenced
this pull request
Aug 31, 2025
fourlexboehm
pushed a commit
to fourlexboehm/zaudio
that referenced
this pull request
Jan 18, 2026
+ bump .zigversion
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Fixes compilation (on Windows at least) with the just released zig 0.15.1
addStaticLibraryandroot_source_file)callconv(.C)forcallconv(.c)alignedAlloctakes astd.mem.Alignmentinstead of an arbitrary intstd.time.sleep->std.Thread.sleepdeinittakes an allocator)Only tested on Windows and in a very small program as I'm still in the process of migrating my own projects.
Hope this is still useful!