zig module releasefast

Signed-off-by: jmug <u.g.a.mariano@gmail.com>
This commit is contained in:
Mariano Uvalle 2025-04-28 18:24:45 -07:00
parent aa1e940362
commit d6826160c2
3 changed files with 4 additions and 3 deletions

View file

@ -14,7 +14,8 @@ pub export fn addUpTo(to: i32) i32 {
}
test "addUpTo" {
const expected: u32 = 15;
const actual = addUpTo(6);
const expected: u32 = 2649310;
const actual = addUpTo(1000);
@import("std").debug.print("{d}\n", .{actual});
try expect(actual == expected);
}

2
testdata/build.zig vendored
View file

@ -11,7 +11,7 @@ pub fn build(b: *std.Build) void {
const add_up_to_mod = b.createModule(.{
.root_source_file = b.path("addupto.zig"),
.target = wasmTarget,
.optimize = .ReleaseSmall,
.optimize = .ReleaseFast,
});
const add_up_to_native_mod = b.createModule(.{
.root_source_file = b.path("addupto.zig"),

Binary file not shown.