authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2026-01-07 15:52:34-08:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2026-01-07 17:33:07-08:00
logc0092f5394b918f4a4407b73820574d18edfa1dd
tree4c168adacb55f7c88b980276e4032abc32e2265a
parentcbd75b484f783e4b388ef4b0fb3662fb4c43bbfa

std.Io: expose Kqueue and IoUring directly


1 files changed, 5 insertions(+), 3 deletions(-)

lib/std/Io.zig+5-3
...@@ -540,18 +540,20 @@ test {...@@ -540,18 +540,20 @@ test {
540540
541const Io = @This();541const Io = @This();
542542
543pub const Threaded = @import("Io/Threaded.zig");
543pub const Evented = switch (builtin.os.tag) {544pub const Evented = switch (builtin.os.tag) {
544 .linux => switch (builtin.cpu.arch) {545 .linux => switch (builtin.cpu.arch) {
545 .x86_64, .aarch64 => @import("Io/IoUring.zig"),546 .x86_64, .aarch64 => IoUring,
546 else => void, // context-switching code not implemented yet547 else => void, // context-switching code not implemented yet
547 },548 },
548 .dragonfly, .freebsd, .netbsd, .openbsd, .driverkit, .ios, .maccatalyst, .macos, .tvos, .visionos, .watchos => switch (builtin.cpu.arch) {549 .dragonfly, .freebsd, .netbsd, .openbsd, .driverkit, .ios, .maccatalyst, .macos, .tvos, .visionos, .watchos => switch (builtin.cpu.arch) {
549 .x86_64, .aarch64 => @import("Io/Kqueue.zig"),550 .x86_64, .aarch64 => Kqueue,
550 else => void, // context-switching code not implemented yet551 else => void, // context-switching code not implemented yet
551 },552 },
552 else => void,553 else => void,
553};554};
554pub const Threaded = @import("Io/Threaded.zig");555pub const Kqueue = @import("Io/Kqueue.zig");
556pub const IoUring = @import("Io/IoUring.zig");
555pub const net = @import("Io/net.zig");557pub const net = @import("Io/net.zig");
556558
557userdata: ?*anyopaque,559userdata: ?*anyopaque,