add uuid lib
This commit is contained in:
parent
74e0a48ea5
commit
78293db515
|
@ -95,7 +95,7 @@ pub fn build(b: *std.build.Builder) void {
|
||||||
const gen = vkgen.VkGenerateStep.init(b, "etc/vk.xml", "vk.zig");
|
const gen = vkgen.VkGenerateStep.init(b, "etc/vk.xml", "vk.zig");
|
||||||
|
|
||||||
exe.addPackage(gen.package);
|
exe.addPackage(gen.package);
|
||||||
|
exe.addPackage(pkgs.uuid);
|
||||||
exe.addPackage(pkgs.glfw);
|
exe.addPackage(pkgs.glfw);
|
||||||
|
|
||||||
build_glfw.link(b, exe, .{});
|
build_glfw.link(b, exe, .{});
|
||||||
|
|
|
@ -6,3 +6,4 @@ git https://github.com/SpexGuy/Zig-ImGui.git 0a2cfca89de2ef1ff5a346c6e2c29e8b334
|
||||||
git https://github.com/SpexGuy/Zig-ImGui.git 0a2cfca89de2ef1ff5a346c6e2c29e8b3347d2e3 zig-imgui/imgui_build.zig 0a2cfca89de2ef1ff5a346c6e2c29e8b3347d2e3
|
git https://github.com/SpexGuy/Zig-ImGui.git 0a2cfca89de2ef1ff5a346c6e2c29e8b3347d2e3 zig-imgui/imgui_build.zig 0a2cfca89de2ef1ff5a346c6e2c29e8b3347d2e3
|
||||||
git https://github.com/viviicat/Zig-VMA.git 643c98344cd921cef25c66fd0f35005c53a3e459 vma_build.zig 643c98344cd921cef25c66fd0f35005c53a3e459
|
git https://github.com/viviicat/Zig-VMA.git 643c98344cd921cef25c66fd0f35005c53a3e459 vma_build.zig 643c98344cd921cef25c66fd0f35005c53a3e459
|
||||||
git https://github.com/viviicat/Zig-VMA.git 643c98344cd921cef25c66fd0f35005c53a3e459 vma.zig 643c98344cd921cef25c66fd0f35005c53a3e459
|
git https://github.com/viviicat/Zig-VMA.git 643c98344cd921cef25c66fd0f35005c53a3e459 vma.zig 643c98344cd921cef25c66fd0f35005c53a3e459
|
||||||
|
git https://github.com/dmgk/zig-uuid.git 9895f72f67d463b6bd616cc63dcfe70d12dc53b9 uuid.zig 9895f72f67d463b6bd616cc63dcfe70d12dc53b9
|
||||||
|
|
5
gyro.zzz
5
gyro.zzz
|
@ -19,6 +19,11 @@ deps:
|
||||||
url: "https://github.com/viviicat/Zig-VMA.git"
|
url: "https://github.com/viviicat/Zig-VMA.git"
|
||||||
ref: 643c98344cd921cef25c66fd0f35005c53a3e459
|
ref: 643c98344cd921cef25c66fd0f35005c53a3e459
|
||||||
root: vma.zig
|
root: vma.zig
|
||||||
|
uuid:
|
||||||
|
git:
|
||||||
|
url: "https://github.com/dmgk/zig-uuid.git"
|
||||||
|
ref: 9895f72f67d463b6bd616cc63dcfe70d12dc53b9
|
||||||
|
root: uuid.zig
|
||||||
build_deps:
|
build_deps:
|
||||||
build_vulkan:
|
build_vulkan:
|
||||||
git:
|
git:
|
||||||
|
|
|
@ -0,0 +1,20 @@
|
||||||
|
const std = @import("std");
|
||||||
|
const ExtUUID = @import("uuid");
|
||||||
|
|
||||||
|
pub const zero = ExtUUID.zero;
|
||||||
|
|
||||||
|
pub const UUID = struct {
|
||||||
|
pub const init = ExtUUID.init;
|
||||||
|
pub const format = ExtUUID.format;
|
||||||
|
pub const parse = ExtUUID.parse;
|
||||||
|
|
||||||
|
pub fn find(names: []const UUID, name: UUID) ?i32 {
|
||||||
|
for (names) |n, i| {
|
||||||
|
if (std.mem.eql([16]u8, n.bytes, name.bytes)) {
|
||||||
|
return i;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
};
|
Loading…
Reference in New Issue