Commit Graph

251 Commits

Author SHA1 Message Date
John Nunley 6eb7679aa3
breaking: Rework the API for I/O safety
* Rework the API for I/O safety

* Bump to rustix v0.38
2023-08-03 20:15:59 -07:00
John Nunley c86c3894c1
Add smol-rs logo (#127) 2023-07-17 14:30:22 +09:00
dependabot[bot] ea5946c453 Update fastrand requirement from 1.9.0 to 2.0.0
Updates the requirements on [fastrand](https://github.com/smol-rs/fastrand) to permit the latest version.
- [Release notes](https://github.com/smol-rs/fastrand/releases)
- [Changelog](https://github.com/smol-rs/fastrand/blob/master/CHANGELOG.md)
- [Commits](https://github.com/smol-rs/fastrand/compare/v1.9.0...v2.0.0)

---
updated-dependencies:
- dependency-name: fastrand
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-07-16 19:16:56 +09:00
Taiki Endo d41c05447a
Revert "Temporarily disable the wine test (#118)" (#126)
This reverts commit e2129ea879.

The upstream bug has been fixed.
2023-07-12 00:03:08 +09:00
John Nunley a8eb2dfc48
m: Remove the bitflags dependency 2023-06-28 20:19:12 -07:00
John Nunley 7a1fd31944
Replace log with tracing (#119) 2023-06-20 20:28:18 -07:00
John Nunley e2129ea879
Temporarily disable the wine test (#118) 2023-06-11 10:40:08 -07:00
John Nunley 5df378f811
Bump MSRV to 1.63 (#117)
Removes the build script and bumps bitflags to v2
2023-06-11 10:37:25 -07:00
Ivan Zvonimir Horvat e161698e6c
114: Examples; add nc message in 2 listeners (#115) 2023-05-31 08:50:27 -07:00
Taiki Endo 5e4410c937
Use Cirrus CI for NetBSD/OpenBSD (#110) 2023-04-29 06:05:19 +09:00
John Nunley 8d8d2efcc2
Replace libc with rustix in some backends (#108) 2023-04-23 07:26:29 -07:00
John Nunley d3a171b88b
v2.8.0 (#107) 2023-04-20 14:50:12 -07:00
John Nunley 75cff30584
feat: Add functionality for posting events to the IOCP (#101) 2023-04-16 07:37:48 -07:00
Taiki Endo 1e966a0848
Test patched async-io on more platforms (#79) 2023-04-10 15:34:34 +09:00
John Nunley 6857a165aa
Use the try-iter method from concurrent-queue (#105) 2023-04-08 22:05:37 -07:00
John Nunley 8f6d039b26
v2.7.0 (#104)
- Add edge/oneshot combination mode. (#96)
- Update windows-sys requirement from 0.45 to 0.48. (#103)
2023-04-07 11:20:57 -07:00
Taiki Endo 1e101c500f Update windows-sys to 0.48 2023-04-04 04:25:36 +09:00
John Nunley 0f38ed35ea
Add edge/oneshot combination mode (#96) 2023-03-25 15:22:45 +01:00
John Nunley e340458d3a
ci: Fix Android breakage (#99) 2023-03-22 11:21:31 -07:00
John Nunley e10c7e8da1
Version 2.6.0 (#92) 2023-03-08 10:42:18 -08:00
John Nunley f48f2c1a5a
test: Add test for more than 32 connections (#93)
Making sure that this works on Windows after #88
2023-03-08 10:40:23 -08:00
John Nunley 24900fb662
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.
2023-03-05 16:25:25 -08:00
Taiki Endo e85331c437 Fix Dragonfly BSD CI
Dragonfly BSD 6.4.0 VM doesn't seem to have git.

```
  error: failed to get `cfg-if` as a dependency of package `polling v2.5.2 (/Users/runner/work/polling/polling)`

  Caused by:
    failed to load source for dependency `cfg-if`

  Caused by:
    Unable to update registry `crates-io`

  Caused by:
    failed to fetch `https://github.com/rust-lang/crates.io-index`

  Caused by:
    could not execute process `git fetch --force --update-head-ok 'https://github.com/rust-lang/crates.io-index' '+HEAD:refs/remotes/origin/HEAD'` (never executed)

  Caused by:
    No such file or directory (os error 2)
```
2023-03-04 15:35:17 +09:00
Taiki Endo 1e4467b1be Test more Windows targets on CI
- Test x86_64 gnu, i686 msvc, i686 gnu on Windows host
- Test patched async-io with Wine
2023-03-04 15:35:17 +09:00
Taiki Endo d443196f64 Use image_family for FreeBSD image in Cirrus CI 2023-02-06 22:02:43 +09:00
John Nunley a5aae98805
feat: Expose other kqueue filters (#83)
* feat: Expose other kqueue filters

* Fix netbsd/openbsd compilation

* Build MSRV for FreeBsd/OpenBsd in CI

* Only run MSRV BSD builds on Linux

* Change API a little + fix netbsd timer

* Add inlines + move PollerSealed

* rustfmt

* Make filter fields public

* Fix examples
2023-02-03 11:14:33 -08:00
dependabot[bot] 914aa48d67 Update windows-sys requirement from 0.42 to 0.45
Updates the requirements on [windows-sys](https://github.com/microsoft/windows-rs) to permit the latest version.
- [Release notes](https://github.com/microsoft/windows-rs/releases)
- [Commits](https://github.com/microsoft/windows-rs/compare/0.42.0...0.45.0)

---
updated-dependencies:
- dependency-name: windows-sys
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-01-23 23:41:01 +09:00
Taiki Endo 900b00c061 Test NetBSD/OpenBSD/Dragonfly BSD with vmactions 2023-01-23 00:15:00 +09:00
Taiki Endo ff86c54dfd Minimize GITHUB_TOKEN permissions
Refs: https://github.blog/changelog/2021-04-20-github-actions-control-permissions-for-github_token
2023-01-21 20:38:57 +09:00
Taiki Endo 9b67232ea4 Test FreeBSD with Cirrus CI 2023-01-21 20:38:57 +09:00
Taiki Endo 3bc6310121 Set CARGO_NET_GIT_FETCH_WITH_CLI=true in CI 2023-01-21 20:38:57 +09:00
John Nunley 27f23a9384
m: Use EVFILT_USER instead of a self-pipe on kqueue where supported (#73)
* Use EVFILT_USER instead of a self-pipe

* Fix kqueue flags
2023-01-12 21:35:49 -08:00
John Nunley 729b5ee071
Use port_send for event ports (#74) 2023-01-12 21:35:28 -08:00
John Nunley dc4c5b4ec0
bugfix: Prevent large timeouts from causing panics (#71) 2023-01-07 19:35:46 -08:00
John Nunley 181acc67d0
Add level and edge triggered modes to the poller (#59)
* Add level and edge triggered modes to the poller

* Refractor error handling

* Add tests for new modes
2022-12-30 14:43:47 -08:00
Taiki Endo bc56d1fb38
Test the backend that uses poll on CI (#63) 2022-12-29 16:01:25 +09:00
Taiki Endo 1a3f61da89 Enable dependabot update for Rust 2022-12-28 12:24:56 +09:00
Taiki Endo 5e9bedbae8 Sort target_os cfg to match docs 2022-12-28 12:24:56 +09:00
Taiki Endo 14e1488537 Clean up CI config 2022-12-28 12:24:56 +09:00
Taiki Endo 341ca612b8 Update taiki-e/install-action to v2 2022-12-28 12:24:56 +09:00
John Nunley 97e6ecd0d0
Support tvOS and watchOS (#60) 2022-12-19 19:54:45 -08:00
Taiki Endo f0afd7788e
Release 2.5.2 (#58) 2022-12-13 12:26:59 +09:00
Alan Somers cebf394ca6
Future-proof the kevent API (#56)
In FreeBSD 12, kevent grew some extra fields.  libc currently implements
a FreeBSD 11 ABI, but that will change some day.  Tweak the kevent
initialization so it will compile with either version.
2022-12-13 12:16:19 +09:00
Wesley Wiser 5343302970
Update use of libc::timespec to prepare for future libc version (#55)
In a future release of the `libc` crate, `libc::timespec` will contain
private padding fields on `*-linux-musl` targets and so the struct will
no longer be able to be created using the literal initialization syntax.

Update `TS_ZERO` to create a value by initializing an array of the
correct size to `0` and then transmuting to `libc::timespec`. Update
struct literal use of `libc::timespec` to initialize to `TS_ZERO` and
then manually update the appropriate fields. Also updates a raw syscall
to use the libc function instead as on musl 1.2, it correctly handles
`libc::timespec` values which, in musl 1.2, are always 16 bytes in
length regardless of platform.
2022-12-03 23:04:37 +09:00
John Nunley 00e7eefc4d
Add error message for Wepoll (#54)
* Add error message for Wepoll

* Avoid unsupported error kind where it is not supported
2022-11-30 20:26:28 -08:00
Taiki Endo 0b45549097
Test x86_64-pc-windows-gnu with Wine on CI (#53) 2022-11-30 23:21:01 +09:00
Taiki Endo 1d54c93f9d Release 2.5.1 2022-11-29 22:21:43 +09:00
Taiki Endo 6f459f89a9 Use std::os::raw::c_int instead of std::ffi::c_int 2022-11-29 22:21:43 +09:00
Taiki Endo e5fe94732c Release 2.5.0 2022-11-27 16:22:51 +09:00
Taiki Endo 76ee52a68c Remove msrv field from .clippy.toml
Since Rust 1.64, Clippy respects `rust-version` field in Cargo.toml.
rust-lang/rust@b776fb8
2022-11-27 16:22:51 +09:00