zig module releasefast
Signed-off-by: jmug <u.g.a.mariano@gmail.com>
This commit is contained in:
parent
aa1e940362
commit
d6826160c2
3 changed files with 4 additions and 3 deletions
5
testdata/addupto.zig
vendored
5
testdata/addupto.zig
vendored
|
|
@ -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
2
testdata/build.zig
vendored
|
|
@ -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"),
|
||||
|
|
|
|||
BIN
testdata/zig-out/bin/addUpTo.wasm
vendored
BIN
testdata/zig-out/bin/addUpTo.wasm
vendored
Binary file not shown.
Loading…
Add table
Add a link
Reference in a new issue