Commit Graph

43 Commits

Author SHA1 Message Date
Thomas de Zeeuw 31913f4e72 Remove cfg attributes for Solaris
We never really supported Solaris, we pretended it implemented epoll,
but it never did see https://github.com/tokio-rs/mio/issues/1152. As no
one ever committed to being a maintainer for the port I'm removing it
now with this commit.

Instead replace it with illumuos on the CI, which we do support (as it
supports epoll) and for which we do have maintainers.
2021-11-07 19:42:00 +01:00
Thomas de Zeeuw d899ed686b Install nightly Rust on CI for install cargo-hack 2021-10-08 13:17:03 +02:00
Thomas de Zeeuw 17552034f5 Install Cargo-hack using nightly on CI
Cargo-hack's (transient) dependency bitflags has updated its MSRV.
2021-10-08 13:17:03 +02:00
Taiki Endo 139c144e2f Use ubuntu-18.04 instead of ubuntu-16.04 2021-06-09 15:46:57 +00:00
Thomas de Zeeuw 8dc059768d Replace x86_64-sun-solaris with x86_64-pc-solaris
https://github.com/rust-lang/rust/pull/82216 removed the
x86_64-sun-solaris target from rustup, changing it to use
x86_64-pc-solaris instead.

Related issues:
 * https://github.com/rust-lang/rust/issues/85098
