Skip to content

Fix README.md: make examples compile and make more consistent#49

Merged
hazeycode merged 1 commit intozig-gamedev:mainfrom
Pivok7:main
Feb 28, 2026
Merged

Fix README.md: make examples compile and make more consistent#49
hazeycode merged 1 commit intozig-gamedev:mainfrom
Pivok7:main

Conversation

@Pivok7
Copy link
Contributor

@Pivok7 Pivok7 commented Feb 28, 2026

I decided to check and test the README.md more in depth and found several issues so i fixed them.

  • In my previous commit i missed that vulkan integration example has the problem with non debug builds (mentioned in here Wont compile with anything but debug #35) and added .target and .optimize fields to fix that.

  • Vulkan headers line was missing a second parameter

                                                      vvv here
const vulkan_headers = b.dependency("vulkan_headers", .{}); 
  • create window example had a missing fifth parameter

Cosmetic changes

  • I changed the Vulkan dependency name from "vulkan_zig" to "vulkan" as that's how it appears in build.zig.zon by default after fetching.

  • I changed the first build.zig example to be more self contained and copy-paste friendly

  • I made the Vulkan integration example more concise and more similar to the original build.zig mentioned above so that it can be updated with minimal effort.

@hazeycode
Copy link
Member

Thanks!

@hazeycode hazeycode merged commit 0dd29d8 into zig-gamedev:main Feb 28, 2026
3 checks passed
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.

2 participants