From a87fd37bf59a975ba057bec408d2908d6168a084 Mon Sep 17 00:00:00 2001 From: Andrew Kelley Date: Mon, 27 Oct 2025 13:51:14 -0700 Subject: [PATCH] std.Io: make Evented equal void when unimplemented This allows conditional compilation checks. --- lib/std/Io.zig | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/lib/std/Io.zig b/lib/std/Io.zig index 1649341afc..0f69f8ed9c 100644 --- a/lib/std/Io.zig +++ b/lib/std/Io.zig @@ -560,8 +560,14 @@ test { const Io = @This(); pub const Evented = switch (builtin.os.tag) { - .linux => @import("Io/IoUring.zig"), - .dragonfly, .freebsd, .netbsd, .openbsd, .macos, .ios, .tvos, .visionos, .watchos => @import("Io/Kqueue.zig"), + .linux => switch (builtin.cpu.arch) { + .x86_64, .aarch64 => @import("Io/IoUring.zig"), + else => void, // context-switching code not implemented yet + }, + .dragonfly, .freebsd, .netbsd, .openbsd, .macos, .ios, .tvos, .visionos, .watchos => switch (builtin.cpu.arch) { + .x86_64, .aarch64 => @import("Io/Kqueue.zig"), + else => void, // context-switching code not implemented yet + }, else => void, }; pub const Threaded = @import("Io/Threaded.zig");