This commit is contained in:
Dominic Grimm 2025-06-01 12:33:53 +02:00
commit e70a04ac16
No known key found for this signature in database
19 changed files with 576 additions and 0 deletions

35
build.zig Normal file
View file

@ -0,0 +1,35 @@
const std = @import("std");
pub fn build(b: *std.Build) void {
const target = b.standardTargetOptions(.{});
const optimize = b.standardOptimizeOption(.{});
const zap_dep = b.dependency("zap", .{});
const lib_mod = b.addModule("craftflut", .{
.root_source_file = b.path("src/root.zig"),
});
lib_mod.addImport("zap", zap_dep.module("zap"));
const exe_mod = b.createModule(.{
.root_source_file = b.path("src/main.zig"),
.target = target,
.optimize = optimize,
});
exe_mod.addImport("craftflut", lib_mod);
const exe = b.addExecutable(.{
.name = "craftflut",
.root_module = exe_mod,
});
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);
}