Skip to content

Commit f6665fa

Browse files
committed
Added module support
1 parent 32fd3ed commit f6665fa

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

build.zig

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
const std = @import("std");
22

3-
pub fn build(b: *std.Build) void {
3+
pub fn build(b: *std.Build) !void {
44
const target = b.standardTargetOptions(.{});
55

66
const optimize = b.standardOptimizeOption(.{});
@@ -15,6 +15,12 @@ pub fn build(b: *std.Build) void {
1515

1616
b.installArtifact(lib);
1717

18+
const module = b.createModule(.{
19+
.source_file = .{ .path = "src/main.zig" },
20+
});
21+
22+
try b.modules.put(b.dupe("wasm"), module);
23+
1824
var main_tests = b.addTest(.{
1925
.root_source_file = .{ .path = "src/main.zig" },
2026
.target = target,

0 commit comments

Comments
 (0)