-
Notifications
You must be signed in to change notification settings - Fork 68
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
m(windows): Reimplement Wepoll in Rust (#88)
Reimplements the C-based wepoll backend in Rust, using some handwritten code. This PR also implements bindings to the I/O Completion Ports and \Device\Afd APIs. For more information on the latter, see my blog post on the subject: https://notgull.github.io/device-afd/ Note that the IOCP API is wrapped using a `Pin`-oriented "CompletionHandle" system that is relatively brittle. This should be replaced with a better model when one becomes available.
- Loading branch information
Showing
10 changed files
with
1,826 additions
and
267 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,10 +7,10 @@ version = "2.5.2" | |
authors = ["Stjepan Glavina <[email protected]>"] | ||
edition = "2018" | ||
rust-version = "1.47" | ||
description = "Portable interface to epoll, kqueue, event ports, and wepoll" | ||
description = "Portable interface to epoll, kqueue, event ports, and IOCP" | ||
license = "Apache-2.0 OR MIT" | ||
repository = "https://github.com/smol-rs/polling" | ||
keywords = ["mio", "epoll", "kqueue", "iocp", "wepoll"] | ||
keywords = ["mio", "epoll", "kqueue", "iocp"] | ||
categories = ["asynchronous", "network-programming", "os"] | ||
exclude = ["/.*"] | ||
|
||
|
@@ -32,13 +32,19 @@ autocfg = "1" | |
libc = "0.2.77" | ||
|
||
[target.'cfg(windows)'.dependencies] | ||
wepoll-ffi = { version = "0.1.2", features = ["null-overlapped-wakeups-patch"] } | ||
bitflags = "1.3.2" | ||
concurrent-queue = "2.1.0" | ||
pin-project-lite = "0.2.9" | ||
|
||
[target.'cfg(windows)'.dependencies.windows-sys] | ||
version = "0.45" | ||
features = [ | ||
"Win32_Networking_WinSock", | ||
"Win32_System_IO", | ||
"Win32_Foundation" | ||
"Win32_System_LibraryLoader", | ||
"Win32_System_WindowsProgramming", | ||
"Win32_Storage_FileSystem", | ||
"Win32_Foundation", | ||
] | ||
|
||
[dev-dependencies] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.