polls on atproto
pollz.waow.tech
atproto
zig
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 zqlite = b.dependency("zqlite", .{
13 .target = target,
14 .optimize = optimize,
15 });
16
17 const exe = b.addExecutable(.{
18 .name = "pollz",
19 .root_module = b.createModule(.{
20 .root_source_file = b.path("src/main.zig"),
21 .target = target,
22 .optimize = optimize,
23 .imports = &.{
24 .{ .name = "websocket", .module = websocket.module("websocket") },
25 .{ .name = "zqlite", .module = zqlite.module("zqlite") },
26 },
27 }),
28 });
29
30 b.installArtifact(exe);
31
32 const run_cmd = b.addRunArtifact(exe);
33 run_cmd.step.dependOn(b.getInstallStep());
34 if (b.args) |args| {
35 run_cmd.addArgs(args);
36 }
37
38 const run_step = b.step("run", "Run the server");
39 run_step.dependOn(&run_cmd.step);
40}