search for standard sites
pub-search.waow.tech
search
zig
blog
atproto
1const std = @import("std");
2
3pub fn build(b: *std.Build) void {
4 const target = b.standardTargetOptions(.{});
5 const optimize = b.standardOptimizeOption(.{});
6
7 const websocket = b.dependency("websocket", .{
8 .target = target,
9 .optimize = optimize,
10 });
11
12 const zql = b.dependency("zql", .{
13 .target = target,
14 .optimize = optimize,
15 });
16
17 const zat = b.dependency("zat", .{
18 .target = target,
19 .optimize = optimize,
20 });
21
22 const exe = b.addExecutable(.{
23 .name = "leaflet-search",
24 .root_module = b.createModule(.{
25 .root_source_file = b.path("src/main.zig"),
26 .target = target,
27 .optimize = optimize,
28 .imports = &.{
29 .{ .name = "websocket", .module = websocket.module("websocket") },
30 .{ .name = "zql", .module = zql.module("zql") },
31 .{ .name = "zat", .module = zat.module("zat") },
32 },
33 }),
34 });
35
36 b.installArtifact(exe);
37
38 const run_cmd = b.addRunArtifact(exe);
39 run_cmd.step.dependOn(b.getInstallStep());
40 if (b.args) |args| {
41 run_cmd.addArgs(args);
42 }
43
44 const run_step = b.step("run", "Run the server");
45 run_step.dependOn(&run_cmd.step);
46}