diff options
| author | Can Celik <ogulcancelik@gmail.com> | 2026-04-04 19:22:04 +0300 |
|---|---|---|
| committer | Can Celik <ogulcancelik@gmail.com> | 2026-04-05 01:23:06 +0300 |
| commit | 41dd733ca7123c9ac4bfc6c781697a660e95b052 (patch) | |
| tree | 3fc91815ca139ef2e0b281bba0abda4ef15175f4 /vendor/libghostty-vt/src/build/GhosttyBench.zig | |
| parent | 55c138263e190a1e79d4b997bfb9397306c0ec1f (diff) | |
feat: finish ghostty pane backend integration
Diffstat (limited to 'vendor/libghostty-vt/src/build/GhosttyBench.zig')
| -rw-r--r-- | vendor/libghostty-vt/src/build/GhosttyBench.zig | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/vendor/libghostty-vt/src/build/GhosttyBench.zig b/vendor/libghostty-vt/src/build/GhosttyBench.zig new file mode 100644 index 00000000..27dda880 --- /dev/null +++ b/vendor/libghostty-vt/src/build/GhosttyBench.zig @@ -0,0 +1,55 @@ +//! GhosttyBench generates all the Ghostty benchmark helper binaries. +const GhosttyBench = @This(); + +const std = @import("std"); +const SharedDeps = @import("SharedDeps.zig"); + +steps: []*std.Build.Step.Compile, + +pub fn init( + b: *std.Build, + deps: *const SharedDeps, +) !GhosttyBench { + var steps: std.ArrayList(*std.Build.Step.Compile) = .empty; + errdefer steps.deinit(b.allocator); + + // Our synthetic data generator + { + const exe = b.addExecutable(.{ + .name = "ghostty-gen", + .root_module = b.createModule(.{ + .root_source_file = b.path("src/main_gen.zig"), + .target = deps.config.target, + // We always want our datagen to be fast because it + // takes awhile to run. + .optimize = .ReleaseFast, + }), + }); + exe.linkLibC(); + _ = try deps.add(exe); + try steps.append(b.allocator, exe); + } + + // Our benchmarking application. + { + const exe = b.addExecutable(.{ + .name = "ghostty-bench", + .root_module = b.createModule(.{ + .root_source_file = b.path("src/main_bench.zig"), + .target = deps.config.target, + // We always want our benchmarks to be in release mode. + .optimize = .ReleaseFast, + }), + }); + exe.linkLibC(); + _ = try deps.add(exe); + try steps.append(b.allocator, exe); + } + + return .{ .steps = steps.items }; +} + +pub fn install(self: *const GhosttyBench) void { + const b = self.steps[0].step.owner; + for (self.steps) |step| b.installArtifact(step); +} |
