From 21673aeba3becf15e8eb11686d49eb48b75679d0 Mon Sep 17 00:00:00 2001 From: Nic Gaffney Date: Thu, 23 Oct 2025 21:45:41 -0500 Subject: Fixed library stuff --- build.zig | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) (limited to 'build.zig') 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); -- cgit v1.2.3