wa-lang.org/wazero@v1.0.2/examples/allocation/zig/testdata/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 lib = b.addSharedLibrary("greet", "greet.zig", .unversioned); 10 lib.setTarget(CrossTarget{ .cpu_arch = .wasm32, .os_tag = .freestanding }); 11 lib.setBuildMode(mode); 12 lib.install(); 13 }