github.com/wasilibs/wazerox@v0.0.0-20240124024944-4923be63ab5f/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 const target = .{.cpu_arch = .wasm32, .os_tag = .freestanding}; 6 const optimize = b.standardOptimizeOption(.{}); 7 8 const lib = b.addSharedLibrary(.{ 9 .name = "greet", 10 .root_source_file = .{ .path = "greet.zig" }, 11 .target = target, 12 .optimize = optimize, 13 }); 14 lib.rdynamic = true; 15 b.installArtifact(lib); 16 }