-
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
-
29
-
30
-
31
-
32
-
33
-
34
-
35
-
36
-
37
-
38
-
39
// SPDX-FileCopyrightText: 2025 Shota FUJI <pockawoooh@gmail.com>
// SPDX-License-Identifier: AGPL-3.0-only
//! Zig のビルドスクリプト。
const std = @import("std");
const ProtoGenStep = @import("gremlin").ProtoGenStep;
pub fn build(b: *std.Build) void {
const target = b.standardTargetOptions(.{});
const optimize = b.standardOptimizeOption(.{});
const gremlin = b.dependency("gremlin", .{
.target = target,
.optimize = optimize,
}).module("gremlin");
const proto = ProtoGenStep.create(
b,
.{
.proto_sources = b.path("../proto/"),
.target = b.path("src/proto"),
},
);
// TODO: バックエンドをちゃんと実装する際にライブラリに変更する
const exe = b.addExecutable(.{
.name = "backend_core",
.root_source_file = b.path("src/main.zig"),
.target = target,
.optimize = optimize,
});
exe.root_module.addImport("gremlin", gremlin);
exe.step.dependOn(&proto.step);
b.installArtifact(exe);
}