inital commit, still got some memory leaks but who cares

This commit is contained in:
Squibid 2025-11-05 13:26:29 -05:00
commit a68e6e67b1
Signed by: squibid
GPG key ID: BECE5684D3C4005D
19 changed files with 1471 additions and 0 deletions

49
build.zig Normal file
View file

@ -0,0 +1,49 @@
const std = @import("std");
pub fn build(b: *std.Build) void {
const target = b.standardTargetOptions(.{});
const optimize = b.standardOptimizeOption(.{});
const mod = b.addModule("zmotd", .{
.root_source_file = b.path("src/main.zig"),
.target = target,
});
const exe = b.addExecutable(.{
.name = "zmotd",
.root_module = b.createModule(.{
.root_source_file = b.path("src/main.zig"),
.target = target,
.optimize = optimize,
.imports = &.{
.{ .name = "zmotd", .module = mod },
},
}),
});
const ziglet = b.dependency("ziglet", .{
.target = target,
.optimize = optimize,
});
const toml = b.dependency("toml", .{
.target = target,
.optimize = optimize,
});
exe.linkLibC();
exe.root_module.addImport("ziglet", ziglet.module("ziglet"));
b.installArtifact(exe);
exe.root_module.addImport("toml", toml.module("toml"));
const run_step = b.step("run", "Run the app");
const run_cmd = b.addRunArtifact(exe);
run_step.dependOn(&run_cmd.step);
run_cmd.step.dependOn(b.getInstallStep());
if (b.args) |args| {
run_cmd.addArgs(args);
}
}