aboutsummaryrefslogtreecommitdiff
path: root/build.zig
diff options
context:
space:
mode:
Diffstat (limited to 'build.zig')
-rw-r--r--build.zig17
1 files changed, 12 insertions, 5 deletions
diff --git a/build.zig b/build.zig
index 6de6611..7a853e5 100644
--- a/build.zig
+++ b/build.zig
@@ -4,14 +4,20 @@ pub fn build(b: *std.Build) !void {
const target = b.standardTargetOptions(.{});
const optimize = b.standardOptimizeOption(.{.preferred_optimize_mode = .ReleaseSmall });
+ const dep_opts = .{ .target = target, .optimize = optimize };
+ _=dep_opts;
+
+ const rootmod =b.addModule("funcz", .{
+ .root_source_file = b.path("src/root.zig"),
+ .optimize = optimize,
+ .target = target,
+ });
+
const lib = b.addLibrary(.{
.name = "funcz",
- .root_module = b.createModule(.{
- .root_source_file = b.path("src/root.zig"),
- .target = target,
- .optimize = optimize,
- }),
+ .root_module = rootmod,
});
+
b.installArtifact(lib);
const exe = b.addExecutable(.{
@@ -23,6 +29,7 @@ pub fn build(b: *std.Build) !void {
.optimize = optimize,
})
});
+
b.installArtifact(exe);
const run_cmd = b.addRunArtifact(exe);