move generator/ to src/

A long time ago there was the idea to use src/ for something else,
but that is no longer relevant. Its nice to switch to a more
conventional repo layout.
This commit is contained in:
Robin Voetter
2024-04-28 11:27:49 +02:00
parent c3c9333d73
commit e1f290399e
13 changed files with 4 additions and 4 deletions

View File

@@ -34,7 +34,7 @@ NOTE: you need to replace `path/to/vk.xml` with the spec path from whatever sour
### Generation from build.zig
Vulkan bindings can be generated from the Vulkan XML registry at compile time with build.zig, by using the provided Vulkan generation step:
```zig
const vkgen = @import("vulkan-zig/generator/index.zig");
const vkgen = @import("vulkan-zig/src/index.zig");
pub fn build(b: *Builder) void {
...

View File

@@ -1,5 +1,5 @@
const std = @import("std");
const vkgen = @import("generator/index.zig");
const vkgen = @import("src/index.zig");
pub const ShaderCompileStep = vkgen.ShaderCompileStep;
pub const VkGenerateStep = vkgen.VkGenerateStep;
@@ -15,7 +15,7 @@ pub fn build(b: *std.Build) void {
// a file source to the generated code with `.addOutputArg("vk.zig")`
const generator_exe = b.addExecutable(.{
.name = "generator",
.root_source_file = .{ .path = "generator/main.zig" },
.root_source_file = .{ .path = "src/main.zig" },
.target = target,
.optimize = optimize,
});
@@ -69,7 +69,7 @@ pub fn build(b: *std.Build) void {
triangle_run_step.dependOn(&triangle_run_cmd.step);
const test_target = b.addTest(.{
.root_source_file = .{ .path = "generator/index.zig" },
.root_source_file = .{ .path = "src/index.zig" },
});
const run_test = b.addRunArtifact(test_target);