github.com/tetratelabs/wazero@v1.7.3-0.20240513003603-48f702e154b5/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  }