From e7752e720600adb346a9822860d14685663b1638 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philipp=20Kr=C3=BCger?= Date: Fri, 11 Sep 2026 08:45:34 +0200 Subject: [PATCH 1/3] Partially revert "fix(netwatch): Support wine fully (#216)" This partially reverts commit 6165d25f0343783e1c38aa586a25a62687b8b095. --- Cargo.lock | 67 +-------------------------------------------- netwatch/Cargo.toml | 11 +------- 2 files changed, 2 insertions(+), 76 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index ba10b2e..896ff5a 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1042,33 +1042,6 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "27b02d87554356db9e9a873add8782d4ea6e3e58ea071a9adb9a2e8ddb884a8b" -[[package]] -name = "netdev" -version = "0.45.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "569dfbdd2efd771b24ec9bb57f956e04d4fbfc72f62b2f11961723f9b3f4b020" -dependencies = [ - "block2", - "dispatch2", - "dlopen2", - "ipnet", - "jni 0.21.1", - "libc", - "mac-addr", - "ndk-context", - "netlink-packet-core", - "netlink-packet-route 0.31.0", - "netlink-sys", - "objc2", - "objc2-core-foundation", - "objc2-core-wlan", - "objc2-foundation", - "objc2-system-configuration", - "once_cell", - "plist", - "windows-sys 0.61.2", -] - [[package]] name = "netdev" version = "0.46.1" @@ -1170,8 +1143,7 @@ dependencies = [ "n0-error", "n0-future", "n0-watcher", - "netdev 0.45.0", - "netdev 0.46.1", + "netdev", "netlink-packet-core", "netlink-packet-route 0.31.0", "netlink-proto", @@ -1336,39 +1308,12 @@ dependencies = [ "objc2", ] -[[package]] -name = "objc2-core-wlan" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c71e34919aba0d701380d911702455038a8a3587467fe0141d6a71501e7ffe48" -dependencies = [ - "bitflags", - "objc2", - "objc2-core-foundation", - "objc2-foundation", - "objc2-security", - "objc2-security-foundation", -] - [[package]] name = "objc2-encode" version = "4.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ef25abbcd74fb2609453eb695bd2f860d389e457f67dc17cafc8b8cbc89d0c33" -[[package]] -name = "objc2-foundation" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3e0adef53c21f888deb4fa59fc59f7eb17404926ee8a6f59f5df0fd7f9f3272" -dependencies = [ - "bitflags", - "block2", - "libc", - "objc2", - "objc2-core-foundation", -] - [[package]] name = "objc2-security" version = "0.3.2" @@ -1380,16 +1325,6 @@ dependencies = [ "objc2-core-foundation", ] -[[package]] -name = "objc2-security-foundation" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ef76382e9cedd18123099f17638715cc3d81dba3637d4c0d39ab69df2ef345a5" -dependencies = [ - "objc2", - "objc2-foundation", -] - [[package]] name = "objc2-system-configuration" version = "0.3.2" diff --git a/netwatch/Cargo.toml b/netwatch/Cargo.toml index 0f101d0..73d9d95 100644 --- a/netwatch/Cargo.toml +++ b/netwatch/Cargo.toml @@ -42,22 +42,13 @@ socket2 = { version = "0.6", features = ["all"] } tokio = { version = "1", features = ["rt", "net"] } # netdev is available on all non-embedded, non-wasm platforms -# temp older version for windows: https://github.com/shellrow/netdev/pull/186 -[target.'cfg(not(any(target_os = "espidf", all(target_family = "wasm", target_os = "unknown"), target_os = "windows")))'.dependencies] +[target.'cfg(not(any(target_os = "espidf", all(target_family = "wasm", target_os = "unknown"))))'.dependencies] netdev = "0.46.1" tokio = { version = "1", features = [ "fs", "io-std", ] } -# temp older version of netdev for windows: https://github.com/shellrow/netdev/pull/186 -[target.'cfg(all(not(any(target_os = "espidf", all(target_family = "wasm", target_os = "unknown"))), target_os = "windows"))'.dependencies] -netdev = "0.45.0" -tokio = { version = "1", features = [ - "fs", - "io-std", -] } - [target.'cfg(any(target_os = "macos", target_os = "ios"))'.dependencies] # msrv fix objc2-core-foundation = "0.3.2" From 87286b5fa1f9e5b6de9ee3b6c502d68ccf2e80f6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philipp=20Kr=C3=BCger?= Date: Fri, 11 Sep 2026 08:46:56 +0200 Subject: [PATCH 2/3] chore(deps): Update netdev to wine-compatible version --- Cargo.lock | 56 ++++++++++++++++++++++++++++++++++----------- netwatch/Cargo.toml | 2 +- 2 files changed, 44 insertions(+), 14 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 896ff5a..6b7de47 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1044,9 +1044,9 @@ checksum = "27b02d87554356db9e9a873add8782d4ea6e3e58ea071a9adb9a2e8ddb884a8b" [[package]] name = "netdev" -version = "0.46.1" +version = "0.46.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3a5f88621a4b468e8ce92626f847cc02462cef3e06d793baa8b1c8617e304b20" +checksum = "4db4135b187ddae3b6813c4f9d9ac9d5181859fa6a08b4e006c63a130974ed62" dependencies = [ "block2", "dispatch2", @@ -1056,9 +1056,9 @@ dependencies = [ "libc", "mac-addr", "ndk-context", - "netlink-packet-core", - "netlink-packet-route 0.31.0", - "netlink-sys", + "netlink-packet-core 0.9.0", + "netlink-packet-route 0.33.0", + "netlink-sys 0.9.0", "objc2-core-foundation", "objc2-system-configuration", "once_cell", @@ -1075,6 +1075,12 @@ dependencies = [ "paste", ] +[[package]] +name = "netlink-packet-core" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2d6e2daf9a8c2e21302714706860a0e6be02e03d17294ecc66b354ea7d4059dd" + [[package]] name = "netlink-packet-route" version = "0.30.0" @@ -1084,7 +1090,7 @@ dependencies = [ "bitflags", "libc", "log", - "netlink-packet-core", + "netlink-packet-core 0.8.2", ] [[package]] @@ -1096,7 +1102,20 @@ dependencies = [ "bitflags", "libc", "log", - "netlink-packet-core", + "netlink-packet-core 0.8.2", +] + +[[package]] +name = "netlink-packet-route" +version = "0.33.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "59d48ffc8b73a506e1ff0878528c72668f2bfbc3d875b6be890a96be5d0d5576" +dependencies = [ + "bitflags", + "libc", + "log", + "netlink-packet-core 0.9.0", + "zerocopy", ] [[package]] @@ -1109,8 +1128,8 @@ dependencies = [ "futures-channel", "futures-util", "log", - "netlink-packet-core", - "netlink-sys", + "netlink-packet-core 0.8.2", + "netlink-sys 0.8.8", "thiserror 2.0.20", ] @@ -1127,6 +1146,17 @@ dependencies = [ "tokio", ] +[[package]] +name = "netlink-sys" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c99d38e00b420df49e940fe0826e667c3dad82ac68eb4c2bbf754c1c14a83a10" +dependencies = [ + "bytes", + "libc", + "log", +] + [[package]] name = "netwatch" version = "0.19.3" @@ -1144,10 +1174,10 @@ dependencies = [ "n0-future", "n0-watcher", "netdev", - "netlink-packet-core", + "netlink-packet-core 0.8.2", "netlink-packet-route 0.31.0", "netlink-proto", - "netlink-sys", + "netlink-sys 0.8.8", "noq-udp", "objc2-core-foundation", "objc2-system-configuration", @@ -1596,10 +1626,10 @@ dependencies = [ "futures-channel", "futures-util", "log", - "netlink-packet-core", + "netlink-packet-core 0.8.2", "netlink-packet-route 0.30.0", "netlink-proto", - "netlink-sys", + "netlink-sys 0.8.8", "nix 0.30.1", "thiserror 1.0.69", "tokio", diff --git a/netwatch/Cargo.toml b/netwatch/Cargo.toml index 73d9d95..a184abb 100644 --- a/netwatch/Cargo.toml +++ b/netwatch/Cargo.toml @@ -43,7 +43,7 @@ tokio = { version = "1", features = ["rt", "net"] } # netdev is available on all non-embedded, non-wasm platforms [target.'cfg(not(any(target_os = "espidf", all(target_family = "wasm", target_os = "unknown"))))'.dependencies] -netdev = "0.46.1" +netdev = "0.46.2" tokio = { version = "1", features = [ "fs", "io-std", From f60c2ae07932863eefd44a41adacb2bc51036c2a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philipp=20Kr=C3=BCger?= Date: Fri, 11 Sep 2026 08:57:20 +0200 Subject: [PATCH 3/3] chore(netwatch): Ignore broken doc link warning --- netwatch/src/udp.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/netwatch/src/udp.rs b/netwatch/src/udp.rs index 725bf91..24961be 100644 --- a/netwatch/src/udp.rs +++ b/netwatch/src/udp.rs @@ -33,6 +33,10 @@ pub struct UdpSocket { /// is the max supported by a default configuration of macOS. Some platforms will silently clamp the value. const SOCKET_BUFFER_SIZE: usize = 7 << 20; +#[allow( + rustdoc::broken_intra_doc_links, + reason = "AsFd and AsSocket are only conditionally imported based on the target" +)] /// A socket that is about to be bound, handed to the hook set with /// [`BindOptions::configure_socket`]. ///