Open
Description
Zig Version
0.15.0-dev.822+dd75e7bcb
Steps to Reproduce and Observed Behavior
Test case:
test "RapidHash" {
const bytes: []const u8 = "abcdefgh" ** 128;
const hash = std.hash.RapidHash.hash(0, bytes);
std.debug.print("sizeof usize is {}, hash is {x}\n", .{ @sizeOf(usize), hash });
}
Build on 32-bit target:
zig build -Dtarget=riscv32-linux test
Compilation error:
std/hash/RapidHash.zig:26:25: error: expected type 'usize', found 'u64'
b = ((r32(k[d..]) << 32) | r32(k[(e - d)..]));
^
std/hash/RapidHash.zig:26:25: note: unsigned 32-bit int cannot represent all possible unsigned 64-bit values
Expected Behavior
The test case should compile and run