3 releases

0.1.2 May 27, 2021
0.1.1 May 26, 2021
0.1.0 May 26, 2021

#569 in Unix APIs

Download history 38884/week @ 2024-07-21 30362/week @ 2024-07-28 33141/week @ 2024-08-04 24034/week @ 2024-08-11 26714/week @ 2024-08-18 28803/week @ 2024-08-25 25057/week @ 2024-09-01 24091/week @ 2024-09-08 25189/week @ 2024-09-15 30132/week @ 2024-09-22 24593/week @ 2024-09-29 31241/week @ 2024-10-06 27992/week @ 2024-10-13 33980/week @ 2024-10-20 27664/week @ 2024-10-27 35149/week @ 2024-11-03

125,324 downloads per month

MIT OR Apache-2.0 OR BSD-2-Clause

86KB
2K SLoC

C 1.5K SLoC // 0.1% comments Rust 212 SLoC // 0.0% comments Batch 1 SLoC

wepoll-ffi

Bindings for wepoll (epoll on windows)

This crate provides unsafe bindings. Please refer to https://github.com/piscisaureus/wepoll for more details.

The version of wepoll included is currently 1.58 with an optional patch. (use the null-overlapped-wakeups-patch crate feature to enable it, see below for more details.)

Feature Flags

null-overlapped-wakeups-patch

In the polling crate, in order to implement notify(), PostQueuedCompletionStatus is called with a null lpOverlapped parameter. This will result in GetQueuedCompletionStatusEx providing an event that also has a null lpOverlapped parameter. Unmodified wepoll will crash, as it assumes lpOverlapped is not null.

This feature will instead treat this as an indication to break out of a wait early. The change is based on the following:

Patch diff here

License

The bindings are licensed under either of

at your option.

The BSD 2-clause license is also used by the wrapped library.

Upstream Dependencies

Some dependencies may be licensed under other terms. These licenses currently include "BSD-2-Clause", "MIT", and "Apache-2.0". This is validated on a best-effort basis in every CI run using cargo-deny.

wepoll is licensed under BSD-2-clause:

wepoll - epoll for Windows https://github.com/piscisaureus/wepoll

Copyright 2012-2020, Bert Belder bertbelder@gmail.com All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

  • Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.

  • Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be licensed as above, without any additional terms or conditions.

See LICENSE-BSD-2-CLAUSE LICENSE-APACHE, and LICENSE-MIT.

No runtime deps

~0–280KB