From 7c6d07c9c2502931a2736f9f56a7281b716c19f1 Mon Sep 17 00:00:00 2001 From: Sam <16504129+sagudev@users.noreply.github.com> Date: Mon, 31 Aug 2026 06:34:28 +0200 Subject: [PATCH 1/6] Update windows to 0.62 Signed-off-by: Sam <16504129+sagudev@users.noreply.github.com> --- Cargo.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 16ab7321..61d457d8 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "ipc-channel" -version = "0.22.0" +version = "0.22.1" description = "A multiprocess drop-in replacement for Rust channels" authors = ["The Servo Project Developers"] license = "MIT OR Apache-2.0" @@ -64,7 +64,7 @@ criterion = { version = "0.5", features = ["html_reports"] } rand = "0.9.2" [target.'cfg(target_os = "windows")'.dependencies.windows] -version = "0.61" +version = "0.62" features = [ "Win32_Foundation", "Win32_System_WindowsProgramming", From 690305a58b5182237a9682c9d92c7708165be9a5 Mon Sep 17 00:00:00 2001 From: sagudev <16504129+sagudev@users.noreply.github.com> Date: Mon, 31 Aug 2026 06:47:59 +0200 Subject: [PATCH 2/6] fixup Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> --- src/platform/windows/mod.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/platform/windows/mod.rs b/src/platform/windows/mod.rs index 7ec6f645..22105c70 100644 --- a/src/platform/windows/mod.rs +++ b/src/platform/windows/mod.rs @@ -1114,7 +1114,7 @@ fn write_buf(handle: &WinHandle, bytes: &[u8], atomic: AtomicMode) -> Result<(), sz, written, total, - WinError::from_win32() + WinError::from_thread() ); }, } @@ -2022,7 +2022,7 @@ impl OsIpcSharedMemory { unsafe { let address = MapViewOfFile(handle.as_raw(), FILE_MAP_ALL_ACCESS, 0, 0, 0); if address.Value.is_null() { - return Err(WinError::from_win32()); + return Err(WinError::from_thread()); } Ok(OsIpcSharedMemory { From 0d0e90b81e8ff3ef4ebeaa35cf21eb07b61f3242 Mon Sep 17 00:00:00 2001 From: sagudev <16504129+sagudev@users.noreply.github.com> Date: Mon, 31 Aug 2026 06:50:51 +0200 Subject: [PATCH 3/6] clippy fixes Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> --- src/platform/windows/mod.rs | 12 ++++++------ src/platform/windows/tests.rs | 6 +++--- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/platform/windows/mod.rs b/src/platform/windows/mod.rs index 22105c70..009d32f7 100644 --- a/src/platform/windows/mod.rs +++ b/src/platform/windows/mod.rs @@ -1482,21 +1482,21 @@ impl OsIpcSender { full_message.extend_from_slice(header_bytes); } - if big_data_sender.is_none() { - full_message.extend_from_slice(data); + if let Some(big_data_sender) = big_data_sender { full_message.extend_from_slice(&oob_data); assert!(full_message.len() == full_in_band_len); - // Write needs to be atomic, since otherwise concurrent sending - // could result in parts of different messages getting intermixed, - // and the receiver would not be able to extract the individual messages. write_buf(&self.handle, &full_message, AtomicMode::Atomic)?; + big_data_sender.send_raw(data)?; } else { + full_message.extend_from_slice(data); full_message.extend_from_slice(&oob_data); assert!(full_message.len() == full_in_band_len); + // Write needs to be atomic, since otherwise concurrent sending + // could result in parts of different messages getting intermixed, + // and the receiver would not be able to extract the individual messages. write_buf(&self.handle, &full_message, AtomicMode::Atomic)?; - big_data_sender.unwrap().send_raw(data)?; } Ok(()) diff --git a/src/platform/windows/tests.rs b/src/platform/windows/tests.rs index 7bf790be..62b011c1 100644 --- a/src/platform/windows/tests.rs +++ b/src/platform/windows/tests.rs @@ -5,7 +5,7 @@ use windows::Win32::Foundation::{ CloseHandle, CompareObjectHandles, ERROR_INVALID_HANDLE, HANDLE, INVALID_HANDLE_VALUE, }; use windows::Win32::System::Memory::{CreateFileMappingA, PAGE_READWRITE}; -use windows::Win32::System::Threading::{CreateEventA, GetCurrentProcessId}; +use windows::Win32::System::Threading::CreateEventA; #[test] fn test_recover_handles_empty() { @@ -38,7 +38,7 @@ fn test_recover_handles_duplicates_channel_handles() { assert_eq!(oob.channel_handles.len(), 3); for (i, handle) in oob.channel_handles.iter().enumerate() { assert_ne!(*handle, handles[i]); - assert_ne!(*handle as isize, INVALID_HANDLE_VALUE.0 as isize); + assert_ne!(*handle, INVALID_HANDLE_VALUE.0 as isize); } // Clean up the handles @@ -90,7 +90,7 @@ fn test_recover_handles_duplicates_shmem_handles() { let mut oob = OutOfBandMessage { target_process_id: std::process::id(), channel_handles: vec![], - shmem_handles: handles.clone().into_iter().zip(sizes.into_iter()).collect(), + shmem_handles: handles.clone().into_iter().zip(sizes).collect(), big_data_receiver_handle: None, }; From e393e14c31b1e43e79c5b72f7211a84e886473b5 Mon Sep 17 00:00:00 2001 From: sagudev <16504129+sagudev@users.noreply.github.com> Date: Mon, 31 Aug 2026 06:58:10 +0200 Subject: [PATCH 4/6] bump more Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> --- Cargo.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 61d457d8..80c34cc3 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "ipc-channel" -version = "0.22.1" +version = "0.23.0" description = "A multiprocess drop-in replacement for Rust channels" authors = ["The Servo Project Developers"] license = "MIT OR Apache-2.0" @@ -42,7 +42,7 @@ crossbeam-channel = "0.5" futures-channel = { version = "0.3.32", optional = true } futures-core = { version = "0.3.32", optional = true } libc = "0.2.162" -postcard = {version = "1.1", default-features = false, features = ["use-std"]} +postcard = { version = "1.1", default-features = false, features = ["use-std"] } serde_core = "1.0" thiserror = "2.0.12" uuid = { version = "1", features = ["v4"] } From 2f9823ff46ecff9813a8b8840f704713f700e941 Mon Sep 17 00:00:00 2001 From: sagudev <16504129+sagudev@users.noreply.github.com> Date: Mon, 31 Aug 2026 07:13:57 +0200 Subject: [PATCH 5/6] update rand to 0.10 Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> --- Cargo.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 80c34cc3..aa05ef4e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -53,7 +53,7 @@ rustc-hash = "2.1" tempfile = "3.4" [target.'cfg(target_os = "macos")'.dependencies] -rand = "0.9" +rand = "0.10" [dev-dependencies] serde = { version = "1.0", features = ["rc"] } @@ -61,7 +61,7 @@ crossbeam-utils = "0.8" futures-test = "0.3" static_assertions = "1.1.0" criterion = { version = "0.5", features = ["html_reports"] } -rand = "0.9.2" +rand = "0.10" [target.'cfg(target_os = "windows")'.dependencies.windows] version = "0.62" From 7af43adc3919c23a224044eacb0ff732085040b3 Mon Sep 17 00:00:00 2001 From: sagudev <16504129+sagudev@users.noreply.github.com> Date: Mon, 31 Aug 2026 08:27:39 +0200 Subject: [PATCH 6/6] f Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> --- src/platform/macos/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/platform/macos/mod.rs b/src/platform/macos/mod.rs index a7303a23..f73c75af 100644 --- a/src/platform/macos/mod.rs +++ b/src/platform/macos/mod.rs @@ -15,7 +15,7 @@ use self::mach_sys::{mach_port_right_t, mach_port_t, mach_task_self_, vm_inherit use crate::ipc::IpcMessage; use libc::{self, c_char, c_uint, c_void, size_t}; -use rand::{self, Rng}; +use rand::{self, RngExt}; use std::cell::Cell; use std::convert::TryInto; use std::ffi::CString;