This is basically a full rewrite but with a much more solid concept of what the public API looks like, which has informed some of the lower-level decisions. This is not at feature parity with the main branch yet, but it does handle some things better. The main functionality missing is the help text generation and subcommands. There's still some design to think about on the subcommand side of things.
34 lines
949 B
Zig
34 lines
949 B
Zig
const std = @import("std");
|
|
|
|
pub fn build(b: *std.build.Builder) void {
|
|
const demo = b.step("demo", "noclip demo");
|
|
const tests = b.step("test", "Run unit tests");
|
|
|
|
const target = b.standardTargetOptions(.{});
|
|
const optimize = b.standardOptimizeOption(.{});
|
|
|
|
const exe = b.addSharedLibrary(.{
|
|
.name = "noclip",
|
|
.root_source_file = .{ .path = "source/noclip.zig" },
|
|
.target = target,
|
|
.optimize = optimize,
|
|
});
|
|
exe.install();
|
|
|
|
const demo_exe = b.addExecutable(.{
|
|
.name = "noclip-demo",
|
|
.root_source_file = .{ .path = "source/doodle.zig" },
|
|
});
|
|
const install_demo = b.addInstallArtifact(demo_exe);
|
|
demo.dependOn(&install_demo.step);
|
|
|
|
const lib_tests = b.addTest(.{
|
|
.name = "tests",
|
|
.root_source_file = .{ .path = "source/noclip.zig" },
|
|
.target = target,
|
|
.optimize = optimize,
|
|
});
|
|
|
|
tests.dependOn(&lib_tests.step);
|
|
}
|