diff --git a/build.zig b/build.zig index 4b0b274..4bdadf7 100644 --- a/build.zig +++ b/build.zig @@ -3,15 +3,13 @@ const sokol = @import("sokol"); const title = "sok"; -const buildForWeb = false; - pub fn build(b: *std.Build) void { const target = b.standardTargetOptions(.{}); const optimize = b.standardOptimizeOption(.{}); const dep_sokol = b.dependency("sokol", .{ .target = target, .optimize = optimize }); - if (!buildForWeb) { + if (!target.result.isWasm()) { // Native exe const exe = b.addExecutable(.{ @@ -96,12 +94,3 @@ pub fn build(b: *std.Build) void { const test_step = b.step("test", "Run unit tests"); test_step.dependOn(&run_exe_unit_tests.step); } - -// for web builds, the Zig code needs to be built into a library and linked with the Emscripten linker -fn buildWeb(b: *std.Build, target: std.Build.ResolvedTarget, optimize: std.Build.OptimizeMode, dep_sokol: *std.Build.Dependency) !void { - _ = b; // autofix - _ = target; // autofix - _ = optimize; // autofix - _ = dep_sokol; // autofix - -}