-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.zig
More file actions
27 lines (23 loc) · 836 Bytes
/
build.zig
File metadata and controls
27 lines (23 loc) · 836 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
const std = @import("std");
const zx = @import("zx");
pub fn build(b: *std.Build) !void {
// --- Target and Optimize from `zig build` arguments ---
const target = b.standardTargetOptions(.{});
const optimize = b.standardOptimizeOption(.{});
// -- Modules -- //
const pg_module = b.dependency("pg", .{}).module("pg");
// --- ZX App Executable ---
const app_exe = b.addExecutable(.{
.name = "ziex_app",
.root_module = b.createModule(.{
.root_source_file = b.path("app/main.zig"),
.target = target,
.optimize = optimize,
.imports = &.{
.{ .name = "pg", .module = pg_module },
},
}),
});
// --- ZX setup: wires dependencies and adds `zx`/`dev` build steps ---
_ = try zx.init(b, app_exe, .{});
}