wa-lang.org/wazero@v1.0.2/imports/wasi_snapshot_preview1/example/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 // Standard release options allow the person running `zig build` to select 6 // between Debug, ReleaseSafe, ReleaseFast, and ReleaseSmall. 7 const mode = b.standardReleaseOptions(); 8 9 const exe = b.addExecutable("cat", "cat.zig"); 10 exe.setTarget(CrossTarget{ .cpu_arch = .wasm32, .os_tag = .wasi }); 11 exe.setBuildMode(mode); 12 exe.install(); 13 }