# Windows Evented Io implementation？

**URL:** <https://ziggit.dev/t/windows-evented-io-implementation/16035>\
**Category:** Brainstorming\
**Tags:** standard-library, io\
**Created:** [June 9, 2026, 5:09am UTC](https://ziggit.dev/t/windows-evented-io-implementation/16035 "2026-06-09T05:09:14Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![cers](https://ziggit.dev/user_avatar/ziggit.dev/cers/32/9050_2.png) [@cers](https://ziggit.dev/u/cers)\
**Post date:** [June 9, 2026, 5:09am UTC](https://ziggit.dev/t/windows-evented-io-implementation/16035/1 "2026-06-09T05:09:14Z")

</div>

```zig
pub const Evented = if (fiber.supported) switch (builtin.os.tag) {
    .linux => Uring,
    .dragonfly, .freebsd, .netbsd, .openbsd => Kqueue,
    .driverkit, .ios, .maccatalyst, .macos, .tvos, .visionos, .watchos => Dispatch,
    else => void,
} else void; // context-switching code not implemented yet

```

在当前std.Io.Evented中，Linux、BSD、Macos or ios都有对应的Evented Io实现，但是Windows从开始到现在都是void，我提交了Windows IOCP的ntdll的代码，但是Andrew Kelley说让我讨论一下就知道为什么这些Windows IOCP的代码不能被接收，可能是我写的不对？还是说在Windows下不能用ICOP来实现std.Io的Evented？

---

<div class="post-metadata">

**Author:** ![lalinsky](https://ziggit.dev/user_avatar/ziggit.dev/lalinsky/32/3720_2.png) [@lalinsky](https://ziggit.dev/u/lalinsky)\
**Post date:** [June 9, 2026, 5:14am UTC](https://ziggit.dev/t/windows-evented-io-implementation/16035/2 "2026-06-09T05:14:31Z")

</div>

As far as I can see, you added just the ntdll function declarations, not the actual IOCP implementation of `std.Io`. Zig has a policy to not have wrappers in `std.os.windows`, unless they are used. I don’t know enough about the dev process to tell if a full implementation would be accepted.

---

<div class="post-metadata">

**Author:** ![cers](https://ziggit.dev/user_avatar/ziggit.dev/cers/32/9050_2.png) [@cers](https://ziggit.dev/u/cers)\
**Post date:** [June 9, 2026, 5:18am UTC](https://ziggit.dev/t/windows-evented-io-implementation/16035/3 "2026-06-09T05:18:26Z")

</div>

完整的IOCP实现我目前还没搞清楚具体怎么做，可能需要实现vtable，涉及到reader、writer、net等具体实现，可能是个庞杂的工程

---

<div class="post-metadata">

**Author:** ![lalinsky](https://ziggit.dev/user_avatar/ziggit.dev/lalinsky/32/3720_2.png) [@lalinsky](https://ziggit.dev/u/lalinsky)\
**Post date:** [June 9, 2026, 5:22am UTC](https://ziggit.dev/t/windows-evented-io-implementation/16035/4 "2026-06-09T05:22:07Z")

</div>

Yes, the complete implementation will he a fairly complex project. If you are interested in tackling that, first discussing the details with the core team would make sense.

If you want to just use evented io on windows, not develop the io implementation, check our my “zio” project. I use regular winapi APIs, not ntdll.
