Last active
August 2, 2024 19:28
-
-
Save travisstaloch/ed5bb79a533f47d9649bd1000bec954f to your computer and use it in GitHub Desktop.
minimal build.zig for wasm, August 2024, zig version 0.14.0-dev.591+1c35e73b6
This file contains hidden or 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.Target.Query.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