Skip to content

Commit d61f5d9

Browse files
authored
Update compio to 0.18 (#736)
1 parent 8ced3b8 commit d61f5d9

File tree

6 files changed

+31
-28
lines changed

6 files changed

+31
-28
lines changed

Cargo.toml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -129,8 +129,8 @@ url = "2.5.2"
129129
url-pkg = { version = "2.5.2", package = "url" }
130130
uuid = { version = "1.19", features = ["v7"] }
131131

132-
compio-buf = "0.7"
133-
compio-io = "0.8"
134-
compio-net = "0.10"
135-
compio-driver = "0.10"
136-
compio-runtime = "0.10"
132+
compio-buf = "0.8.0"
133+
compio-io = "0.9.0"
134+
compio-net = "0.11.0"
135+
compio-driver = "0.11.1"
136+
compio-runtime = "0.11.0"

ntex-net/CHANGES.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Changes
22

3+
## [3.6.0] - 2026-02-01
4+
5+
* Update compio to 0.18
6+
37
## [3.5.2] - 2026-01-29
48

59
* Fix socket close process for polling driver

ntex-net/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "ntex-net"
3-
version = "3.5.2"
3+
version = "3.6.0"
44
authors = ["ntex contributors <team@ntex.rs>"]
55
description = "ntexwork utils for ntex framework"
66
keywords = ["network", "framework", "async", "futures"]

ntex-net/src/compio/io_impl.rs

Lines changed: 16 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
use std::{any, future::poll_fn, io, task::Poll};
1+
use std::{any, future::poll_fn, io, mem, slice, task::Poll};
22

3-
use compio_buf::{BufResult, IoBuf, IoBufMut, SetBufInit};
3+
use compio_buf::{BufResult, IoBuf, IoBufMut, SetLen};
44
use compio_io::{AsyncRead, AsyncWrite};
5-
use ntex_bytes::{Buf, BufMut, BytesMut};
5+
use ntex_bytes::{BufMut, BytesMut};
66
use ntex_io::{Handle, IoContext, IoStream, IoTaskStatus, Readiness, types};
77
use ntex_util::future::{Either, select};
88

@@ -37,31 +37,26 @@ impl Handle for HandleWrapper {
3737

3838
struct CompioBuf(BytesMut);
3939

40-
unsafe impl IoBuf for CompioBuf {
40+
impl IoBuf for CompioBuf {
4141
#[inline]
42-
fn as_buf_ptr(&self) -> *const u8 {
43-
self.0.chunk().as_ptr()
44-
}
45-
46-
#[inline]
47-
fn buf_len(&self) -> usize {
48-
self.0.len()
49-
}
50-
51-
#[inline]
52-
fn buf_capacity(&self) -> usize {
53-
self.0.remaining_mut()
42+
fn as_init(&self) -> &[u8] {
43+
&self.0
5444
}
5545
}
5646

57-
unsafe impl IoBufMut for CompioBuf {
58-
fn as_buf_mut_ptr(&mut self) -> *mut u8 {
59-
self.0.chunk_mut().as_mut_ptr()
47+
impl IoBufMut for CompioBuf {
48+
fn as_uninit(&mut self) -> &mut [mem::MaybeUninit<u8>] {
49+
unsafe {
50+
slice::from_raw_parts_mut(
51+
self.0.chunk_mut().as_mut_ptr() as *mut _,
52+
self.0.remaining_mut(),
53+
)
54+
}
6055
}
6156
}
6257

63-
impl SetBufInit for CompioBuf {
64-
unsafe fn set_buf_init(&mut self, len: usize) {
58+
impl SetLen for CompioBuf {
59+
unsafe fn set_len(&mut self, len: usize) {
6560
unsafe {
6661
self.0.set_len(len + self.0.len());
6762
}

ntex-rt/CHANGES.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Changes
22

3+
## [3.5.0] - 2026-02-01
4+
5+
* Update compio to 0.18
6+
37
## [3.5.0] - 2026-01-28
48

59
* Use system name for arbiters

ntex-rt/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "ntex-rt"
3-
version = "3.5.0"
3+
version = "3.6.0"
44
authors = ["ntex contributors <team@ntex.rs>"]
55
description = "ntex runtime"
66
keywords = ["network", "framework", "async", "futures"]

0 commit comments

Comments
 (0)