Skip to content

v0.19.0-rc.1

Pre-release
Pre-release

Choose a tag to compare

@Berrysoft Berrysoft released this 23 Apr 11:38
· 29 commits to master since this release
1cc6f1a

We made huge progresses in this release. 160 PRs have been merged. Please refer to the sections below for a migration guide.

What's Changed

  • compio-buf
    • IoBufMut::ensure_init (#884)
  • compio-io
    • Ancillary IO (#730, #734, #737, #795, #843)
    • The managed IO traits have been refactored (#820)
    • Multishot IO (#732)
    • Framed IO updates (#749, #752)
    • AsyncStream has been refactored (#874)
    • Duplex forwarding for BufReader/BufWriter (#695)
  • compio-driver
    • OpCode refactor: remove the usages of Pin and introduce the Control API (#753, #803, #804, #859)
    • Multishot IO: ReadMulti, RecvMulti, RecvFromMulti, RecvMsgMulti, AcceptMulti (#748, #715, #747, #842)
    • Zero-copy IO: SendZc, SendMsgZc (#754, #755)
    • More POSIX ops: Bind, Listen, Pipe (#806, #807)
    • BufferPool refactor (#820, #854)
    • Fd registering (#718)
    • Public APIs exposes rustix types (#876)
  • compio-executor: this is a new low-level crate to replace async-task. It is not exported from the monocrate.
  • compio-runtime
    • The mod event has been removed (#707)
    • AsyncFd & PollFd have been moved to compio-runtime (#662)
    • Runtime::submit_multi (#743, #830)
    • Future combinator (#665, #825)
  • compio-fs
    • Dir support (#703)
    • Multishot IO (#830)
  • compio-net
    • All send* methods pass MSG_NOSIGNAL now (#835)
    • *Listener::incoming: a Stream to accept incoming connections forever (#747, #759)
    • TcpSocket & UnixSocket: new socket types for convenience (#817)
    • Multishot IO (#830, #838)
    • Socket state support (experimental): *Stream::sock_nonempty to indicate whether there's more data internally to read. Only available on io-uring (#861)
  • compio-signal
    • This crate becomes runtime-agnostic (#797)
    • The signalfd-based implementation has been removed (#794)
  • compio-tls
    • LazyConfigAcceptor for rustls (#686)
    • futures traits compatibility (#868, #874)
  • compio-ws
    • futures traits compatibility (#875)

Migration guide

  • compio-io
    • The managed IO traits don't allow associating the buffer pool types now. The implementors are required to manage their buffer pool implicitly.
    • AsyncStream require the inner stream to implement Splittable now. It is true for socket streams and pipes. TLS and WebSocket streams are futures-compatible already and don't need to be wrapped inside AsyncStream.
  • compio-driver
    • Each OpCode is associated with a Control type, which keeps the references to the fields inside the opcode. It will be dropped after the opcode being completed, and before the opcode being unboxed and returned to the user. The Control type is usually just (), or a custom struct containing typically SysSlice, cmsg, or aiocb. The implementor should fill it inside OpCode::init. The driver ensures that the address of the control instance doesn't change, so that it is able to store self-references.
    • Proactor is always !Send now. Please ensure you're using it in a single thread.
    • Some public APIs require rustix types instead of raw primitives or libc types.
    • About multishot opcodes, please refer to SubmitMulti in compio-runtime for a correct usage.
  • compio-runtime
    • Event has been removed. Please use AsyncFlag from the crate synchrony.
    • There's no spawn_unchecked at all. No alternative for this unsafe method.
  • compio-fs
    • On Unix, pipe::anonymous is async now.
    • File doesn't implement AsyncReadMultiAt because io-uring doesn't support it.
  • compio-net
    • SocketOpts has been removed. Use TcpSocket or UnixSocket instead.
    • send_zerocopy is not always faster than send. Please profile your use case for an efficient strategy.
  • compio-tls
    • TlsStream & MaybeTlsStream are futures-compatible now.
  • compio-ws
    • It's runtime-agnostic by default now. The compio-related functionalities need connect feature to be enabled.
    • WebSocketStream is futures-compatible now.

New Contributors

Full Changelog: v0.18.0...v0.19.0-rc.1