forked from mirror/vulkan-zig
update build to use new build API
This commit is contained in:
@@ -37,10 +37,10 @@ pub fn build(b: *Builder) void {
|
||||
const gen = vkgen.VkGenerateStep.create(b, "path/to/vk.xml", "vk.zig");
|
||||
|
||||
// Add the generated file as package to the final executable
|
||||
exe.addPackage(gen.getPackage("vulkan"));
|
||||
exe.addModule("vulkan", gen.getModule());
|
||||
}
|
||||
```
|
||||
This reads vk.xml, parses its contents, and renders the Vulkan bindings to "vk.zig", which is then formatted and placed in `zig-cache`. The resulting file can then be added to an executable by using `addPackage`, after which the bindings will be made available to the executable under the name passed to `getPackage`.
|
||||
This reads vk.xml, parses its contents, and renders the Vulkan bindings to "vk.zig", which is then formatted and placed in `zig-cache`. The resulting file can then be added to an executable by using `addModule`, after which the bindings will be made available to the executable under the name passed to `getModule`.
|
||||
|
||||
### Function & field renaming
|
||||
Functions and fields are renamed to be more or less in line with [Zig's standard library style](https://ziglang.org/documentation/master/#Style-Guide):
|
||||
|
||||
Reference in New Issue
Block a user