A SpaceTraders Agent

zig init

altagos.dev 1ce84b0c

+48
+2
.gitignore
··· 1 + .zig-cache 2 + zig-out
+30
build.zig
··· 1 + const std = @import("std"); 2 + 3 + pub fn build(b: *std.Build) void { 4 + const target = b.standardTargetOptions(.{}); 5 + const optimize = b.standardOptimizeOption(.{}); 6 + 7 + const options = b.addOptions(); 8 + 9 + const space = b.addModule("space", .{ 10 + .root_source_file = b.path("src/main.zig"), 11 + .target = target, 12 + .optimize = optimize, 13 + }); 14 + 15 + space.addOptions("build-options", options); 16 + 17 + const exe = b.addExecutable(.{ 18 + .root_module = space, 19 + .name = "space", 20 + }); 21 + b.installArtifact(exe); 22 + 23 + const run_cmd = b.addRunArtifact(exe); 24 + run_cmd.step.dependOn(b.getInstallStep()); 25 + 26 + if (b.args) |args| run_cmd.addArgs(args); 27 + 28 + const run_step = b.step("run", "Run the app"); 29 + run_step.dependOn(&run_cmd.step); 30 + }
+11
build.zig.zon
··· 1 + .{ 2 + .name = .space, 3 + .version = "0.0.1", 4 + .minimum_zig_version = "0.16.0-dev.1246+4b593a6c2", 5 + .paths = .{ 6 + "build.zig", 7 + "build.zig.zon", 8 + "src", 9 + }, 10 + .fingerprint = 0x2972c13a61953f08, 11 + }
+5
src/main.zig
··· 1 + const std = @import("std"); 2 + 3 + pub fn main() void { 4 + std.debug.print("All your {s} are belong to us.\n", .{"codebase"}); 5 + }