github.com/bananabytelabs/wazero@v0.0.0-20240105073314-54b22a776da8/internal/testing/dwarftestdata/testdata/zig/build.zig (about) 1 const std = @import("std"); 2 const CrossTarget = std.zig.CrossTarget; 3 4 pub fn build(b: *std.build.Builder) void { 5 // Don't use wasi because this calls os_exit on panic. An ExitError isn't 6 // wrapped due to logic in FromRecovered. 7 // TODO: Find another way to avoid re-wrapping! 8 const target = .{.cpu_arch = .wasm32, .os_tag = .freestanding}; 9 const optimize = b.standardOptimizeOption(.{}); 10 11 const exe = b.addExecutable(.{ 12 .name = "main", 13 .root_source_file = .{ .path = "main.zig" }, 14 .target = target, 15 .optimize = optimize, 16 }); 17 18 b.installArtifact(exe); 19 }