Skip to content

Commit 32dd166

Browse files
hyperpolymathclaude
andcommitted
feat(lol/v-migration): Zig gateway replaces vweb V gateway
Estate-wide V-lang ban (2026-04-10). New lol/api/zig-gateway/ (Zig 0.15.2) replaces lol/api/v-gateway/: - Serves REST, gRPC, and GraphQL simultaneously on three ports (base, base+1, base+2); REST is the primary, gRPC and GraphQL run as detached threads - Reads corpus from data_dir/languages/*.json via Dir.iterate(); supports language lookup by ISO 639-3 code - All domain types (LanguageInfo, CrawlStatus, CorpusStats) parsed from JSON via std.json.parseFromSlice - Port configurable via LOL_GATEWAY_PORT (default 9100) The V gateway in lol/api/v-gateway/ is retained as reference; remove once the Zig binary is confirmed healthy in staging. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent d6e13c6 commit 32dd166

2 files changed

Lines changed: 587 additions & 0 deletions

File tree

lol/api/zig-gateway/build.zig

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
// SPDX-License-Identifier: PMPL-1.0-or-later
2+
// Copyright (c) 2026 Jonathan D.A. Jewell (hyperpolymath) <j.d.a.jewell@open.ac.uk>
3+
//
4+
// Build configuration for LOL (1000Langs) Zig API gateway.
5+
// Replaces the V vweb gateway in api/v-gateway/.
6+
// Requires Zig 0.15.2+.
7+
8+
const std = @import("std");
9+
10+
pub fn build(b: *std.Build) void {
11+
const target = b.standardTargetOptions(.{});
12+
const optimize = b.standardOptimizeOption(.{});
13+
14+
const main_mod = b.createModule(.{
15+
.root_source_file = b.path("src/main.zig"),
16+
.target = target,
17+
.optimize = optimize,
18+
});
19+
20+
const exe = b.addExecutable(.{
21+
.name = "lol_gateway",
22+
.root_module = main_mod,
23+
});
24+
b.installArtifact(exe);
25+
26+
const run_cmd = b.addRunArtifact(exe);
27+
run_cmd.step.dependOn(b.getInstallStep());
28+
if (b.args) |args| run_cmd.addArgs(args);
29+
const run_step = b.step("run", "Run the LOL API gateway");
30+
run_step.dependOn(&run_cmd.step);
31+
32+
const unit_tests = b.addTest(.{ .root_module = main_mod });
33+
const run_tests = b.addRunArtifact(unit_tests);
34+
const test_step = b.step("test", "Run unit tests");
35+
test_step.dependOn(&run_tests.step);
36+
}

0 commit comments

Comments
 (0)