Closed krichprollsch closed 2 months ago
It seems the GH CPU we use to compile the project supports sha
instruction, the code passes this check https://github.com/ziglang/zig/blob/master/lib/std/crypto/sha2.zig#L241 but my own CPU doesn't.
const std = @import("std");
const builtin = @import("builtin");
pub fn main() !void {
if (std.Target.x86.featureSetHas(builtin.cpu.features, .sha)) {
std.debug.print("sha\n", .{});
}
if (std.Target.x86.featureSetHas(builtin.cpu.features, .avx2)) {
std.debug.print("avx\n", .{});
}
}
The result on my computer is:
$ zig run main.zig
avx
Using the nightly build, we get an
illegal instruction
error when requesting a website using TLS on linux.