2021-05-13 15:22:27 +00:00
Thomas de Zeeuw 3579c37185 Fix checking of rusfmted files on CI 2021-02-03 13:31:45 +00:00
Thomas de Zeeuw d403e6e600 Remove deprecated features
These feature were deprecated in v0.7.6 and merged into new features or
simply enabled by default.
2021-01-05 15:25:33 +00:00
Thomas de Zeeuw 0bf3829974 Ignore more deprecated features on CI 2020-12-24 21:01:00 +00:00
Thomas de Zeeuw c28423a07d Add unix::pipe (#1356)
Adds one new function: unix::pipe, which is a wrapper around the pipe(2)
system call, and two new types: Sender and Receiver, wrappers around the
file descriptors.

This is a port of https://github.com/Thomasdezeeuw/mio-pipe, commit
8c3025edf128e90733e95327d88493887b93fcdd.
2020-10-24 10:12:37 -07:00
Thomas de Zeeuw cb0f3824f0 Remove RUST_TEST_THREADS: "1" from CI 2020-10-22 08:16:38 +00:00
Carl Lerche 4726a8cecc Fix HUP notifications on windows (#1370) 2020-10-19 15:34:46 -07:00
Thomas de Zeeuw 352ed3378e Use macOS 10.15 Catalina on CI 2020-03-23 18:40:37 +00:00
Thomas de Zeeuw 0484ec1808 Remove 32bit iOS and replace ARM with ARM 64 bit iOS in CI
Both i386 and armv7s iOS targets are no longer supported by Rust (or
Apple for the matter), so remove them both from the CI.

And use the aarch64 (ARM 64 bit) iOS target instead.
2020-03-23 18:40:37 +00:00
Thomas de Zeeuw 7998d57b74 Use all feature when building docs for master branch 2020-03-04 08:33:20 +00:00
Kevin Leimkuhler 08e5c703b0 0.3.3 was just cut, so remove rev option
Signed-off-by: Kevin Leimkuhler <kleimkuhler@icloud.com>
2020-01-07 19:15:37 +00:00
Kevin Leimkuhler 681c73ab39 Use cargo-hack
Signed-off-by: Kevin Leimkuhler <kleimkuhler@icloud.com>
2020-01-07 19:15:37 +00:00
Kevin Leimkuhler bbca3ae3a2 Add check-powerset script
Signed-off-by: Kevin Leimkuhler <kleimkuhler@icloud.com>
2020-01-07 19:15:37 +00:00
Kevin Leimkuhler 6699a4a9f8 Format all CI files
Signed-off-by: Kevin Leimkuhler <kleimkuhler@icloud.com>
2019-12-18 10:03:32 +00:00
Kevin Leimkuhler 1262f2afaa Introduce default API shim and feature flags for net/OS resources (#1192)
## Motivation

Closes #1118

Mio should be as light as possible and forwards compatible to other non-blocking
I/O strategies such as user-land sockets.

Currently, depending on Mio means that all platform-specific networking
primitives and I/O source readiness polling functionality is present by default.

If a library is interested only in networking primitives but aims to provide an
other strategy for I/O source readiness polling, there is no way to disable the
provided implementation.

If a library is interested in the provided I/O source readiness polling
implementations, but only uses the TCP networking types, the UDP and UDS types
are also still provided.

This change proposes that Mio by default provides an API shim for its common
types such as `Poll`, `Events`, etc. Attempting to use them will result in a
panic. TCP, UDP, and UDS networking types are **not** present by default and
require feature flags to opt-in.

## Solution

### Overview

Below are the four feature flags that Mio now includes as opt-in features. By
default, no functionality is provided--only an API shim.

- `os-poll`: Provide the cross-platform implementations of `Poll`. This is
  currently epoll, IOCP, or kqueue depending on the platform.

- `os-util`: Provide the cross-platform adapters for the platform's underlying
  I/O source that implements `event::Source`. Currently, only Unix provides it's
  `SourceFd` type. There are proposed solutions for a Windows equivalent being
  worked on.

- `tcp`: Provide the TCP types and implementations

- `udp`: Provide the UDP types and implementations

- `uds`: Provide the UDS types and implementations. Currently, only Unix
  provides types and implementations for this feature.

The above feature flags can be used in any combination. If a library opts in to
`os-poll` and `tcp`, then the `Poll` and TCP implementations will be provided.
Later, the library could provide it's own `Poll` implementation and opt-out of
`os-poll`. It could alternatively opt-in to UDP at a later point without issue.

### Details

Mio now has the following cfg macros: `cfg_os_poll`, `cfg_not_os_poll`,
`cfg_net`, `cfg_tcp`, `cfg_udp`, `cfg_uds`, `cfg_any_os_util` that conditionally
provide the related types and implementations. *(If any of these names are not
obvious about what they provide, please let me know!)*.

The macros--again similar to Tokio--conditionally provide shell types that
**panic upon use**, or hide/expose methods on types an API shim should not
provide (e.g. `Poll::new`).

## Tips for Review

This change touches a lot of files, but there are no intended functional or
behavioral changes. I would recommend first looking at what types are provided
by the root-level `lib.rs` or changes in the `mod.rs` files. *(If any of the
`mod.rs` files are not clear about what they conditionally expose, please let me
know!)*.

Next, I would look at the methods that are now conditionally provided on the
types. These are mostly confined to the OS specific `Poll` implementations, but
there are a few exceptions.

Finally, there are some further changes that reorganize `impl`s or move `use`
statements due to being conditionally used. Because this change is ultimately a
"refactor", I found myself moving some blocks of code around to group with
similar `impl`s and such. I'd like to keep those as part of this change (instead
of a separate PR), but please me know if have questions/concerns about any of
those.

Signed-off-by: Kevin Leimkuhler <kleimkuhler@icloud.com>
2019-12-10 14:30:59 -08:00
Thomas de Zeeuw 30e728dfe8 Make Clippy stricter
Disallows even more things!
2019-11-27 10:19:26 +00:00
Thomas de Zeeuw 5c3d4ef137 Set Rustup profile to minimal in CI 2019-10-29 18:35:33 +00:00
Thomas de Zeeuw 5713f3c732 Test with minimal versions on CI 2019-08-19 15:56:04 +00:00
Thomas de Zeeuw d51427c03b Change checking source back to cargo check
It should be faster.
2019-08-19 15:46:35 +00:00
Thomas de Zeeuw 7b53ef0a10 Rename Linux targets that actually use Android
Also removes the Linux_ARM target as it is the same as the Android target.
2019-08-19 15:46:35 +00:00
Carl Lerche eaf0fe40b3 Add more CI targets for cross compilation
This should hopefully catch most errors related to secondary platforms.
2019-08-19 15:46:35 +00:00
Thomas de Zeeuw bc6b2c53af Implement vectored I/O for TcpStream (#1016) 2019-07-16 10:07:51 -07:00
Thomas de Zeeuw b5146d10ef Run Clippy on Ubuntu image 2019-07-11 17:39:59 +00:00
Thomas de Zeeuw 3cfc385698 Force rustup update after installing on Azure
Hopefully this will ensure we install the latests version available.
2019-07-11 17:39:59 +00:00
Thomas de Zeeuw 4c830fc549 Add clippy check to Azure 2019-07-11 17:39:59 +00:00
Thomas de Zeeuw 19cb44507f Add RUST_BACKTRACE env variable to CI build (#980)
Closes #965.
2019-06-14 11:08:12 -07:00
Carl Lerche 807f27608e Format with rustfmt (#930)
Also add a CI check ensuring formatting
2019-04-25 13:24:10 -07:00
Carl Lerche 1aadae0797 Set up CI with Azure Pipelines (#927) 2019-04-25 10:16:24 -07:00
Povilas Balciunas cff2bde7b3 Incorporate lazycell (#887)
* Integrate lazycell 1.2.0 into the project

...rather than getting it from the crates.io. The problem is that latest
lazycell doesn't work with rust 1.18.0 anymore that mio supports.  This
commit only adds the origincal lazycell.rs without any modifications.
I want commits to show the changes I made to the lazycell.rs 1.2.0.

* Fix lazycell to work with rust 1.18.0

* Removed example, which wouldn't compile, because lazycell wasn't detected.
* Simply use std instead of libcore.
* Removed associated constant, which is still an experimental feature in
  rust 1.18.0.

* Fix android builds

* Delete doc examples for deprecated code
2018-11-28 10:05:26 -08:00
Eliza Weisman edeb35c40c Make iOS CI build compile-only (#865)
The iOS simulator has stopped running on Travis.

Closes #863, #864.
2018-08-20 12:56:37 -07:00
Thibaut Lorrain f41841a0f4 Fix android-aarch64 build when using libc 0.2.42 (#850)
socketlen_t is defined as an u32 in libc 0.2.42, this conditionnal
compilation is not needed anymore and creates a compilation error.

Closes #851, #852
2018-07-03 14:36:57 -07:00
Gabriel Majeri f5ba21e8f5 Fix Android CI (#745) 2017-10-11 10:55:04 -07:00
Iku Iwasa 73259063ae Correct test target file path in iOS CI (#636) 2017-07-26 09:58:14 -07:00
chshawkn fa22b0cdbe Fix compile on aarch64-linux-android (#601)
aarch64-linux-android is also added to the CI run.
2017-05-22 10:04:33 -07:00
Carl Lerche f42ae8b262 Add FreeBSD to the CI run 2017-03-10 10:13:28 -08:00
Carl Lerche b488d206ab Remove unused CI files and code 2017-03-10 10:13:28 -08:00
Carl Lerche b16b67aa5f CI: Stream test output on iOS 2017-02-10 10:18:25 -08:00
Carl Lerche eb38b5817b Fix iOS CI run 2017-02-08 22:06:59 -08:00
Carl Lerche 7a6fdcaf5b Run CI on extra platforms 2017-01-29 20:57:02 -08:00