#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

#148 in Windows APIs

Download history 482/week @ 2024-11-17 841/week @ 2024-11-24 816/week @ 2024-12-01 1051/week @ 2024-12-08 1020/week @ 2024-12-15 863/week @ 2024-12-22 379/week @ 2024-12-29 1114/week @ 2025-01-05 1712/week @ 2025-01-12 1627/week @ 2025-01-19 922/week @ 2025-01-26 1662/week @ 2025-02-02 1688/week @ 2025-02-09 1156/week @ 2025-02-16 1496/week @ 2025-02-23 927/week @ 2025-03-02

5,544 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–435KB