From a68564e9fb9fb8be6d997db5e6ad9148fb506d18 Mon Sep 17 00:00:00 2001 From: Gabriel Schneider Date: Tue, 30 Jun 2026 13:00:23 -0300 Subject: images? lol --- build.zig | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'build.zig') diff --git a/build.zig b/build.zig index c5c85857..88d2123a 100644 --- a/build.zig +++ b/build.zig @@ -82,6 +82,18 @@ pub fn build(b: *std.Build) void { vaxis_mod.addImport("uucode", uucode_mod); exe.root_module.addImport("vaxis", vaxis_mod); + // zstbi: C (stb_image)-backed image decoder for the image-viewer panes. We use + // it instead of zigimg because zigimg's pure-Zig decoder crashes the Zig 0.16 + // compiler here; stb_image is plain C (extern fns), so it compiles fine, decodes + // every common format, and offers downscaling. Its module ("root") carries the + // C source + include path + libc, so importing it is all that's needed. + const zstbi_mod = b.dependency("zstbi", .{ .target = target, .optimize = optimize }).module("root"); + exe.root_module.addImport("zstbi", zstbi_mod); + + // Install the exe so `zig build` (and `zig build install`) produces it in + // zig-out/bin for global install, not just as a hidden dep of `run`/`test`. + b.installArtifact(exe); + const run_exe = b.addRunArtifact(exe); const run = b.step("run", "descend to the pardes"); -- cgit v1.3