Skip to content

Commit 688910b

Browse files
add explicit module
1 parent 45156c4 commit 688910b

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

build.zig

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@ pub fn build(b: *std.Build) void {
44
const target = b.standardTargetOptions(.{});
55
const optimize = b.standardOptimizeOption(.{});
66

7+
const datetime = b.addModule("datetime", .{
8+
.root_source_file = b.path("src/root.zig"),
9+
});
10+
711
const lib = b.addStaticLibrary(.{
812
.name = "datetime",
913
.root_source_file = b.path("src/root.zig"),
@@ -25,7 +29,7 @@ pub fn build(b: *std.Build) void {
2529
.target = target,
2630
.optimize = optimize,
2731
});
28-
demo.root_module.addImport("datetime", &lib.root_module);
32+
demo.root_module.addImport("datetime", datetime);
2933
const run_demo = b.addRunArtifact(demo);
3034

3135
const test_step = b.step("test", "Run unit tests");

build.zig.zon

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
.{
22
.name = "datetime",
3-
.version = "0.0.1",
3+
.version = "0.0.3",
44
.paths = .{
55
"build.zig",
66
"build.zig.zon",

0 commit comments

Comments
 (0)