-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathbuild.zig
More file actions
595 lines (567 loc) · 22.8 KB
/
Copy pathbuild.zig
File metadata and controls
595 lines (567 loc) · 22.8 KB
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
const std = @import("std");
pub fn build(b: *std.Build) void {
const target = b.standardTargetOptions(.{});
const optimize_opt = b.option(std.builtin.OptimizeMode, "optimize", "Optimization mode");
const optimize = optimize_opt orelse .Debug;
const all_targets_optimize = optimize_opt orelse .ReleaseFast;
const strip_opt = b.option(bool, "strip", "Strip debug symbols from binaries");
const strip = strip_opt orelse false;
const all_targets_strip = strip_opt orelse true;
const single_threaded = b.option(bool, "single-threaded", "Force single-threaded mode");
const omit_frame_pointer = b.option(bool, "omit-frame-pointer", "Force frame pointer omission mode");
const error_tracing = b.option(bool, "error-tracing", "Force error tracing mode");
const pic = b.option(bool, "pic", "Force PIC mode");
const llvm = b.option(bool, "llvm", "Use LLVM codegen backend") orelse true;
const enable_tui = b.option(bool, "enable-tui", "Enable TUI support via libvaxis") orelse true;
const enable_alldriver = b.option(bool, "enable-alldriver", "Enable browser automation support via alldriver") orelse false;
const enable_unarr = b.option(bool, "enable-unarr", "Enable archive extraction support via unarr") orelse true;
const live_mode = b.option([]const u8, "live", "Live test mode: off | smoke | named | extensive | all") orelse "off";
const live_providers = b.option([]const u8, "live-providers", "Comma-separated provider filter for live tests, or '*' for all") orelse "*";
const live_include_captcha = b.option(bool, "live-include-captcha", "Include captcha/cloudflare providers in live test runs") orelse false;
const live_parallel_on_all = b.option(bool, "live-parallel-on-all", "Run one live subprocess per provider when -Dlive-providers=all/*") orelse true;
const live_timeout_seconds = b.option(u32, "live-timeout-seconds", "Hard deadline for each parallel live provider") orelse 60;
const valid_mode = std.mem.eql(u8, live_mode, "off") or
std.mem.eql(u8, live_mode, "smoke") or
std.mem.eql(u8, live_mode, "named") or
std.mem.eql(u8, live_mode, "extensive") or
std.mem.eql(u8, live_mode, "all");
if (!valid_mode) {
@panic("invalid -Dlive value, expected one of: off, smoke, named, extensive, all");
}
const live_tests_enabled = !std.mem.eql(u8, live_mode, "off");
const live_extensive_suite = live_tests_enabled and
(std.mem.eql(u8, live_mode, "extensive") or std.mem.eql(u8, live_mode, "all"));
const live_tui_suite = live_tests_enabled and
(std.mem.eql(u8, live_mode, "smoke") or std.mem.eql(u8, live_mode, "all"));
const live_named_tests_enabled = live_tests_enabled and
(std.mem.eql(u8, live_mode, "named") or std.mem.eql(u8, live_mode, "all"));
const build_options = b.addOptions();
build_options.addOption(bool, "live_tests_enabled", live_tests_enabled);
build_options.addOption(bool, "live_extensive_suite", live_extensive_suite);
build_options.addOption(bool, "live_tui_suite", live_tui_suite);
build_options.addOption(bool, "live_named_tests_enabled", live_named_tests_enabled);
build_options.addOption(bool, "live_include_captcha", live_include_captcha);
build_options.addOption(bool, "enable_tui", enable_tui);
build_options.addOption(bool, "enable_alldriver", enable_alldriver);
build_options.addOption(bool, "enable_unarr", enable_unarr);
build_options.addOption([]const u8, "live_provider_filter", if (live_tests_enabled) live_providers else "");
const build_options_mod = build_options.createModule();
const host_modules = createTargetModuleSet(
b,
target,
optimize,
strip,
single_threaded,
omit_frame_pointer,
error_tracing,
pic,
build_options_mod,
true,
enable_tui,
enable_alldriver,
enable_unarr,
);
const subdl_mod = b.addModule("subdl", .{
.root_source_file = b.path("src/scrapers/subdl.zig"),
.target = target,
.optimize = optimize,
.link_libc = true,
.strip = strip,
.single_threaded = single_threaded,
.omit_frame_pointer = omit_frame_pointer,
.error_tracing = error_tracing,
.pic = pic,
.imports = &.{
.{ .name = "htmlparser", .module = host_modules.htmlparser_compat },
.{ .name = "alldriver", .module = host_modules.alldriver },
.{ .name = "build_options", .module = build_options_mod },
.{ .name = "runtime_alloc", .module = host_modules.runtime_alloc },
.{ .name = "runtime_io", .module = host_modules.runtime_io },
},
});
const scrapers_mod = host_modules.scrapers;
const app_exe = b.addExecutable(.{
.name = "scrapers",
.use_llvm = llvm,
.root_module = b.createModule(.{
.root_source_file = b.path("src/cmd/main.zig"),
.target = target,
.optimize = optimize,
.link_libc = true,
.strip = strip,
.single_threaded = single_threaded,
.omit_frame_pointer = omit_frame_pointer,
.error_tracing = error_tracing,
.pic = pic,
.imports = &.{
.{ .name = "scrapers", .module = scrapers_mod },
.{ .name = "runtime_alloc", .module = host_modules.runtime_alloc },
.{ .name = "runtime_io", .module = host_modules.runtime_io },
.{ .name = "tui_backend", .module = host_modules.tui_backend },
},
}),
});
const cross_targets = [_]struct {
suffix: []const u8,
query: std.Target.Query,
static_libc: bool,
}{
.{
.suffix = "x86_64-linux-gnu",
.query = .{ .cpu_arch = .x86_64, .os_tag = .linux, .abi = .gnu },
.static_libc = true,
},
.{
.suffix = "aarch64-linux-gnu",
.query = .{ .cpu_arch = .aarch64, .os_tag = .linux, .abi = .gnu },
.static_libc = true,
},
.{
.suffix = "x86_64-windows-gnu",
.query = .{ .cpu_arch = .x86_64, .os_tag = .windows, .abi = .gnu },
.static_libc = false,
},
.{
.suffix = "x86_64-macos-none",
.query = .{ .cpu_arch = .x86_64, .os_tag = .macos },
.static_libc = false,
},
.{
.suffix = "aarch64-macos-none",
.query = .{ .cpu_arch = .aarch64, .os_tag = .macos },
.static_libc = false,
},
};
b.installArtifact(app_exe);
const run_step = b.step("run", "Run the app (CLI mode by default)");
const run_cmd = b.addRunArtifact(app_exe);
run_step.dependOn(&run_cmd.step);
run_cmd.step.dependOn(b.getInstallStep());
if (b.args) |args| run_cmd.addArgs(args);
const run_tui_step = b.step("run-tui", "Run the app in TUI mode");
const run_tui_cmd = b.addRunArtifact(app_exe);
run_tui_step.dependOn(&run_tui_cmd.step);
run_tui_cmd.step.dependOn(b.getInstallStep());
run_tui_cmd.addArg("--tui");
if (b.args) |args| run_tui_cmd.addArgs(args);
const all_targets_step = b.step("build-all-targets", "Build scrapers for all configured targets into zig-out/bin");
for (cross_targets) |cross| {
const cross_target = b.resolveTargetQuery(cross.query);
const cross_modules = createTargetModuleSet(
b,
cross_target,
all_targets_optimize,
all_targets_strip,
single_threaded,
omit_frame_pointer,
error_tracing,
pic,
build_options_mod,
cross.static_libc,
enable_tui,
enable_alldriver,
enable_unarr,
);
const cross_exe = b.addExecutable(.{
.name = b.fmt("scrapers-{s}", .{cross.suffix}),
.use_llvm = llvm,
.root_module = b.createModule(.{
.root_source_file = b.path("src/cmd/main.zig"),
.target = cross_target,
.optimize = all_targets_optimize,
.link_libc = true,
.strip = all_targets_strip,
.single_threaded = single_threaded,
.omit_frame_pointer = omit_frame_pointer,
.error_tracing = error_tracing,
.pic = pic,
.imports = &.{
.{ .name = "scrapers", .module = cross_modules.scrapers },
.{ .name = "runtime_alloc", .module = cross_modules.runtime_alloc },
.{ .name = "runtime_io", .module = cross_modules.runtime_io },
.{ .name = "tui_backend", .module = cross_modules.tui_backend },
},
}),
});
const install_cross = b.addInstallArtifact(cross_exe, .{});
all_targets_step.dependOn(&install_cross.step);
}
const subdl_mod_tests = b.addTest(.{
.root_module = subdl_mod,
.use_llvm = llvm,
});
const run_subdl_mod_tests = b.addRunArtifact(subdl_mod_tests);
const scrapers_mod_tests = b.addTest(.{
.root_module = scrapers_mod,
.use_llvm = llvm,
});
const run_scrapers_mod_tests = b.addRunArtifact(scrapers_mod_tests);
const run_scrapers_mod_tests_live = b.addSystemCommand(&.{ "bash", "-lc", "exec \"$1\"", "_" });
run_scrapers_mod_tests_live.addFileArg(scrapers_mod_tests.getEmittedBin());
run_scrapers_mod_tests_live.stdio = .inherit;
const app_tests = b.addTest(.{
.root_module = app_exe.root_module,
.use_llvm = llvm,
});
const run_app_tests = b.addRunArtifact(app_tests);
const test_step = b.step("test", "Run tests");
test_step.dependOn(&run_subdl_mod_tests.step);
test_step.dependOn(&run_scrapers_mod_tests.step);
test_step.dependOn(&run_app_tests.step);
const test_live_single_step = b.step("test-live-single", "Run live tests for the current provider filter");
test_live_single_step.dependOn(&run_scrapers_mod_tests_live.step);
const test_live_step = b.step("test-live", "Run live tests using -Dlive, -Dlive-providers, -Dlive-include-captcha");
if (live_tests_enabled and live_parallel_on_all and isAllLiveProviderSelection(live_providers)) {
const include_captcha_arg = if (live_include_captcha) "true" else "false";
const script = makeParallelLiveRunScript(b, include_captcha_arg, live_timeout_seconds);
const fanout_cmd = b.addSystemCommand(&.{ "bash", "-lc", script, "_test_bin_" });
fanout_cmd.setCwd(b.path("."));
fanout_cmd.addFileArg(scrapers_mod_tests.getEmittedBin());
test_live_step.dependOn(&fanout_cmd.step);
} else {
test_live_step.dependOn(&run_scrapers_mod_tests_live.step);
}
const test_live_all_step = b.step("test-live-all", "Run all providers live (including captcha providers)");
const live_all_cmd = b.addSystemCommand(&.{
"zig",
"build",
"test-live",
"-Dlive=all",
"-Dlive-providers=*",
"-Dlive-include-captcha=true",
});
live_all_cmd.setCwd(b.path("."));
test_live_all_step.dependOn(&live_all_cmd.step);
}
const LiveProviderTarget = struct {
name: []const u8,
captcha: bool = false,
};
const live_provider_targets = [_]LiveProviderTarget{
.{ .name = "subdl.com" },
.{ .name = "isubtitles.org" },
.{ .name = "moviesubtitles.org" },
.{ .name = "my-subs.co" },
.{ .name = "subtitlecat.com" },
.{ .name = "subsource.net" },
.{ .name = "sub-scene.com", .captcha = true },
.{ .name = "tvsubtitles.net" },
.{ .name = "opensubtitles.org", .captcha = true },
.{ .name = "opensubtitles.com", .captcha = true },
};
fn isAllLiveProviderSelection(raw_filter: []const u8) bool {
const trimmed = std.mem.trim(u8, raw_filter, " \t\r\n");
if (trimmed.len == 0) return true;
if (std.mem.eql(u8, trimmed, "*")) return true;
if (std.ascii.eqlIgnoreCase(trimmed, "all")) return true;
return false;
}
fn makeParallelLiveRunScript(
b: *std.Build,
include_captcha_arg: []const u8,
timeout_seconds: u32,
) []const u8 {
var out: std.ArrayListUnmanaged(u8) = .empty;
defer out.deinit(b.allocator);
out.appendSlice(b.allocator,
\\set -euo pipefail
\\test_bin="$1"
\\tmpdir="$(mktemp -d)"
\\cleanup() { rm -rf "$tmpdir"; }
\\trap cleanup EXIT
\\declare -a names=()
\\declare -a pids=()
\\
) catch @panic("oom");
for (live_provider_targets) |target_info| {
if (target_info.captcha and !std.mem.eql(u8, include_captcha_arg, "true")) continue;
out.print(b.allocator,
\\echo "[live][runner] START {s}"
\\
\\(
\\ set -o pipefail
\\ set +e
\\ SCRAPERS_LIVE_PROVIDER_FILTER="{s}" SCRAPERS_LIVE_INCLUDE_CAPTCHA="{s}" timeout --signal=TERM --kill-after=5s {d}s "$test_bin" 2>&1 | sed -u 's/^/[live][{s}] /'
\\ rc=${{PIPESTATUS[0]}}
\\ set -e
\\ echo "$rc" > "$tmpdir/{s}.rc"
\\ echo "[live][runner] END {s} rc=$rc"
\\ exit "$rc"
\\) &
\\names+=("{s}")
\\pids+=("$!")
\\
, .{
target_info.name,
target_info.name,
include_captcha_arg,
timeout_seconds,
target_info.name,
target_info.name,
target_info.name,
target_info.name,
}) catch @panic("oom");
}
out.appendSlice(b.allocator,
\\(
\\ while true; do
\\ active_names=""
\\ for i in "${!pids[@]}"; do
\\ pid="${pids[$i]}"
\\ name="${names[$i]}"
\\ if kill -0 "$pid" 2>/dev/null; then
\\ if [[ -z "$active_names" ]]; then
\\ active_names="$name"
\\ else
\\ active_names="$active_names,$name"
\\ fi
\\ fi
\\ done
\\ if [[ -z "$active_names" ]]; then
\\ break
\\ fi
\\ echo "[live][runner] ACTIVE $active_names"
\\ sleep 5
\\ done
\\) &
\\monitor_pid=$!
\\
\\overall_rc=0
\\for i in "${!pids[@]}"; do
\\ name="${names[$i]}"
\\ pid="${pids[$i]}"
\\ if ! wait "$pid"; then
\\ overall_rc=1
\\ fi
\\ rc_file="$tmpdir/$name.rc"
\\ if [[ ! -f "$rc_file" ]]; then
\\ echo "[live][runner] END $name rc=missing"
\\ overall_rc=1
\\ continue
\\ fi
\\ rc="$(cat "$rc_file")"
\\ if [[ "$rc" != "0" ]]; then
\\ overall_rc=1
\\ fi
\\done
\\if kill -0 "$monitor_pid" 2>/dev/null; then
\\ kill "$monitor_pid" 2>/dev/null || true
\\fi
\\wait "$monitor_pid" 2>/dev/null || true
\\exit "$overall_rc"
\\
) catch @panic("oom");
return out.toOwnedSlice(b.allocator) catch @panic("oom");
}
const TargetModuleSet = struct {
htmlparser_compat: *std.Build.Module,
alldriver: *std.Build.Module,
oneserial: *std.Build.Module,
runtime_alloc: *std.Build.Module,
runtime_io: *std.Build.Module,
unarr: *std.Build.Module,
scrapers: *std.Build.Module,
tui_backend: *std.Build.Module,
};
fn createTargetModuleSet(
b: *std.Build,
target: std.Build.ResolvedTarget,
optimize: std.builtin.OptimizeMode,
strip: bool,
single_threaded: ?bool,
omit_frame_pointer: ?bool,
error_tracing: ?bool,
pic: ?bool,
build_options_mod: *std.Build.Module,
static_libc: bool,
enable_tui: bool,
enable_alldriver: bool,
enable_unarr: bool,
) TargetModuleSet {
_ = static_libc;
const htmlparser_dep = b.dependency("htmlparser", .{
.target = target,
.optimize = optimize,
});
const oneserial_dep = b.dependency("oneserial", .{
.target = target,
.optimize = optimize,
});
const htmlparser_compat_mod = b.createModule(.{
.root_source_file = b.path("src/deps/htmlparser_compat.zig"),
.target = target,
.optimize = optimize,
.strip = strip,
.single_threaded = single_threaded,
.omit_frame_pointer = omit_frame_pointer,
.error_tracing = error_tracing,
.pic = pic,
.imports = &.{
.{ .name = "htmlparser_upstream", .module = htmlparser_dep.module("html") },
},
});
const alldriver_mod = if (enable_alldriver) blk: {
const alldriver_dep = b.lazyDependency("alldriver", .{
.target = target,
.optimize = optimize,
}) orelse @panic("enable-alldriver requested but alldriver dependency is unavailable");
break :blk b.createModule(.{
.root_source_file = b.path("src/deps/alldriver_compat.zig"),
.target = target,
.optimize = optimize,
.strip = strip,
.single_threaded = single_threaded,
.omit_frame_pointer = omit_frame_pointer,
.error_tracing = error_tracing,
.pic = pic,
.imports = &.{
.{ .name = "build_options", .module = build_options_mod },
.{ .name = "alldriver_upstream", .module = alldriver_dep.module("alldriver") },
},
});
} else b.createModule(.{
.root_source_file = b.path("src/deps/alldriver_compat.zig"),
.target = target,
.optimize = optimize,
.strip = strip,
.single_threaded = single_threaded,
.omit_frame_pointer = omit_frame_pointer,
.error_tracing = error_tracing,
.pic = pic,
.imports = &.{
.{ .name = "build_options", .module = build_options_mod },
},
});
const unarr_mod = if (enable_unarr) blk: {
const unarr_dep = b.lazyDependency("unarr", .{
.target = target,
.optimize = optimize,
.static_libc = false,
}) orelse @panic("enable-unarr requested but unarr dependency is unavailable");
break :blk b.createModule(.{
.root_source_file = b.path("src/deps/unarr_compat.zig"),
.target = target,
.optimize = optimize,
.strip = strip,
.single_threaded = single_threaded,
.omit_frame_pointer = omit_frame_pointer,
.error_tracing = error_tracing,
.pic = pic,
.imports = &.{
.{ .name = "build_options", .module = build_options_mod },
.{ .name = "unarr_upstream", .module = unarr_dep.module("unarr") },
},
});
} else b.createModule(.{
.root_source_file = b.path("src/deps/unarr_compat.zig"),
.target = target,
.optimize = optimize,
.strip = strip,
.single_threaded = single_threaded,
.omit_frame_pointer = omit_frame_pointer,
.error_tracing = error_tracing,
.pic = pic,
.imports = &.{
.{ .name = "build_options", .module = build_options_mod },
},
});
const runtime_alloc_mod = b.createModule(.{
.root_source_file = b.path("src/alloc/runtime_allocator.zig"),
.target = target,
.optimize = optimize,
.strip = strip,
.single_threaded = single_threaded,
.omit_frame_pointer = omit_frame_pointer,
.error_tracing = error_tracing,
.pic = pic,
});
const runtime_io_mod = b.createModule(.{
.root_source_file = b.path("src/runtime_io.zig"),
.target = target,
.optimize = optimize,
.strip = strip,
.single_threaded = single_threaded,
.omit_frame_pointer = omit_frame_pointer,
.error_tracing = error_tracing,
.pic = pic,
});
const scrapers_mod = b.createModule(.{
.root_source_file = b.path("src/lib.zig"),
.target = target,
.optimize = optimize,
.link_libc = true,
.strip = strip,
.single_threaded = single_threaded,
.omit_frame_pointer = omit_frame_pointer,
.error_tracing = error_tracing,
.pic = pic,
.imports = &.{
.{ .name = "htmlparser", .module = htmlparser_compat_mod },
.{ .name = "alldriver", .module = alldriver_mod },
.{ .name = "build_options", .module = build_options_mod },
.{ .name = "runtime_alloc", .module = runtime_alloc_mod },
.{ .name = "runtime_io", .module = runtime_io_mod },
.{ .name = "unarr", .module = unarr_mod },
},
});
const tui_backend_mod = if (enable_tui) blk: {
const libvaxis_dep = b.lazyDependency("libvaxis", .{
.target = target,
.optimize = optimize,
}) orelse @panic("enable-tui requested but libvaxis dependency is unavailable");
const tui_impl_mod = b.createModule(.{
.root_source_file = b.path("src/cmd/tui.zig"),
.target = target,
.optimize = optimize,
.strip = strip,
.single_threaded = single_threaded,
.omit_frame_pointer = omit_frame_pointer,
.error_tracing = error_tracing,
.pic = pic,
.imports = &.{
.{ .name = "scrapers", .module = scrapers_mod },
.{ .name = "vaxis", .module = libvaxis_dep.module("vaxis") },
.{ .name = "runtime_alloc", .module = runtime_alloc_mod },
.{ .name = "runtime_io", .module = runtime_io_mod },
.{ .name = "build_options", .module = build_options_mod },
.{ .name = "oneserial", .module = oneserial_dep.module("oneserial") },
},
});
break :blk b.createModule(.{
.root_source_file = b.path("src/cmd/tui_backend.zig"),
.target = target,
.optimize = optimize,
.strip = strip,
.single_threaded = single_threaded,
.omit_frame_pointer = omit_frame_pointer,
.error_tracing = error_tracing,
.pic = pic,
.imports = &.{
.{ .name = "build_options", .module = build_options_mod },
.{ .name = "tui_impl", .module = tui_impl_mod },
},
});
} else b.createModule(.{
.root_source_file = b.path("src/cmd/tui_backend.zig"),
.target = target,
.optimize = optimize,
.strip = strip,
.single_threaded = single_threaded,
.omit_frame_pointer = omit_frame_pointer,
.error_tracing = error_tracing,
.pic = pic,
.imports = &.{
.{ .name = "build_options", .module = build_options_mod },
},
});
return .{
.htmlparser_compat = htmlparser_compat_mod,
.alldriver = alldriver_mod,
.oneserial = oneserial_dep.module("oneserial"),
.runtime_alloc = runtime_alloc_mod,
.runtime_io = runtime_io_mod,
.unarr = unarr_mod,
.scrapers = scrapers_mod,
.tui_backend = tui_backend_mod,
};
}