Skip to content

Commit 83a4ece

Browse files
committed
make examples build for 0.13.0
1 parent 17e8ef0 commit 83a4ece

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

examples/build.zig

+4-4
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ const examples = .{
99
"dry-run",
1010
};
1111

12-
pub fn build(b: *std.build.Builder) void {
12+
pub fn build(b: *std.Build) void {
1313
const target = b.standardTargetOptions(.{});
1414
const optimize = b.standardOptimizeOption(.{});
1515

@@ -21,14 +21,14 @@ pub fn build(b: *std.build.Builder) void {
2121

2222
const exe = b.addExecutable(.{
2323
.name = exe_name,
24-
.root_source_file = .{ .path = example_path },
24+
.root_source_file = b.path(example_path),
2525
.target = target,
2626
.optimize = optimize,
2727
});
2828
const mod = b.addModule("dotenv", .{
29-
.source_file = .{ .path = "../src/lib.zig" },
29+
.root_source_file = b.path("../src/lib.zig"),
3030
});
31-
exe.addModule("dotenv", mod);
31+
exe.root_module.addImport("dotenv", mod);
3232
exe.linkSystemLibrary("c");
3333

3434
b.installArtifact(exe);

0 commit comments

Comments
 (0)