Update README.md

Substitute `.addImport(..)` with `.root_module.addImport(..)` as the former seems to be gone.
This commit is contained in:
Emil Lai
2024-08-09 23:24:37 +02:00
committed by GitHub
parent d7ad51c9b8
commit 543381c7dc

View File

@@ -54,7 +54,7 @@ const vkzig_dep = b.dependency("vulkan_zig", .{
.registry = @as([]const u8, b.pathFromRoot("path/to/vk.xml")), .registry = @as([]const u8, b.pathFromRoot("path/to/vk.xml")),
}); });
const vkzig_bindings = vkzig_dep.module("vulkan-zig"); const vkzig_bindings = vkzig_dep.module("vulkan-zig");
exe.addModule("vulkan", vkzig_bindings); exe.root_module.addImport("vulkan", vkzig_bindings);
``` ```
That will allow you to `@import("vulkan")` in your executable's source. That will allow you to `@import("vulkan")` in your executable's source.