From 8d0363613299b36e0a763a3adf3f1f174aa8fbfa Mon Sep 17 00:00:00 2001 From: Jonathan Marler Date: Sat, 26 Apr 2025 10:33:23 -0600 Subject: [PATCH] build.zig: fix building raylib for emscripten build.zig doesn't support the examples for the emscripten OS but it does support the raylib library. However, the examples panic if emscripten is configured which prevents it from building the library. I've replaced this panic with a fail step to fix this. --- build.zig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.zig b/build.zig index b3da65984..60356a215 100644 --- a/build.zig +++ b/build.zig @@ -504,7 +504,7 @@ fn addExamples( raylib: *std.Build.Step.Compile, ) !*std.Build.Step { if (target.result.os.tag == .emscripten) { - @panic("Emscripten building via Zig unsupported"); + return &b.addFail("Emscripten building via Zig unsupported").step; } const all = b.step(module, "All " ++ module ++ " examples");