aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNic Gaffney <gaffney_nic@protonmail.com>2025-10-23 22:19:16 -0500
committerNic Gaffney <gaffney_nic@protonmail.com>2025-10-23 22:19:16 -0500
commit5ddffb4b2ea816e17ec2784bc2da248dd70ccfb0 (patch)
treee2302ab5af35b06cf858f7327e368bfc4fbae58d
parentf1491a87c14d66cf87b0b3ac9305832481acbf81 (diff)
downloadfuncz-5ddffb4b2ea816e17ec2784bc2da248dd70ccfb0.tar.gz
Hopefully this works now
-rw-r--r--build.zig51
-rw-r--r--build.zig.zon2
2 files changed, 25 insertions, 28 deletions
diff --git a/build.zig b/build.zig
index aa0d70a..5f7d1f1 100644
--- a/build.zig
+++ b/build.zig
@@ -2,39 +2,36 @@ const std = @import("std");
pub fn build(b: *std.Build) !void {
const target = b.standardTargetOptions(.{});
- const optimize = b.standardOptimizeOption(.{.preferred_optimize_mode = .ReleaseSmall });
+ const optimize = b.standardOptimizeOption(.{});
- _=b.addModule("funcz", .{
+ const rootmod =b.addModule("funcz", .{
.root_source_file = b.path("src/root.zig"),
- .optimize = optimize,
.target = target,
+ .optimize = optimize,
});
- // const options = b.addOptions();
- // rootmod.addOptions("build", options);
- // const lib = b.addLibrary(.{
- // .name = "funcz",
- // .root_module = rootmod,
- // });
- //
- // b.installArtifact(lib);
+ const lib = b.addLibrary(.{
+ .name = "funcz",
+ .root_module = rootmod,
+ });
- // const exe = b.addExecutable(.{
- // .name = "funczExample",
- // .root_module = b.createModule(.{
- // .root_source_file = b.path("src/example.zig"),
- // .imports = &.{ .{.name = "funcz", .module = lib.root_module} },
- // .target = target,
- // .optimize = optimize,
- // })
- // });
- //
- // b.installArtifact(exe);
+ b.installArtifact(lib);
+
+ const exe = b.addExecutable(.{
+ .name = "funczExample",
+ .root_module = b.createModule(.{
+ .root_source_file = b.path("src/example.zig"),
+ .imports = &.{ .{.name = "funcz", .module = lib.root_module} },
+ .target = target,
+ .optimize = optimize,
+ })
+ });
- // const run_cmd = b.addRunArtifact(exe);
- // run_cmd.step.dependOn(b.getInstallStep());
- // if (b.args) |args| run_cmd.addArgs(args);
- // const run_step = b.step("run", "Run the app");
- // run_step.dependOn(&run_cmd.step);
+ b.installArtifact(exe);
+ const run_cmd = b.addRunArtifact(exe);
+ run_cmd.step.dependOn(b.getInstallStep());
+ if (b.args) |args| run_cmd.addArgs(args);
+ const run_step = b.step("run", "Run the app");
+ run_step.dependOn(&run_cmd.step);
}
diff --git a/build.zig.zon b/build.zig.zon
index 59b1ed7..4c7c3a4 100644
--- a/build.zig.zon
+++ b/build.zig.zon
@@ -1,6 +1,6 @@
.{
.name = .funcz,
.fingerprint = 0x30f8633228105f1a,
- .version = "0.1.1",
+ .version = "0.1.2",
.paths = .{ "src" },
}