diff options
Diffstat (limited to 'build.zig')
| -rw-r--r-- | build.zig | 21 |
1 files changed, 21 insertions, 0 deletions
@@ -524,6 +524,27 @@ pub fn build(b: *std.Build) void { } b.step("hxparity", "run the file-vs-pty editing parity suite (-- [--waivers w.jsonl] <cases.jsonl>...)").dependOn(&run_hxparity.step); + // the language-backend scoreboard. ReleaseFast on purpose: the point + // is to compare backends' real cost, and a Debug build measures the + // safety checks of whichever one allocates most. It links the same + // core module as hxdiff, so `lsp.query` here is the one the editor + // runs. + const lspbench = b.addExecutable(.{ + .name = "pardes-lspbench", + .root_module = b.createModule(.{ + .target = target, + .optimize = .ReleaseFast, + .root_source_file = b.path("test/lspbench.zig"), + .link_libc = true, + }), + }); + lspbench.root_module.addImport("pardes", hx_core_mod); + b.installArtifact(lspbench); + const run_lspbench = b.addRunArtifact(lspbench); + if (b.args) |args| run_lspbench.addArgs(args); + run_lspbench.setCwd(b.path(".")); + b.step("lspbench", "language-backend latency + feature matrix (-- [--json] [repo-root])").dependOn(&run_lspbench.step); + // modal.zig is pure std — its inline unit tests run here const unit = b.addTest(.{ .root_module = b.createModule(.{ .target = target, |
