#epoll #poll #wepoll #windows

sys wepoll-sys-stjepang

A fork of wepoll-sys with stjepang's patches

9 stable releases

1.0.8 Sep 14, 2020
1.0.6 Jun 22, 2020
1.0.2 Jun 21, 2020

#125 in Windows APIs

Download history 1479/week @ 2024-03-31 1148/week @ 2024-04-07 1462/week @ 2024-04-14 1415/week @ 2024-04-21 1118/week @ 2024-04-28 1230/week @ 2024-05-05 1077/week @ 2024-05-12 1020/week @ 2024-05-19 1330/week @ 2024-05-26 1205/week @ 2024-06-02 733/week @ 2024-06-09 1038/week @ 2024-06-16 1125/week @ 2024-06-23 883/week @ 2024-06-30 717/week @ 2024-07-07 1072/week @ 2024-07-14

3,946 downloads per month

MPL-2.0 license

84KB
2K SLoC

C 1.5K SLoC // 0.1% comments Rust 337 SLoC Ruby 26 SLoC // 0.1% comments

wepoll-sys-stjepang (a fork of wepoll-sys)

wepoll-sys-stjepang provides Rust bindings to wepoll, generated using bindgen. 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-stjepang as a Windows dependency (since it won't build on other platforms):

[dependencies.'cfg(windows)'.dependencies]
wepoll-sys-stjepang = "1.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_stjepang;

fn main() {
    let wepoll = wepoll_sys_stjepang::epoll_create(1);

    if wepoll.is_null() {
        panic!("epoll_create(1) failed!");
    }

    // ...
}

Dependencies

~0–300KB