From 933010cfff4ff2ed02ef2998180386e48f504194 Mon Sep 17 00:00:00 2001 From: Robin Voetter Date: Mon, 25 Oct 2021 13:50:36 +0200 Subject: [PATCH] Update readme with new build.zig usage --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 729e7b2..86a8001 100644 --- a/README.md +++ b/README.md @@ -36,10 +36,10 @@ pub fn build(b: *Builder) void { exe.step.dependOn(&gen.step); // Add the generated file as package to the final executable - exe.addPackagePath("vulkan", gen.full_out_path); + exe.addPackage(gen.package); } ``` -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 `addPackagePath`. +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 `vulkan`. ### 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): @@ -231,7 +231,7 @@ pub fn build(b: *Builder) void { const gen = vkgen.VkGenerateStep(b, "path/to/vk.xml", "vk.zig"); exe.step.dependOn(&gen.step); - exe.addPackagePath("vulkan", gen.full_out_path); + exe.addPackage(gen.package); const shader_comp = vkgen.ShaderCompileStep.init( builder,