9 stable releases
3.0.1 | Oct 20, 2020 |
---|---|
3.0.0 | Oct 2, 2020 |
2.0.0 | Apr 26, 2020 |
1.1.0 | Apr 25, 2020 |
1.0.3 | Apr 6, 2019 |
#180 in Windows APIs
4,697 downloads per month
Used in wepoll-binding
78KB
2K
SLoC
wepoll-sys
wepoll-sys provides unsafe Rust bindings to wepoll. The wepoll library is included in this crate and compiled automatically, removing the need for manually installing it.
Requirements
- Rust 2018
- Windows
- clang
- A compiler such as gcc, the MSVC compiler (
cl.exe
), etc
Usage
Add wepoll-sys as a Windows dependency (since it won't build on other platforms):
[dependencies.'cfg(windows)'.dependencies]
wepoll-sys = "2.0"
Since this crate just provides a generated wrapper around the wepoll library, usage is the same as with the C code. For example:
use wepoll_sys;
fn main() {
let wepoll = wepoll_sys::epoll_create(1);
if wepoll.is_null() {
panic!("epoll_create(1) failed!");
}
// ...
}
lib.rs
:
A unsafe/raw wrapper around wepoll.
The bindings in this crate were originally generated using bindgen, then cleaned up by hand. They are maintained manually to reduce the amount of dependencies and build-time complexity. As wepoll's public API rarely changes, this should not pose any problems.
Dependencies
~180KB