Created
January 25, 2024 06:47
-
-
Save travisstaloch/ed5bb79a533f47d9649bd1000bec954f to your computer and use it in GitHub Desktop.
minimal build.zig for wasm, January 2024, zig version 0.12.0-dev.2158+4f2009de1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const std = @import("std"); | |
pub fn build(b: *std.Build) void { | |
const optimize = b.standardOptimizeOption(.{}); | |
const exe = b.addExecutable(.{ | |
.name = "lib", | |
.root_source_file = .{ .path = "src/lib.zig" }, | |
.target = b.resolveTargetQuery(std.zig.CrossTarget.parse( | |
.{ .arch_os_abi = "wasm32-freestanding" }, | |
) catch unreachable), | |
.optimize = optimize, | |
}); | |
exe.entry = .disabled; | |
exe.rdynamic = true; | |
b.installArtifact(exe); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment