v0.19.0-rc.1
Pre-release
Pre-release
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
- compio-driver
OpCoderefactor: remove the usages ofPinand introduce theControlAPI (#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) BufferPoolrefactor (#820, #854)- Fd registering (#718)
- Public APIs exposes
rustixtypes (#876)
- compio-executor: this is a new low-level crate to replace
async-task. It is not exported from the monocrate. - compio-runtime
- compio-fs
- compio-net
- All
send*methods passMSG_NOSIGNALnow (#835) *Listener::incoming: aStreamto accept incoming connections forever (#747, #759)TcpSocket&UnixSocket: new socket types for convenience (#817)- Multishot IO (#830, #838)
- Socket state support (experimental):
*Stream::sock_nonemptyto indicate whether there's more data internally to read. Only available on io-uring (#861)
- All
- compio-signal
- compio-tls
- compio-ws
futurestraits 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.
AsyncStreamrequire the inner stream to implementSplittablenow. It is true for socket streams and pipes. TLS and WebSocket streams arefutures-compatible already and don't need to be wrapped insideAsyncStream.
- compio-driver
- Each
OpCodeis associated with aControltype, 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. TheControltype is usually just(), or a custom struct containing typicallySysSlice,cmsg, oraiocb. The implementor should fill it insideOpCode::init. The driver ensures that the address of the control instance doesn't change, so that it is able to store self-references. Proactoris always!Sendnow. Please ensure you're using it in a single thread.- Some public APIs require
rustixtypes instead of raw primitives orlibctypes. - About multishot opcodes, please refer to
SubmitMultiincompio-runtimefor a correct usage.
- Each
- compio-runtime
Eventhas been removed. Please useAsyncFlagfrom the cratesynchrony.- There's no
spawn_uncheckedat all. No alternative for this unsafe method.
- compio-fs
- On Unix,
pipe::anonymousis async now. Filedoesn't implementAsyncReadMultiAtbecause io-uring doesn't support it.
- On Unix,
- compio-net
SocketOptshas been removed. UseTcpSocketorUnixSocketinstead.send_zerocopyis not always faster thansend. Please profile your use case for an efficient strategy.
- compio-tls
TlsStream&MaybeTlsStreamarefutures-compatible now.
- compio-ws
- It's runtime-agnostic by default now. The
compio-related functionalities needconnectfeature to be enabled. WebSocketStreamisfutures-compatible now.
- It's runtime-agnostic by default now. The
New Contributors
- @ortuman made their first contribution in #672
- @fantix made their first contribution in #694
- @Aalivexy made their first contribution in #695
- @thomas-fractalbits made their first contribution in #718
- @ararog made their first contribution in #749
- @johnnyshields made their first contribution in #769
- @Xerxes-2 made their first contribution in #847
- @abh1nav10 made their first contribution in #857
Full Changelog: v0.18.0...v0.19.0-rc.1