...
1const std = @import("std");
2const CrossTarget = std.zig.CrossTarget;
3
4pub 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}
View as plain text