Skip to content

Commit

Permalink
[update #0] add jdz allocator for later usage
Browse files Browse the repository at this point in the history
  • Loading branch information
root committed Jul 20, 2024
1 parent e73abff commit 704509c
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
8 changes: 8 additions & 0 deletions build.zig
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,12 @@ fn import (builder: *std.Build, exe: *std.Build.Step.Compile,
});
const datetime = datetime_dep.module ("zig-datetime");

const jdz_dep = builder.dependency ("jdz_allocator", .{
.target = profile.target,
.optimize = profile.optimize,
});
const jdz = jdz_dep.module ("jdz_allocator");

const c = try link (builder, profile);
const glfw_pkg = try glfw.import (builder, profile, c);
const vk_pkg = try vk.import (builder, profile, c);
Expand All @@ -195,6 +201,7 @@ fn import (builder: *std.Build, exe: *std.Build.Step.Compile,
});
logger.addImport ("build", build_options);
logger.addImport ("datetime", datetime);
logger.addImport ("jdz", jdz);

const instance = builder.createModule (.{
.root_source_file = .{ .cwd_relative = try builder.build_root.join (
Expand All @@ -208,6 +215,7 @@ fn import (builder: *std.Build, exe: *std.Build.Step.Compile,

for ([_] struct { name: [] const u8, ptr: *std.Build.Module, } {
.{ .name = "datetime", .ptr = datetime, },
.{ .name = "jdz", .ptr = jdz, },
.{ .name = "shader", .ptr = shaders_module, },
.{ .name = "glfw", .ptr = glfw_pkg.module, },
.{ .name = "vk", .ptr = vk_pkg.module, },
Expand Down
8 changes: 6 additions & 2 deletions build.zig.zon
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,12 @@
.hash = "1220a2ee465849f3b4462fc4079d7a0dae566671e730678b4b965b98547707253981",
},
.@"zig-datetime" = .{
.url = "https://github.com/frmdstryr/zig-datetime/archive/eb05569fc75a18b343f9992e5e628c2b69456d10.tar.gz",
.hash = "1220f7f4a9210f6ce3949446276566b0a22775e85dc6b81daf7aae55e0ec5588f4dc",
.url = "https://github.com/frmdstryr/zig-datetime/archive/70aebf28fb3e137cd84123a9349d157a74708721.tar.gz",
.hash = "122077215ce36e125a490e59ec1748ffd4f6ba00d4d14f7308978e5360711d72d77f",
},
.jdz_allocator = .{
.url = "https://github.com/joadnacer/jdz_allocator/archive/ea14e0efc3328a6b9e7dd53bb91b9eec2efe3f96.tar.gz",
.hash = "12205353c7f550b1aadf245d70a30d5a0a92eb151f735e15358ff35fcfe53343c93f",
},
},
}

0 comments on commit 704509c

Please sign in to comment.