smol-rs / polling

Portable interface to epoll, kqueue, event ports, and wepoll
Apache License 2.0
551 stars 68 forks source link

Support the x86_64-uwp-windows-msvc target #138

Open notgull opened 1 year ago

notgull commented 1 year ago

x86_64-uwp-windows-msvc is a Universal Windows Platform app, which has different restrictions than the pc variant of Windows that most apps target. For our purposes, the main restriction is that we can't use the underlying NT system APIs. Unfortunately this means that we can't use the \Device\Afd hack.

It seems like the only way to solve this would be to use the thread pool that we currently use for waitable handles, but run select() on it instead of waiting for the handle.

taiki-e commented 1 year ago

I thought that Microsoft itself was moving away from UWP. If so, I think they are still maintaining it for compatibility, but it is unclear if it is worth our time to support it. https://github.com/microsoft/WindowsAppSDK/discussions/1615

notgull commented 1 year ago

Hmm, you're right. It would still be nice to be able to create apps that can go on the Windows App store, which I think is where the "no NT API" restriction comes from.