From 0c0d94a6da7f41ab3eace838ffcbd98d24723627 Mon Sep 17 00:00:00 2001 From: Andrew Kelley Date: Sat, 12 Jul 2025 21:12:58 -0700 Subject: [PATCH] std.net: wasi does not have unix sockets --- lib/std/net.zig | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/std/net.zig b/lib/std/net.zig index 0bf3ab8c7d..f43c2f9b53 100644 --- a/lib/std/net.zig +++ b/lib/std/net.zig @@ -19,6 +19,7 @@ const File = std.fs.File; // first release to support them. pub const has_unix_sockets = switch (native_os) { .windows => builtin.os.version_range.windows.isAtLeast(.win10_rs4) orelse false, + .wasi => false, else => true, }; @@ -1397,6 +1398,10 @@ fn parseHosts( } test parseHosts { + if (builtin.os.tag == .wasi) { + // TODO parsing addresses should not have OS dependencies + return error.SkipZigTest; + } var reader: std.io.Reader = .fixed( \\127.0.0.1 localhost \\::1 localhost