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.
The commit addresses the outdated zig version used in the library. While most of the code can use the same treatment by updating callconv(.c) and the build structure of build.zig; there are two changes might require follow up though:
As discussed in this issue, we can directly remove the usingnamespace keyword surrounding the function, but since emscripten_sleep(1) is exclusive for emscripten build, I ended up conditionally build the function by checking if the target platform is emscripten; otherwise, it will be an empty function.
Since I don't have any emscripten project on hands, I might need others to confirm if this implementation works.
Another change is the use of std.BoundedBuffer which is also deprecated in the 0.15.1, and suggested by the release notes, the substitution is to use ArrayListUnmanaged which will also be removed in the future version; thus, I have to use ArrayList, but because ArrayList requires an allocator for appending items, i ended up choosing fixedBufferAllocator like shown:
However, although this solution works and I have successfully to replicate the triangle example from the zig-gamedev with the updated library, the current solution doesn't address the TODO item.