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 ++++++++++++----- src/root.zig | 1 - 2 files changed, 12 insertions(+), 6 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); diff --git a/src/root.zig b/src/root.zig index 1339904..721b2a0 100644 --- a/src/root.zig +++ b/src/root.zig @@ -3,4 +3,3 @@ pub const mapAlloc = @import("map.zig").mapAlloc; pub const curry = @import("curry.zig").curry; pub const compose = @import("compose.zig").compose; pub const combinators = @import("combinators.zig"); -pub const Functor = @import("functor.zig").Functor; -- cgit v1.2.3