From 72181ec9eb059f0ad34e65397d03e1087df3168b Mon Sep 17 00:00:00 2001 From: 2ro <17595647+2ro@users.noreply.github.com> Date: Mon, 15 Jun 2026 03:21:27 -0400 Subject: [PATCH] Build 83: gate vendored OpenSSL to Linux/Android so Windows builds again The vendored 'openssl' dependency existed only to statically link OpenSSL on Linux/Android (where native-tls uses it). In the global [dependencies] it also forced openssl-src to compile on Windows and macOS, which don't use OpenSSL at all (SChannel / Security.framework). On the Windows MSVC CI runner that build fails: openssl-src's perl Configure runs under Git-Bash's MSYS perl, which lacks Params::Check / Locale::Maketext::Simple. Gating the dependency to cfg(any(linux, android)) removes the pointless, fragile build on Windows/macOS and keeps the self-contained static link on Linux/Android. No behavior change on any platform. --- Cargo.toml | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 69be996..f57e288 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -93,13 +93,6 @@ bytes = "1.11.0" hyper-socks2 = "0.9.1" hyper-proxy2 = "0.1.0" hyper-tls = "0.6.0" -## native-tls (via hyper-tls) uses OpenSSL on Linux/Android. Upstream Grim got a -## vendored, statically-linked OpenSSL for free through arti's `static` feature; -## dropping arti for Nym took that with it, breaking Android/cross builds (no -## system OpenSSL for the target) and leaving desktop dynamically linked to -## libssl. Restore the vendored build so every target is self-contained. Inert on -## Windows/macOS, which use SChannel / Security.framework instead of OpenSSL. -openssl = { version = "0.10", features = ["vendored"] } async-std = "1.13.2" uuid = { version = "0.8.2", features = ["v4"] } num-bigint = "0.4.6" @@ -156,6 +149,18 @@ arboard = "3.2.0" rfd = "0.17.2" interprocess = { version = "2.2.1", features = ["tokio"] } +## native-tls (via hyper-tls) uses OpenSSL only on Linux/Android. Upstream Grim +## got a vendored, statically-linked OpenSSL for free through arti's `static` +## feature; dropping arti for Nym took that with it, breaking Android/cross +## builds (no system OpenSSL for the target) and leaving desktop dynamically +## linked to libssl. Restore the vendored build for exactly those two targets so +## each is self-contained. Windows (SChannel) and macOS (Security.framework) +## don't use OpenSSL at all, so they must NOT pull it — building openssl-src +## there is both pointless and fragile (the Windows MSVC runner's bash perl is +## missing modules its Configure needs). +[target.'cfg(any(target_os = "linux", target_os = "android"))'.dependencies] +openssl = { version = "0.10", features = ["vendored"] } + [target.'cfg(target_os = "android")'.dependencies] android_logger = "0.15.0" jni = "0.21.1"