From 222bfda9cc2a5b22d737e4657246e3127600fb09 Mon Sep 17 00:00:00 2001 From: jhmaster2000 <32803471+jhmaster2000@users.noreply.github.com> Date: Fri, 17 Nov 2023 17:03:27 -0300 Subject: [PATCH] temp fix for wasm build (see desc) src/api/schema.zig is an autogen'd file by peechy, it is currently impossible to generate this correct file with current peechy version a manually patched peechy was used for this version of the file commited until peechy is properly updated, please avoid running `make wasm` otherwise you will break the wasm build compilation --- src/api/schema.zig | 6 +++--- src/deps/mimalloc | 2 +- src/deps/zlib | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/api/schema.zig b/src/api/schema.zig index 10621a1e55..9408045ffa 100644 --- a/src/api/schema.zig +++ b/src/api/schema.zig @@ -69,7 +69,7 @@ pub const Reader = struct { return try this.read(length); }, u16, u32, i8, i16, i32 => { - return std.mem.readIntSliceNative(T, this.read(length * @sizeOf(T))); + return std.mem.readInt(T, this.read(length * @sizeOf(T))[0 .. length * @sizeOf(T)], @import("builtin").cpu.arch.endian()); }, [:0]const u8, []const u8 => { var i: u32 = 0; @@ -121,7 +121,7 @@ pub const Reader = struct { pub inline fn readInt(this: *Self, comptime T: type) !T { var slice = try this.read(@sizeOf(T)); - return std.mem.readIntSliceNative(T, slice); + return std.mem.readInt(T, slice[0..@sizeOf(T)], @import("builtin").cpu.arch.endian()); } pub inline fn readBool(this: *Self) !bool { @@ -147,7 +147,7 @@ pub const Reader = struct { return try this.readArray([]u8); }, u16, u32, i8, i16, i32 => { - return std.mem.readIntSliceNative(T, try this.read(@sizeOf(T))); + return std.mem.readInt(T, (try this.read(@sizeOf(T)))[0..@sizeOf(T)], @import("builtin").cpu.arch.endian()); }, else => { switch (comptime @typeInfo(T)) { diff --git a/src/deps/mimalloc b/src/deps/mimalloc index 7968d42850..011b62a66b 160000 --- a/src/deps/mimalloc +++ b/src/deps/mimalloc @@ -1 +1 @@ -Subproject commit 7968d4285043401bb36573374710d47a4081a063 +Subproject commit 011b62a66bc74bbfda87b32b54d394a544d9a7f0 diff --git a/src/deps/zlib b/src/deps/zlib index 8856740263..886098f3f3 160000 --- a/src/deps/zlib +++ b/src/deps/zlib @@ -1 +1 @@ -Subproject commit 885674026394870b7e7a05b7bf1ec5eb7bd8a9c0 +Subproject commit 886098f3f339617b4243b286f5ed364b9989e245