-
Notifications
You must be signed in to change notification settings - Fork 2
/
build.zig
595 lines (550 loc) · 22.3 KB
/
build.zig
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");
const zine = @import("zine");
const ResolvedTarget = std.Build.ResolvedTarget;
const OptimizeMode = std.builtin.OptimizeMode;
// zig build test_all --summary all
// zig build test -Dno_opt_deps -Dno_cross --summary all
pub fn build(b: *std.Build) !void {
const optimize: std.builtin.OptimizeMode = b.standardOptimizeOption(.{});
// C fmt lint analyze build
// Cmake
// Cpp fmt lint analyze build
// Cs
// Css
// Fish
// Java
// Js
// Lua fmt lint noanal nobuild
// Nix
// Php
// Ps1
// Py
// Rs
// Sh fmt lint noanal nobuild
// Tex
// Zig fmt lint noanal build
// unplanned dependencies in $PATH
// * go (shfmt)
// optionally dependencies in $PATH
// * cargo (stylua)
// * haskell (shellcheck)
// * llvm-tools (clang-format, clang-tidy)
// * luacheck
const no_opt_deps = b.option(bool, "no_opt_deps", "Exclude optional dependencies") orelse false; // -Dno_opt_deps
const no_cross = b.option(bool, "no_cross", "No cross-compiling to common targets") orelse false; // -Dno_cross
// mandatory dependencies in $PATH
// * zig
const run_step = b.step("test", "Test with mandatory dependencies");
if (!no_opt_deps) fmtC(b, run_step);
if (!no_opt_deps) fmtCpp(b, run_step);
if (!no_opt_deps) fmtLua(b, run_step);
if (!no_opt_deps) fmtSh(b, run_step);
fmtZig(b, run_step);
// compiler and linter error "unsafe buffer access" horrible to use.
// clang-tidy version in CI too old, so disable it to prevent errors
// and use local clang-tidy without "unsafe buffer access" errors.
if (!no_opt_deps) lintC(b, run_step);
if (!no_opt_deps) lintCpp(b, run_step);
if (!no_opt_deps) lintLua(b, run_step);
if (!no_opt_deps) lintSh(b, run_step);
lintZig(b, run_step);
{ // native target
const native_target_query: std.Target.Query = .{};
const native_target = b.resolveTargetQuery(native_target_query);
buildC(b, native_target, optimize, run_step);
buildCpp(b, native_target, optimize, run_step);
buildZig(b, native_target, optimize, run_step);
testZig(b, native_target, optimize, run_step);
}
if (!no_cross) { // cross targets
for (cross_target_queries) |cross_target_query| {
const cross_target = b.resolveTargetQuery(cross_target_query);
buildC(b, cross_target, optimize, run_step);
buildCpp(b, cross_target, optimize, run_step);
buildZig(b, cross_target, optimize, run_step);
}
}
}
const cross_target_queries = [_]std.Target.Query{
.{ .cpu_arch = .aarch64, .os_tag = .linux },
.{ .cpu_arch = .aarch64, .os_tag = .linux, .abi = .musl },
.{ .cpu_arch = .aarch64, .os_tag = .macos },
.{ .cpu_arch = .aarch64, .os_tag = .windows },
.{ .cpu_arch = .x86_64, .os_tag = .linux },
.{ .cpu_arch = .x86_64, .os_tag = .linux, .abi = .musl },
.{ .cpu_arch = .x86_64, .os_tag = .macos },
.{ .cpu_arch = .x86_64, .os_tag = .windows },
};
fn fmtC(b: *std.Build, run_step: *std.Build.Step) void {
for (SingleCFiles[0..]) |cfile| {
const run_clang_format_check = b.addSystemCommand(&.{ "clang-format", "--dry-run", "--Werror" });
run_clang_format_check.addArg(cfile);
run_step.dependOn(&run_clang_format_check.step);
}
}
fn lintC(b: *std.Build, run_step: *std.Build.Step) void {
for (SingleCFiles[0..]) |cfile| {
// clang-tidy clang-tidy_flags file -- clang_flags
const run_clang_tidy_check = b.addSystemCommand(&.{"clang-tidy"});
run_clang_tidy_check.addArg(cfile);
run_clang_tidy_check.addArg("--");
run_clang_tidy_check.addArgs(&c99_flags);
run_step.dependOn(&run_clang_tidy_check.step);
}
}
fn buildC(
b: *std.Build,
target: ResolvedTarget,
optimize: OptimizeMode,
run_step: *std.Build.Step,
) void {
var c89flags: []const []const u8 = &c89_flags;
var c99flags: []const []const u8 = &c99_flags;
var c11flags: []const []const u8 = &c11_flags;
var c17flags: []const []const u8 = &c17_flags;
var c23flags: []const []const u8 = &c23_flags;
if (target.result.isMusl()) {
c89flags = &(c89_flags ++ cmusl_flag);
c99flags = &(c99_flags ++ cmusl_flag);
c11flags = &(c11_flags ++ cmusl_flag);
c17flags = &(c17_flags ++ cmusl_flag);
c23flags = &(c23_flags ++ cmusl_flag);
}
const exe_c89 = b.addExecutable(.{
.name = "common_c89",
.target = target,
.optimize = optimize,
});
exe_c89.addCSourceFile(.{ .file = b.path("templates/common_c89.c"), .flags = c89flags });
exe_c89.linkLibC();
run_step.dependOn(&exe_c89.step);
for (SingleCFiles[0..]) |cfile| {
const exe_cdefault = b.addExecutable(.{
.name = std.fs.path.stem(std.fs.path.basename(cfile)),
.target = target,
.optimize = optimize,
});
exe_cdefault.addCSourceFile(.{ .file = b.path(cfile) });
exe_cdefault.linkLibC();
run_step.dependOn(&exe_cdefault.step);
const exe_c99 = b.addExecutable(.{
.name = std.fs.path.stem(std.fs.path.basename(cfile)),
.target = target,
.optimize = optimize,
});
exe_c99.addCSourceFile(.{ .file = b.path(cfile), .flags = c99flags });
exe_c99.linkLibC();
run_step.dependOn(&exe_c99.step);
const exe_c11 = b.addExecutable(.{
.name = std.fs.path.stem(std.fs.path.basename(cfile)),
.target = target,
.optimize = optimize,
});
exe_c11.addCSourceFile(.{ .file = b.path(cfile), .flags = c11flags });
exe_c11.linkLibC();
run_step.dependOn(&exe_c11.step);
const exe_c17 = b.addExecutable(.{
.name = std.fs.path.stem(std.fs.path.basename(cfile)),
.target = target,
.optimize = optimize,
});
exe_c17.addCSourceFile(.{ .file = b.path(cfile), .flags = c17flags });
exe_c17.linkLibC();
run_step.dependOn(&exe_c17.step);
const exe_c23 = b.addExecutable(.{
.name = std.fs.path.stem(std.fs.path.basename(cfile)),
.target = target,
.optimize = optimize,
});
exe_c23.addCSourceFile(.{ .file = b.path(cfile), .flags = c23flags });
exe_c23.linkLibC();
run_step.dependOn(&exe_c23.step);
}
}
// fn checkCmake() void {} // nofmt nolint nobuild noproj
fn fmtCpp(b: *std.Build, run_step: *std.Build.Step) void {
for (SingleCppFiles[0..]) |cfile| {
const run_clang_format_check = b.addSystemCommand(&.{ "clang-format", "--dry-run", "--Werror" });
run_clang_format_check.addArg(cfile);
run_step.dependOn(&run_clang_format_check.step);
}
}
fn lintCpp(b: *std.Build, run_step: *std.Build.Step) void {
for (SingleCppFiles[0..]) |cfile| {
// clang-tidy clang-tidy_flags file -- clang_flags
const run_clang_tidy_check = b.addSystemCommand(&.{"clang-tidy"});
run_clang_tidy_check.addArg(cfile);
run_clang_tidy_check.addArg("--");
run_clang_tidy_check.addArgs(&cpp14_flags);
run_step.dependOn(&run_clang_tidy_check.step);
}
}
fn buildCpp(
b: *std.Build,
target: ResolvedTarget,
optimize: OptimizeMode,
run_step: *std.Build.Step,
) void {
var cpp14flags: []const []const u8 = &cpp14_flags;
var cpp17flags: []const []const u8 = &cpp17_flags;
var cpp20flags: []const []const u8 = &cpp20_flags;
var cpp23flags: []const []const u8 = &cpp23_flags;
var cpp26flags: []const []const u8 = &cpp26_flags;
if (target.result.isMusl()) {
cpp14flags = &(cpp14_flags ++ cppmusl_flag);
cpp17flags = &(cpp17_flags ++ cppmusl_flag);
cpp20flags = &(cpp20_flags ++ cppmusl_flag);
cpp23flags = &(cpp23_flags ++ cppmusl_flag);
cpp26flags = &(cpp26_flags ++ cppmusl_flag);
}
for (SingleCppFiles[0..]) |cppfile| {
const exe_cppdefault = b.addExecutable(.{
.name = std.fs.path.stem(std.fs.path.basename(cppfile)),
.target = target,
.optimize = optimize,
});
exe_cppdefault.addCSourceFile(.{ .file = b.path(cppfile) });
exe_cppdefault.linkLibCpp();
run_step.dependOn(&exe_cppdefault.step);
const exe_cpp14 = b.addExecutable(.{
.name = std.fs.path.stem(std.fs.path.basename(cppfile)),
.target = target,
.optimize = optimize,
});
exe_cpp14.addCSourceFile(.{ .file = b.path(cppfile), .flags = cpp14flags });
exe_cpp14.linkLibCpp();
run_step.dependOn(&exe_cpp14.step);
const exe_cpp17 = b.addExecutable(.{
.name = std.fs.path.stem(std.fs.path.basename(cppfile)),
.target = target,
.optimize = optimize,
});
exe_cpp17.addCSourceFile(.{ .file = b.path(cppfile), .flags = cpp17flags });
exe_cpp17.linkLibCpp();
run_step.dependOn(&exe_cpp17.step);
const exe_cpp20 = b.addExecutable(.{
.name = std.fs.path.stem(std.fs.path.basename(cppfile)),
.target = target,
.optimize = optimize,
});
exe_cpp20.addCSourceFile(.{ .file = b.path(cppfile), .flags = cpp20flags });
exe_cpp20.linkLibCpp();
run_step.dependOn(&exe_cpp20.step);
const exe_cpp23 = b.addExecutable(.{
.name = std.fs.path.stem(std.fs.path.basename(cppfile)),
.target = target,
.optimize = optimize,
});
exe_cpp23.addCSourceFile(.{ .file = b.path(cppfile), .flags = cpp23flags });
exe_cpp23.linkLibCpp();
run_step.dependOn(&exe_cpp23.step);
const exe_cpp26 = b.addExecutable(.{
.name = std.fs.path.stem(std.fs.path.basename(cppfile)),
.target = target,
.optimize = optimize,
});
exe_cpp26.addCSourceFile(.{ .file = b.path(cppfile), .flags = cpp26flags });
exe_cpp26.linkLibCpp();
run_step.dependOn(&exe_cpp26.step);
}
}
// fn checkCs() void {} // nofmt nolint nobuild noproj
// fn checkCss() void {} // nofmt nolint nobuild noproj
// fn checkFish() void {} // nofmt nolint nobuild noproj
// fn checkJava() void {} // nofmt nolint nobuild noproj
// fn checkJs() void {} // nofmt nolint nobuild noproj
fn fmtLua(b: *std.Build, run_step: *std.Build.Step) void {
for (SingleLuaFiles[0..]) |luafile| {
const run_stylua_check = b.addSystemCommand(&.{ "stylua", "--check" });
run_stylua_check.addArg(luafile);
run_step.dependOn(&run_stylua_check.step);
}
}
fn lintLua(b: *std.Build, run_step: *std.Build.Step) void {
for (SingleLuaFiles[0..]) |luafile| {
const run_luacheck = b.addSystemCommand(&.{ "luacheck", "--no-color", "-q" });
run_luacheck.addArg(luafile);
const expected_msg =
\\Total: 0 warnings / 0 errors in 1 file
\\
;
run_luacheck.expectStdOutEqual(expected_msg);
run_step.dependOn(&run_luacheck.step);
}
}
// fn checkNix() void {} // nofmt nolint nobuild noproj
// fn checkPhp() void {} // nofmt nolint nobuild noproj
// fn checkPs1() void {} // nofmt nolint nobuild noproj
// fn checkPy() void {} // nofmt nolint nobuild noproj
// fn checkRs() void {} // nofmt nolint nobuild noproj
fn fmtSh(b: *std.Build, run_step: *std.Build.Step) void {
// shfmt has no way to disable fmt / check mode, so it is not enabled
_ = b;
_ = run_step;
// for (SingleShFiles[0..]) |shfile| {
// const run_shfmt_check = b.addSystemCommand(&.{"shfmt"});
// run_shfmt_check.addArg(shfile);
// run_step.dependOn(&run_shfmt_check.step);
// }
}
fn lintSh(b: *std.Build, run_step: *std.Build.Step) void {
for (SingleShFiles[0..]) |shfile| {
const run_shellcheck = b.addSystemCommand(&.{"shellcheck"});
run_shellcheck.addArg(shfile);
run_step.dependOn(&run_shellcheck.step);
}
}
// fn checkTex() void {} // nofmt nolint nobuild noproj
fn fmtZig(b: *std.Build, run_step: *std.Build.Step) void {
for (SingleZigFiles[0..]) |zigfile| {
const run_shellcheck = b.addSystemCommand(&.{ "zig", "fmt", "--check" });
run_shellcheck.addArg(zigfile);
run_step.dependOn(&run_shellcheck.step);
}
}
fn lintZig(b: *std.Build, run_step: *std.Build.Step) void {
for (SingleZigFiles[0..]) |zigfile| {
const run_shellcheck = b.addSystemCommand(&.{ "zig", "ast-check" });
run_shellcheck.addArg(zigfile);
run_step.dependOn(&run_shellcheck.step);
}
}
fn buildZig(
b: *std.Build,
target: ResolvedTarget,
optimize: OptimizeMode,
run_step: *std.Build.Step,
) void {
for (SingleZigFiles[0..]) |zigfile| {
const exe_zigfile = b.addExecutable(.{
.name = std.fs.path.stem(std.fs.path.basename(zigfile)),
.root_source_file = b.path(zigfile),
.target = target,
.optimize = optimize,
});
run_step.dependOn(&exe_zigfile.step);
}
}
fn testZig(
b: *std.Build,
target: ResolvedTarget,
optimize: OptimizeMode,
run_step: *std.Build.Step,
) void {
for (SingleZigFiles[0..]) |zigfile| {
const zigfile_unit_tests = b.addTest(.{
.root_source_file = b.path(zigfile),
.target = target,
.optimize = optimize,
});
const run_zigfile_unit_tests = b.addRunArtifact(zigfile_unit_tests);
run_step.dependOn(&run_zigfile_unit_tests.step);
}
}
// Fetch and workaround Macos not setting executable bit.
// Use 'zig fetch' to download and unpack the specified URL and verify the checksum.
// TODO use this for clang-format, clang-tidy
fn fetch(b: *std.Build, options: struct {
url: []const u8,
file_name: []const u8,
hash: ?[]const u8,
}) std.Build.LazyPath {
const copy_from_cache = b.addRunArtifact(b.addExecutable(.{
.name = "copy-from-cache",
.root_source_file = b.addWriteFiles().add("main.zig",
\\const builtin = @import("builtin");
\\const std = @import("std");
\\const assert = std.debug.assert;
\\
\\pub fn main() !void {
\\ var arena = std.heap.ArenaAllocator.init(std.heap.page_allocator);
\\ const allocator = arena.allocator();
\\ const args = try std.process.argsAlloc(allocator);
\\ assert(args.len == 6);
\\
\\ const hash_and_newline = try std.fs.cwd().readFileAlloc(allocator, args[2], 128);
\\ assert(hash_and_newline[hash_and_newline.len - 1] == '\n');
\\ const hash = hash_and_newline[0 .. hash_and_newline.len - 1];
\\ if (!std.mem.eql(u8, args[5], hash)) {
\\ std.debug.panic(
\\ \\bad hash
\\ \\specified: {s}
\\ \\downloaded: {s}
\\ \\
\\ , .{ args[5], hash });
\\ }
\\
\\ const source_path = try std.fs.path.join(allocator, &.{ args[1], hash, args[3] });
\\ try std.fs.cwd().copyFile(
\\ source_path,
\\ std.fs.cwd(),
\\ args[4],
\\ // TODO(Zig): https://github.com/ziglang/zig/pull/21555
\\ .{ .override_mode = if (builtin.target.os.tag == .macos) 0o777 else null },
\\ );
\\}
),
.target = b.graph.host,
}));
copy_from_cache.addArg(
b.graph.global_cache_root.join(b.allocator, &.{"p"}) catch @panic("OOM"),
);
copy_from_cache.addFileArg(
b.addSystemCommand(&.{ b.graph.zig_exe, "fetch", options.url }).captureStdOut(),
);
copy_from_cache.addArg(options.file_name);
const result = copy_from_cache.addOutputFileArg(options.file_name);
if (options.hash) |hash| {
copy_from_cache.addArg(hash);
}
return result;
}
// zig cc flags
const cmusl_flag = [_][]const u8{"-Wno-disabled-macro-expansion"};
const c89_flags = [_][]const u8{ "-std=c89", "-Werror", "-Weverything" };
const c99_flags = [_][]const u8{ "-std=c99", "-Werror", "-Weverything", "-Wno-unsafe-buffer-usage", "-Wno-declaration-after-statement", "-Wno-switch-default" };
const c11_flags = [_][]const u8{ "-std=c11", "-Werror", "-Weverything", "-Wno-unsafe-buffer-usage", "-Wno-declaration-after-statement", "-Wno-switch-default", "-Wno-pre-c11-compat" };
const c17_flags = [_][]const u8{ "-std=c17", "-Werror", "-Weverything", "-Wno-unsafe-buffer-usage", "-Wno-declaration-after-statement", "-Wno-switch-default", "-Wno-pre-c11-compat" };
const c23_flags = [_][]const u8{ "-std=c23", "-Werror", "-Weverything", "-Wno-unsafe-buffer-usage", "-Wno-declaration-after-statement", "-Wno-switch-default", "-Wno-c++98-compat", "-Wno-pre-c11-compat", "-Wno-pre-c23-compat" };
const SingleCFiles = [_][]const u8{
// "example/gdb/adv/catch.c",
// "example/gdb/adv/dll_injection_unix.c",
// "example/gdb/adv/dll_injection_win.c",
// "example/gdb/adv/fn_instrumentation.c",
// "example/gdb/adv/fn_runtime_patching.c",
// "example/gdb/adv/ld_preload.c",
// "example/gdb/adv/ld_preload_replacements.c", // gdb project
"example/gdb/inf_loop.c",
// "example/link/main.c",
// "example/link/memcpy.c", // custom link example
// "example/memcpy_avx.c", // unsafe pointer arithmetic
"example/opaque.c",
// "example/openssl_aes.c", // requires -Wpadded to workaround upstream openssl
"example/operator_precedence.c",
"example/portable_printf.c",
// "example/provenance_miscompilation/extern.c",
// "example/provenance_miscompilation/ptr_provenance_miscompilation.c",
"example/sequence_points.c",
"example/util_string.c",
"example/why_clang_tidy.c",
"templates/colors.c",
"templates/common.c",
// "templates/common_c89.c", // separately tested
// "templates/flags.c", // no usable code
"templates/hacks.c",
"templates/server.c",
};
// zig c++ flags
const cppmusl_flag = [_][]const u8{"-Wno-disabled-macro-expansion"};
const cpp14_flags = [_][]const u8{ "-std=c++14", "-Werror", "-Weverything", "-Wno-c++98-compat-pedantic", "-Wno-unsafe-buffer-usage", "-Wno-switch-default" };
const cpp17_flags = [_][]const u8{ "-std=c++17", "-Werror", "-Weverything", "-Wno-c++98-compat-pedantic", "-Wno-unsafe-buffer-usage", "-Wno-switch-default" };
const cpp20_flags = [_][]const u8{ "-std=c++20", "-Werror", "-Weverything", "-Wno-c++98-compat-pedantic", "-Wno-c++20-compat", "-Wno-unsafe-buffer-usage", "-Wno-switch-default" };
const cpp23_flags = [_][]const u8{ "-std=c++23", "-Werror", "-Weverything", "-Wno-c++98-compat-pedantic", "-Wno-c++20-compat", "-Wno-unsafe-buffer-usage", "-Wno-switch-default" };
const cpp26_flags = [_][]const u8{ "-std=c++26", "-Werror", "-Weverything", "-Wno-c++98-compat-pedantic", "-Wno-c++20-compat", "-Wno-unsafe-buffer-usage", "-Wno-switch-default" };
const SingleCppFiles = [_][]const u8{
"example/common.cpp",
// "example/cpp23_modules/main_clang.cpp", C++23
// "example/cpp23_modules/main_msvc.cpp", C++23
// "example/implicit_string_conversion.cpp", // additional flags show problem
"example/minimal_cpp.cpp",
"example/msvc.cpp",
"example/utf8/stringable.cpp",
// "example/utf8/tests.cpp", C++20
"templates/common.cpp",
// "templates/flags.cpp", flag collection, no code
"templates/hacks.cpp",
};
const SingleLuaFiles = [_][]const u8{
".config/nvim/init.lua",
".config/nvim/lua/dap/my_dap.lua",
".config/nvim/lua/dap/my_dap_pickers.lua",
".config/nvim/lua/my_aerial.lua",
".config/nvim/lua/my_buf.lua",
".config/nvim/lua/my_cmds.lua",
".config/nvim/lua/my_dap.lua",
".config/nvim/lua/my_fmt.lua",
".config/nvim/lua/my_gdb.lua",
".config/nvim/lua/my_gitsign.lua",
".config/nvim/lua/my_harpoon.lua",
".config/nvim/lua/my_hydra.lua",
".config/nvim/lua/my_jfind.lua",
".config/nvim/lua/my_keymaps.lua",
".config/nvim/lua/my_lint.lua",
".config/nvim/lua/my_lsp.lua",
".config/nvim/lua/my_nvimcmp.lua",
".config/nvim/lua/my_oil.lua",
".config/nvim/lua/my_opts.lua",
".config/nvim/lua/my_over.lua",
".config/nvim/lua/my_packer.lua",
".config/nvim/lua/my_plugins.lua",
".config/nvim/lua/my_rust.lua",
".config/nvim/lua/my_statusline.lua",
".config/nvim/lua/my_surround.lua",
".config/nvim/lua/my_telesc.lua",
".config/nvim/lua/my_treesitter.lua",
".config/nvim/lua/my_utils.lua",
".config/nvim/lua/overseer/component/validate.lua",
".config/nvim/lua/overseer/template/user/cpp_build.lua",
".config/nvim/lua/overseer/template/user/run_script.lua",
"templates/callback.lua",
"templates/common.lua",
"templates/min_gitsigns.lua",
"templates/min_init.lua",
"templates/nvim.lua",
"templates/profile.lua",
"windows/.config/wezterm/wezterm.lua",
};
const SingleShFiles = [_][]const u8{
"checkHealth.sh",
"crosscompiling/entr.sh",
"crosscompiling/watchFileTouchRm.sh",
"crosscompiling/zcc.sh",
"crosscompiling/zcpp.sh",
// "example/bracketsChecking.sh", // shell piping is cursed
"example/link/link1.sh",
"example/provenance_miscompilation/cerberus_install.sh",
"fileBackup.sh",
"fileRemove.sh",
"fileRestore.sh",
"mustcopy/cpfiles.sh",
"scr/bWSLZigWinDevKit.sh",
"scr/bare_git/exec_from_other_worktree.sh",
"scr/bare_git/getFiles.sh",
"scr/bare_git/min_ctags.sh",
"scr/bare_git/prepareBuild.sh",
"scr/bare_git/setupWorktree.sh",
"scr/basic_ctags.sh",
"scr/bisect.sh",
"scr/checkup_git.sh",
"scr/ctags.sh",
"scr/deploy.sh",
"scr/fZigWinDevKit.sh",
"scr/gen_ssh.sh",
"scr/installNixFlakes.sh",
"scr/installOverlays.sh",
"scr/merge_compilercommands.sh",
"scr/mkVid.sh",
"scr/restart_pulseaudio.sh",
"scr/scan.sh",
"scr/setupOverlays.sh",
"scr/uninstallNixMultiUser.sh",
"scr/unlock_screen.sh",
"scr/updateOverlays.sh",
"symlinkInstall.sh",
"symlinkUninstall.sh",
"templates/common.sh",
"templates/crosscompiling_zig.sh",
"templates/gdbinit.sh",
"templates/update_nix_nixos.sh",
};
const SingleZigFiles = [_][]const u8{
// "build.zig", // build file
// "example/copyhound.zig", // missing dep
"example/sudo/sudo_shell.zig",
// "example/zigpkg/build.zig",
// "example/zigpkg/src/main.zig",
// "example/zigpkg/src/root.zig", // zigpkg project
"scr/sh.zig",
"templates/common.zig",
"templates/hacks.zig",
};