Update to zig 0.12.0 (#2)

This commit is contained in:
Vesim
2024-04-26 23:17:36 +02:00
committed by GitHub
parent 9e4ee57ec2
commit 51c49c38d8
7 changed files with 30 additions and 30 deletions

View File

@@ -24,7 +24,7 @@ pub fn build(b: *std.Build) !void {
const optimize = b.standardOptimizeOption(.{});
// Add the gpio module so it can be used by the package manager
var gpio_module = b.createModule(.{ .source_file = .{ .path = "src/index.zig" } });
const gpio_module = b.createModule(.{ .root_source_file = .{ .path = "src/index.zig" } });
try b.modules.put(b.dupe("gpio"), gpio_module);
// Create a step to build all the examples
@@ -41,7 +41,7 @@ pub fn build(b: *std.Build) !void {
.target = target,
.optimize = optimize,
});
exe.addModule("gpio", gpio_module);
exe.root_module.addImport("gpio", gpio_module);
const build_step = b.addInstallArtifact(exe, .{});
step.dependOn(&build_step.step);
@@ -62,7 +62,7 @@ pub fn build(b: *std.Build) !void {
.target = target,
.optimize = optimize,
});
exe.addModule("gpio", gpio_module);
exe.root_module.addImport("gpio", gpio_module);
const build_step = b.addInstallArtifact(exe, .{});
step.dependOn(&build_step.step);