-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.zig
More file actions
28 lines (24 loc) · 877 Bytes
/
build.zig
File metadata and controls
28 lines (24 loc) · 877 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
28
const std = @import("std");
const ziex = @import("zx");
pub fn build(b: *std.Build) !void {
// --- Target and Optimize from `zig build` arguments ---
const target = b.standardTargetOptions(.{});
const optimize = b.standardOptimizeOption(.{});
// --- Ziex 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,
}),
});
// --- Ziex setup: wires dependencies and adds `zx`/`dev` build steps ---
var ziex_b = try ziex.init(b, app_exe, .{});
b.installDirectory(.{
.source_dir = ziex_b.ziex_js.dep.path("."),
.install_dir = .prefix,
.include_extensions = &.{ ".js", ".ts" },
.install_subdir = "pkg/ziex",
});
}