github.com/tetratelabs/wazero@v1.7.3-0.20240513003603-48f702e154b5/imports/wasi_snapshot_preview1/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 const target = .{.cpu_arch = .wasm32, .os_tag = .wasi}; 6 const optimize = b.standardOptimizeOption(.{}); 7 8 const exe = b.addExecutable(.{ 9 .name = "wasi", 10 .root_source_file = .{ .path = "wasi.zig" }, 11 .target = target, 12 .optimize = optimize, 13 }); 14 15 std.Build.installArtifact(b, exe); 16 }