- Support
Registery::try_cloneonwasm32-wasi(tokio-rs#1576). - Add docs about polling without registering event sources (tokio-rs#1585).
- Replace
winapidependency withwindows-sys. (tokio-rs#1556). - Future proofed the kevent ABI for FreeBSD (tokio-rs#1572).
- Improved support for Redox, making it possible to run on stable Rust (tokio-rs#1555).
- Don't ignore EAGAIN in UDS connect call (tokio-rs#1564).
- Documentation of
TcpStream::connect(tokio-rs#1565).
- Experimental support for Redox.
- Add
try_iomethod to all I/O types (#1551). This execute a user defined I/O closure while updating Mio's internal state ensuring that the I/O type receives more events if it hits a WouldBlock error. This is added to the following types:TcpStreamUdpSocketUnixDatagramUnixStreamunix::pipe::Senderunix::pipe::Receiver
- Basic, experimental support for
wasm32-wasitarget (#1549). Note that a lot of time type are still missing, e.g. theWaker, and may never be possible to implement.
- Deprecated features (https://github.com/tokio-rs/mio/commit/105f8f2afb57b01ddea716a0aa9720f226c520e3):
- extra-docs (always enabled)
- tcp (replaced with "net" feature).
- udp (replaced with "net" feature).
- uds (replaced with "net" feature).
- pipe (replaced with "os-ext" feature).
- os-util (replaced with "os-ext" feature).
TcpSockettype (https://github.com/tokio-rs/mio/commit/02e9be41f27daf822575444fdd2b3067433a5996). The socket2 crate provides all the functionality and more.- Support for Solaris, it never really worked anyway (tokio-rs#1528).
- Update minimum Rustc version (MSVR) to 1.46.0 (https://github.com/tokio-rs/mio/commit/5c577efecd23750a9a3e0f6ad080ab98f14a255d).
UdpSocket::peer_addr(https://github.com/tokio-rs/mio/commit/5fc104d08e0e74c8a19247f7cba0f058699fc438).
- Remove use unsound internal macro (#1519).
sys::unix::SocketAddr::as_abstract_namespace()(#1520).
- Fix
Registry::try_cloneinvalid usage ofF_DUPFD_CLOEXEC(#1497, https://github.com/tokio-rs/mio/commit/2883f5c1f35bf1a59682c5ffc4afe6b97d7d6e68).
- Set
FD_CLOEXECwhen callingRegistry::try_clone(https://github.com/tokio-rs/mio/commit/d1617b567ff6bc669d71e367d22e0e93ff7e2e24 for epoll and (https://github.com/tokio-rs/mio/commit/b367a05e408ca90a26383c3aa16d8a16f019dc59 for kqueue).
- Fix missing feature of winapi. (https://github.com/tokio-rs/mio/commit/a7e61db9e3c2b929ef1a33532bfcc22045d163ce).
- Fix an instance of not doc(cfg(.*)) (https://github.com/tokio-rs/mio/commit/25e8f911357c740034f10a170dfa4ea1b28234ce).
- Fix error handling in
NamedPipe::write(https://github.com/tokio-rs/mio/commit/aec872be9732e5c6685100674278be27f54a271b). - Use
accept(2)on x86 Android instead ofaccept4(2)(https://github.com/tokio-rs/mio/commit/6f86b925d3e48f30905d5cfa54348acf3f1fa036, https://github.com/tokio-rs/mio/commit/8d5414880ab82178305ac1d2c16d715e58633d3e). - Improve error message when opening AFD device (https://github.com/tokio-rs/mio/commit/139f7c4422321eb4a17b14ae2c296fddd19a8804).
- Fix
TcpStream::set_lingeron macOS (https://github.com/tokio-rs/mio/commit/175773ce02e85977db81224c782c8d140aba8543). - Fix compilation on DragonFlyBSD (https://github.com/tokio-rs/mio/commit/b51af46b28871f8dd3233b490ee62237ffed6a26).
UdpSocket::only_v6(https://github.com/tokio-rs/mio/commit/0101e05a800f17fb88f4315d9b9fe0f08cca6e57).Cloneimplementation forEvent(https://github.com/tokio-rs/mio/commit/26540ebbae89df6d4d08465c56f715d8f2addfc3).AsRawFdimplementation forRegistry(https://github.com/tokio-rs/mio/commit/f70daa72da0042b1880256164774c3286d315a02).ReadandWriteimplementation for&unix::pipe::SenderandReceiver, that is on the reference to them, an implementation existed on the types themselves already (https://github.com/tokio-rs/mio/commit/1be481dcbbcb6906364008b5d61e7f53cddc3eb3).
- Underflow in
SocketAddr::address(https://github.com/tokio-rs/mio/commit/6d3fa69240cd4bb95e9d34605c660c30245a18bd). - Android build with the net feature enabled, but with os-poll disabled (https://github.com/tokio-rs/mio/commit/49d8fd33e026ad6e2c055d05d6667180ba2af7be).
- Solaris build with the net feature enabled, but with os-poll disabled (https://github.com/tokio-rs/mio/commit/a6e025e9d9511639ec106ebedc0dd312bdc9be12).
- Ensure that
Waker::wakeworks on illumos systems with poorpipe(2)andepoll(2)interaction usingEPOLLET(https://github.com/tokio-rs/mio/commit/943d4249dcc17cd8b4d2250c4fa19116097248fa). - Fix
unix::pipeon illumos (https://github.com/tokio-rs/mio/commit/0db49f6d5caf54b12176821363d154384357e70a).
netfeature, replacestcp,udpandudsfeatures (https://github.com/tokio-rs/mio/commit/a301ba520a8479b459c4acdcefa4a7c5eea818c7).os-extfeature, replacesos-utilandpipefeatures (https://github.com/tokio-rs/mio/commit/f5017fae8a3d3bb4b4cada25b01a2d76a406badc).- Added keepalive support to
TcpSocket(https://github.com/tokio-rs/mio/commit/290c43a96662d54ab7c4b8814e5a9f9a9e523fda). TcpSocket::set_{send, recv}_buffer_size(https://github.com/tokio-rs/mio/commit/40c4af79bf5b32b8fbdbf6f2e5c16290e1d3d406).TcpSocket::get_linger(https://github.com/tokio-rs/mio/commit/13e82ced655bbb6e2729226e485a7de9f2c2ccd9).- Implement
IntoRawFdforTcpSocket(https://github.com/tokio-rs/mio/commit/50548ed45d0b2c98f1f2e003e210d14195284ef4).
- The
tcp,udpandudsfeatures, replaced by a newnetfeature. (https://github.com/tokio-rs/mio/commit/a301ba520a8479b459c4acdcefa4a7c5eea818c7). - The
extra-docsfeature, now enabled by default. (https://github.com/tokio-rs/mio/commit/25731e8688a2d91c5c700674a2c2d3841240ece1). - The
os-utilandpipefeatures, replaced by a newos-extfeature. (https://github.com/tokio-rs/mio/commit/f5017fae8a3d3bb4b4cada25b01a2d76a406badc).
- Incorrect assumption of the layout of
std::net::SocketAddr. Previously Mio would assume thatSocketAddrV{4,6}had the same layout aslibc::sockaddr_in(6), however this is not guaranteed by the standard library. (https://github.com/tokio-rs/mio/commit/152e0751f0be1c9b0cbd6778645b76bcb0eba93c). - Also bumped the miow dependency to version 0.3.6 to solve the same problem as above.
TcpSocket::get_localaddr()retrieves local address (https://github.com/tokio-rs/mio/commit/b41a022b2242eef1969c70c8ba93e04c528dba47).TcpSocket::set_reuseport()&TcpSocket::get_reuseport()configures and readsSO_REUSEPORT(https://github.com/tokio-rs/mio/commit/183bbe409ab69cbf9db41d0263b41ec86202d9a0).unix:pipe()a wrapper around pipe(2) sys call (https://github.com/tokio-rs/mio/commit/2b7c0967a7362303946deb3d4ca2ae507af6c72d).- Add a check that a single Waker is active per Poll instance (only in debug mode) (https://github.com/tokio-rs/mio/commit/f4874f28b32efcf4841691884c65a89734d96a56).
- Added
Interest:remove()(https://github.com/tokio-rs/mio/commit/b8639c3d9ac07bb7e2e27685680c8a6510fa1357).
- lost "socket closed" events on windows (https://github.com/tokio-rs/mio/commit/50c299aca56c4a26e5ed20c283007239fbe6a7a7).
TcpSocket::set_linger()configures SO_LINGER (https://github.com/tokio-rs/mio/commit/3b4096565c1a879f651b8f8282ecdcbdbd5c92d3).
TcpSocketfor configuring a TCP socket before connecting or listening (https://github.com/tokio-rs/mio/commit/5b09e60d0f64419b989bda88c86a3147334a03b3).
- Windows named pipe support. (https://github.com/tokio-rs/mio/commit/52e8c2220e87696d20f13561402bcaabba4136ed).
In January 2020 Rust reduced its support for 32-bit Apple targets (https://blog.rust-lang.org/2020/01/03/reducing-support-for-32-bit-apple-targets.html). Starting with v0.7.1 Mio will do the same as we're no longer checking 32 bit iOS/macOS on our CI.
- Support for illumos (https://github.com/tokio-rs/mio/commit/976f2354d0e8fbbb64fba3bf017d7131f9c369a0).
- Report
epoll(2)'sEPOLLERRevent asEvent::is_write_closedif it's the only event (https://github.com/tokio-rs/mio/commit/0c77b5712d675eeb9bd43928b5dd7d22b2c7ac0c). - Optimised event::Iter::{size_hint, count} (https://github.com/tokio-rs/mio/commit/40df934a11b05233a7796c4de19a4ee06bc4e03e).
- Work around Linux kernel < 2.6.37 bug on 32-bits making timeouts longer then ~30 minutes effectively infinite (https://github.com/tokio-rs/mio/commit/d555991f5ee81f6c1eec0fe481557d3d5b8d5ff4).
- Set
SO_NOSIGPIPEon all sockets (not just UDP) on for Apple targets (https://github.com/tokio-rs/mio/commit/b8bbdcb0d3236f4c4acb257996d42a88dc9987d9). - Properly handle
POLL_ABORTon Windows (https://github.com/tokio-rs/mio/commit/a98da62b3ed1eeed1770aaca12f46d647e4fa749). - Improved error handling around failing
SIO_BASE_HANDLEcalls on Windows (https://github.com/tokio-rs/mio/commit/b15fc18458a79ef8a51f73effa92548650f4e5dc).
- On NetBSD we now use
accept4(2)(https://github.com/tokio-rs/mio/commit/4e306addc7144f2e02a7e8397c220b179a006a19). - The package uploaded to crates.io should be slightly smaller (https://github.com/tokio-rs/mio/commit/eef8d3b9500bc0db957cd1ac68ee128ebc68351f).
- Dependency on
lazy_staticon Windows (https://github.com/tokio-rs/mio/commit/57e4c2a8ac153bc7bb87829e22cf0a21e3927e8a).
Version 0.7 of Mio contains various major changes compared to version 0.6. Overall a large number of API changes have been made to reduce the complexity of the implementation and remove overhead where possible.
Please refer to the blog post about 0.7-alpha.1 for additional information.
Intereststructure that replacesReadyin registering event sources.Registrystructure that separates the registering and polling functionality.Wakerstructure that allows another thread to wake a thread pollingPoll.- Unix Domain Socket (UDS) types:
UnixDatagram,UnixListenerandUnixStream.
- All code deprecated in 0.6 was removed in 0.7.
- Support for Fuchsia was removed as the code was unmaintained.
- Support for Bitrig was removed, rustc dropped support for it also.
UnixReadywas merged intoReady.- Custom user-space readiness queue was removed, this includes the public
RegistrationandSetReadinesstypes. PollOptwas removed and all registrations use edge-triggers. See the upgrade guide on how to process event using edge-triggers.- The network types (types in the
netmodule) now support only the same API as found in the standard library, various methods on the types were removed. TcpStreamnow supports vectored I/O.Poll::poll_interruptiblewas removed. InsteadPoll::pollwill now return an error if one occurs.From<usize>is removed fromToken, the internal field is still public, soToken(my_token)can still be used.
- Various documentation improvements were made around correct usage of
Polland registered event sources. It is recommended to reread the documentation of at leastevent::SourceandPoll. - Mio now uses Rust 2018 and rustfmt for all code.
Eventwas changed to be a wrapper around the OS event. This means it can be significantly larger on some OSes.Readywas removed and replaced with variousis_*methods onEvent. For example instead checking for readable readiness usingEvent::ready().is_readable(), you would callEvent::is_readable().Ready::is_hupwas removed in favour ofEvent::is_read_closedandEvent::is_write_closed.- The Iterator implementation of
Eventswas changed to return&Event. Eventedwas renamed toevent::Sourceand now takes mutable reference to the source.- Minimum supported Rust version was increased to 1.39.
- By default Mio now uses a shim implementation. To enable the full
implementation, that uses the OS, enable the
os-ollfeature. To enable the network types usetcp,udpand/oruds. For more documentation on the features see thefeaturemodule in the API documentation (requires theextra-docsfeature). - The entire Windows implementation was rewritten.
- Various optimisation were made to reduce the number of system calls in
creating and using sockets, e.g. making use of
accept4(2). - The
fmt::Debugimplementation ofEventsis now actually useful as it prints allEvents.
- MSRV: Increased the MSRV from 1.18.0 (Jun 8, 2017) to 1.31.0 (Dec 6, 2018) (https://github.com/tokio-rs/mio/commit/4879e0d32ddfd98e762fc87240e594a3ad8fca30).
- Work around Linux kernel < 2.6.37 bug on 32-bits making timeouts longer then ~30 minutes effectively infinite (https://github.com/tokio-rs/mio/commit/e7cba59950e9c9fa6194e29b5b1e72029e3df455).
- Update miow and net2 depedencies to get rid of invalid memory layout assumption (https://github.com/tokio-rs/mio/commit/13f02ac0a86d7c0c0001e5ff8960a0b4340d075c).
- Add support for illumos target (#1294)
- remove
=dependency oncfg-if.
- Use default IOCP concurrency value (#1161).
- setting FD_CLOEXEC in pipe (#1095).
- Do not trigger HUP events on kqueue platforms (#958).
- Fix compilation on kqueue platforms with 32bit C long (#948).
- Don't report
RDHUPasHUP(#939) - Fix lazycell related compilation issues.
- Fix EPOLLPRI conflicting with READABLE
- Abort process on ref count overflows
- Define PRI on all targets
- Add EPOLLPRI readiness to UnixReady on supported platforms (#867)
- Reduce spurious awaken calls (#875)
- Implement
Eventedfor containers (#840). - Fix android-aarch64 build (#850).
- Add
Poll::poll_interruptible(#811) - Add
Ready::allandusizeconversions (#825)
- Fix build on DragonFlyBSD.
- Add
TcpListener::from_stdthat does not require the socket addr. - Deprecate
TcpListener::from_listenerin favor of from_std.
- Add
TcpStream::peekfunction (#773). - Raise minimum Rust version to 1.18.0.
Poll: retry select() when interrupted by a signal (#742).- Deprecate
Eventsindex access (#713). - Add
Events::clear(#782). - Add support for
lio_listio(#780).
- Allow register to take empty interest (#640).
- Fix bug with TCP errors on windows (#725).
- Add TcpListener::accept_std (#733).
- Update IoVec to fix soundness bug -- includes behavior change. (#747).
- Minimum Rust version is now 1.14.0.
- Fix Android x86_64 build.
- Misc API & doc polish.
- Experimental support for Fuchsia
- Add
only_v6option for UDP sockets - Fix build on NetBSD
- Minimum Rust version is now 1.13.0
- Assignment operators (e.g.
|=) are now implemented forReady
- More socket options are exposed through the TCP types, brought in through the
net2crate.
- Support Fuchia
- POSIX AIO support
- Fix memory leak caused by Register::new2
- Windows: fix handling failed TCP connections
- Fix build on aarch64-linux-android
- Fix usage of
O_CLOEXECwithSETFL
- Ignore EPIPE coming out of
kevent - Timer thread should exit when timer is dropped.
- Add send(), recv() and connect() to UDPSocket.
- Fix bug in custom readiness queue
- Move net types into
netmodule
- Misc improvements to kqueue bindings
- Add official support for iOS, Android, BSD
- Reimplement custom readiness queue
Pollis nowSync- Officially deprecate non-core functionality (timers, channel, etc...)
Registrationnow implementsEvented- Fix bug around error conditions with
connecton windows. - Use iovec crate for scatter / gather operations
- Only support readable and writable readiness on all platforms
- Expose additional readiness in a platform specific capacity
- Fix compilation on musl
- Add
TcpStream::from_streamwhich converts a std TCP stream to Mio.
- Implement readv/writev for
TcpStream, allowing vectored reads/writes to work across platforms - Remove
nixdependency - Implement
DisplayandErrorfor some channel error types. - Optimize TCP on Windows through
SetFileCompletionNotificationModes
- Allow registration of custom handles on Windows (like
EventedFdon Unix) - Send only one byte for the awakener on Unix instead of four
- Fix a bug in the timer implementation which caused an infinite loop
- Update dependency of
libcto 0.2.16 - Fix channel
declogic - Fix a timer bug around timeout cancellation
- Don't allocate buffers for TCP reads on Windows
- Touched up documentation in a few places
- Fix an infinite looping timer thread on OSX
- Fix compile on 32-bit OSX
- Fix compile on FreeBSD
- Shift primary API towards
Poll EventLoopand types todeprecatedmod. All contents of thedeprecatedmod will be removed by Mio 1.0.- Increase minimum supported Rust version to 1.9.0
- Deprecate unix domain socket implementation in favor of using a version external to Mio. For example: https://github.com/alexcrichton/mio-uds.
- Remove various types now included in
std - Updated TCP & UDP APIs to match the versions in
std - Enable implementing
Eventedfor any type viaRegistration - Rename
IoEvent->Event - Access
Eventdata via functions vs. public fields. - Expose
Eventsas a public type that is passed intoPoll - Use
std::time::Durationfor all APIs that require a time duration. - Polled events are now retrieved via
Eventstype. - Implement
std::error::ErrorforTimerError - Relax
Sendbound on notify messages. - Remove
Cloneimpl forTimeout(future proof) - Remove
mio::prelude - Remove
mio::util - Remove dependency on bytes
- Windows support (#239)
- NetBSD support (#306)
- Android support (#295)
- Don't re-export bytes types
- Renamed
EventLoop::register_opttoEventLoop::register(#257) EventLoopConfigis now a builder instead of having public struct fields. It is also no longerCopy. (#259)TcpSocketis no longer exported in the public API (#262)- Integrate with net2. (#262)
TcpListenernow returns the remote peer address fromacceptas well (#275)- The
UdpSocket::{send_to, recv_from}methods are no longer generic overBuforMutBufbut instead take slices directly. The return types have also been updated to return the number of bytes transferred. (#260) - Fix bug with kqueue where an error on registration prevented the changelist from getting flushed (#276)
- Support sending/receiving FDs over UNIX sockets (#291)
- Mio's socket types are permanently associated with an EventLoop (#308)
- Reduce unnecessary poll wakeups (#314)
- [BUGFIX] Fix notify channel concurrency bug (#216)
- [BUGFIX] EventLoop::register requests all events, not just readable.
- [BUGFIX] Attempting to send a message to a shutdown event loop fails correctly.
- [FEATURE] Expose TCP shutdown
- [IMPROVEMENT] Coalesce readable & writable into
readyevent (#184) - [IMPROVEMENT] Rename TryRead & TryWrite function names to avoid conflict with std.
- [IMPROVEMENT] Provide TCP and UDP types in Mio (path to windows #155)
- [IMPROVEMENT] Use clock_ticks crate instead of time (path to windows #155)
- [IMPROVEMENT] Move unix specific features into mio::unix module
- [IMPROVEMENT] TcpListener sets SO_REUSEADDR by default