From 9f3be82671b50db2123758edb49f242a227319e2 Mon Sep 17 00:00:00 2001 From: Eric Huss Date: Tue, 12 Aug 2025 11:21:46 -0700 Subject: [PATCH 1/2] Update curl to 8.15.0 This updates curl to 8.15.0. Changelog: https://curl.se/ch/8.15.0.html Blog: https://daniel.haxx.se/blog/2025/07/16/curl-8-15-0/ A fairly major change here is that support for SecureTransport on macOS has been dropped. I decided to switch it over to OpenSSL. I don't know how well this is going to work. Apple's version of curl uses LibreSSL, with some minor changes. The main concern is how well it will find certificate stores, since IIRC those can be stored in the Keychain. The basic tests of accessing regular websites seem to pass for me. --- Cargo.toml | 6 +++--- curl-sys/Cargo.toml | 4 ++-- curl-sys/build.rs | 36 ++++-------------------------------- curl-sys/curl | 2 +- 4 files changed, 10 insertions(+), 38 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 8363b00e4..27422b0cb 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "curl" -version = "0.4.48" +version = "0.4.49" authors = ["Alex Crichton "] license = "MIT" repository = "https://github.com/alexcrichton/curl-rust" @@ -14,11 +14,11 @@ edition = "2018" [dependencies] libc = "0.2.42" -curl-sys = { path = "curl-sys", version = "0.4.77", default-features = false } +curl-sys = { path = "curl-sys", version = "0.4.83", default-features = false } socket2 = "0.6.0" # Unix platforms use OpenSSL for now to provide SSL functionality -[target.'cfg(all(unix, not(target_os = "macos")))'.dependencies] +[target.'cfg(all(unix))'.dependencies] openssl-sys = { version = "0.9.64", optional = true } openssl-probe = { version = "0.1.2", optional = true } diff --git a/curl-sys/Cargo.toml b/curl-sys/Cargo.toml index 3286b01d1..4b70da201 100644 --- a/curl-sys/Cargo.toml +++ b/curl-sys/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "curl-sys" -version = "0.4.82+curl-8.14.1" +version = "0.4.83+curl-8.15.0" authors = ["Alex Crichton "] links = "curl" build = "build.rs" @@ -26,7 +26,7 @@ version = "0.15" optional = true features = ["no_log_capture"] -[target.'cfg(all(unix, not(target_os = "macos")))'.dependencies] +[target.'cfg(all(unix))'.dependencies] openssl-sys = { version = "0.9.64", optional = true } [target.'cfg(windows)'.dependencies] diff --git a/curl-sys/build.rs b/curl-sys/build.rs index db930c316..433a6c519 100644 --- a/curl-sys/build.rs +++ b/curl-sys/build.rs @@ -108,7 +108,7 @@ fn main() { .replace("@LIBCURL_LIBS@", "") .replace("@SUPPORT_FEATURES@", "") .replace("@SUPPORT_PROTOCOLS@", "") - .replace("@CURLVERSION@", "8.14.1"), + .replace("@CURLVERSION@", "8.15.0"), ) .unwrap(); @@ -162,11 +162,13 @@ fn main() { .file("curl/lib/curl_trc.c") .file("curl/lib/curlx/base64.c") .file("curl/lib/curlx/dynbuf.c") + .file("curl/lib/curlx/inet_ntop.c") .file("curl/lib/curlx/inet_pton.c") .file("curl/lib/curlx/nonblock.c") .file("curl/lib/curlx/strparse.c") .file("curl/lib/curlx/timediff.c") .file("curl/lib/curlx/timeval.c") + .file("curl/lib/curlx/wait.c") .file("curl/lib/curlx/warnless.c") .file("curl/lib/cw-out.c") .file("curl/lib/cw-pause.c") @@ -194,7 +196,6 @@ fn main() { .file("curl/lib/http_proxy.c") .file("curl/lib/idn.c") .file("curl/lib/if2ip.c") - .file("curl/lib/inet_ntop.c") .file("curl/lib/llist.c") .file("curl/lib/macos.c") .file("curl/lib/md5.c") @@ -333,23 +334,12 @@ fn main() { .file("curl/lib/http_negotiate.c") .file("curl/lib/curl_sspi.c") .file("curl/lib/socks_sspi.c") + .file("curl/lib/vauth/krb5_sspi.c") .file("curl/lib/vauth/spnego_sspi.c") .file("curl/lib/vauth/vauth.c") .file("curl/lib/vtls/schannel.c") .file("curl/lib/vtls/schannel_verify.c") .file("curl/lib/vtls/x509asn1.c"); - } else if target.contains("-apple-") { - cfg.define("USE_SECTRANSP", None) - .file("curl/lib/vtls/cipher_suite.c") - .file("curl/lib/vtls/sectransp.c") - .file("curl/lib/vtls/x509asn1.c"); - if xcode_major_version().map_or(true, |v| v >= 9) { - // On earlier Xcode versions (<9), defining HAVE_BUILTIN_AVAILABLE - // would cause __bultin_available() to fail to compile due to - // unrecognized platform names, so we try to check for Xcode - // version first (if unknown, assume it's recent, as in >= 9). - cfg.define("HAVE_BUILTIN_AVAILABLE", "1"); - } } else { cfg.define("USE_OPENSSL", None) .file("curl/lib/vtls/openssl.c"); @@ -562,24 +552,6 @@ fn try_pkg_config() -> bool { true } -fn xcode_major_version() -> Option { - let status = Command::new("xcode-select").arg("-p").status().ok()?; - if status.success() { - let output = Command::new("xcodebuild").arg("-version").output().ok()?; - if output.status.success() { - let stdout = String::from_utf8_lossy(&output.stdout); - println!("xcode version: {}", stdout); - let mut words = stdout.split_whitespace(); - if words.next()? == "Xcode" { - let version = words.next()?; - return version[..version.find('.')?].parse().ok(); - } - } - } - println!("unable to determine Xcode version, assuming >= 9"); - None -} - fn curl_config_reports_http2() -> bool { let output = Command::new("curl-config").arg("--features").output(); let output = match output { diff --git a/curl-sys/curl b/curl-sys/curl index fdb8a789d..cfbfb6504 160000 --- a/curl-sys/curl +++ b/curl-sys/curl @@ -1 +1 @@ -Subproject commit fdb8a789d2b446b77bd7cdd2eff95f6cbc814cf4 +Subproject commit cfbfb65047e85e6b08af65fe9cdbcf68e9ad496a From cfab388d1291aa0b3c3633095676ae11d38d66dd Mon Sep 17 00:00:00 2001 From: Eric Huss Date: Tue, 12 Aug 2025 11:12:45 -0700 Subject: [PATCH 2/2] CI: Switch to aarch64-apple-darwin This changes the macos CI job to use the aarch64-apple-darwin target instead of x86_64-apple-darwin. The Rust project has demoted x86_64 to tier 2 (https://rust-lang.github.io/rfcs/3841-demote-x86_64-apple-darwin.html), and I think we should be testing the aarch64-apple-darwin target instead since it is tier 1. macos-latest is currently macos-14 which is aarch64. The x86_64 tests have been running under emulation. --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 941d8bdfb..f04ab34fe 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -63,7 +63,7 @@ jobs: - build: macos os: macos-latest rust: stable - target: x86_64-apple-darwin + target: aarch64-apple-darwin - build: win32 os: windows-latest rust: stable