Skip to content

Commit e955373

Browse files
authored
Update to curl 7.82.0 and remove MesaLink (#438)
* Update to curl 7.82.0 and remove MesaLink Curl has removed support for MesaLink as of 7.82.0, so we can no longer build libcurl with MesaLink. But removing the feature from our crates would be a breaking change. Since this feature is not significantly used (I only found one public crate using it) I changed the feature to simply emit a warning and use the default TLS configuration. Alternatively, we could remove the `mesalink` feature entirely and put a disclaimer in the release notes. I don't think it is worth bumping a major release of our crate for such an under-used feature, though I'd be open to alternate opinions. * Update build config to account for renamed file * More rearranged files * Fix macos
1 parent b3a3ce8 commit e955373

File tree

5 files changed

+16
-33
lines changed

5 files changed

+16
-33
lines changed

README.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,6 @@ with various Cargo features:
126126
- `rustls` Enable SSL/TLS support via [Rustls], a well-received alternative TLS backend written in Rust. Rustls is always statically linked. Disabled by default.
127127

128128
Note that Rustls support is experimental within Curl itself and may have significant bugs, so we don't offer any sort of stability guarantee with this feature.
129-
- `mesalink`: Enable SSL/TLS support via [MesaLink], an alternative TLS backend written in Rust based on [Rustls]. MesaLink is always statically linked. Disabled by default.
130129
- `http2`: Enable HTTP/2 support via libnghttp2. Disabled by default.
131130
- `static-curl`: Use a bundled libcurl version and statically link to it. Disabled by default.
132131
- `static-ssl`: Use a bundled OpenSSL version and statically link to it. Only applies on platforms that use OpenSSL. Disabled by default.
@@ -169,7 +168,6 @@ details.
169168

170169

171170
[libcurl]: https://curl.haxx.se/libcurl/
172-
[MesaLink]: https://mesalink.io/
173171
[OpenSSL]: https://www.openssl.org/
174172
[Rustls]: https://github.com/ctz/rustls
175173
[Schannel]: https://docs.microsoft.com/en-us/windows/win32/com/schannel

curl-sys/Cargo.toml

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "curl-sys"
3-
version = "0.4.52+curl-7.81.0"
3+
version = "0.4.52+curl-7.82.0"
44
authors = ["Alex Crichton <alex@alexcrichton.com>"]
55
links = "curl"
66
build = "build.rs"
@@ -24,12 +24,6 @@ libz-sys = { version = "1.0.18", default-features = false, features = ["libc"] }
2424
libc = "0.2.2"
2525
libnghttp2-sys = { optional = true, version = "0.1.3" }
2626

27-
[dependencies.mesalink]
28-
version = "1.1.0-cratesio"
29-
optional = true
30-
default-features = false
31-
features = ["client_apis", "error_strings", "tls13", "aesgcm", "chachapoly", "x25519", "ecdh", "ecdsa", "verifier"]
32-
3327
[dependencies.rustls-ffi]
3428
version = "0.8"
3529
optional = true
@@ -52,6 +46,7 @@ cc = "1.0"
5246
default = ["ssl"]
5347
ssl = ["openssl-sys"]
5448
http2 = ["libnghttp2-sys"]
49+
mesalink = []
5550
rustls = ["rustls-ffi"]
5651
static-curl = []
5752
static-ssl = ["openssl-sys/vendored"]

curl-sys/build.rs

Lines changed: 13 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@ fn main() {
99
let target = env::var("TARGET").unwrap();
1010
let windows = target.contains("windows");
1111

12+
if cfg!(feature = "mesalink") {
13+
println!("cargo:warning=MesaLink support has been removed as of curl 7.82.0, will use default TLS backend instead.");
14+
}
15+
1216
// This feature trumps all others, and is largely set by rustbuild to force
1317
// usage of the system library to ensure that we're always building an
1418
// ABI-compatible Cargo.
@@ -158,12 +162,10 @@ fn main() {
158162
.file("curl/lib/hash.c")
159163
.file("curl/lib/hmac.c")
160164
.file("curl/lib/hostasyn.c")
161-
.file("curl/lib/hostcheck.c")
162165
.file("curl/lib/hostip.c")
163166
.file("curl/lib/hostip6.c")
164167
.file("curl/lib/hsts.c")
165168
.file("curl/lib/http.c")
166-
.file("curl/lib/http2.c")
167169
.file("curl/lib/http_aws_sigv4.c")
168170
.file("curl/lib/http_chunks.c")
169171
.file("curl/lib/http_digest.c")
@@ -205,6 +207,7 @@ fn main() {
205207
.file("curl/lib/version.c")
206208
.file("curl/lib/vauth/digest.c")
207209
.file("curl/lib/vauth/vauth.c")
210+
.file("curl/lib/vtls/hostcheck.c")
208211
.file("curl/lib/vtls/keylog.c")
209212
.file("curl/lib/vtls/vtls.c")
210213
.file("curl/lib/warnless.c")
@@ -239,7 +242,9 @@ fn main() {
239242

240243
if cfg!(feature = "http2") {
241244
cfg.define("USE_NGHTTP2", None)
242-
.define("NGHTTP2_STATICLIB", None);
245+
.define("NGHTTP2_STATICLIB", None)
246+
.file("curl/lib/h2h3.c")
247+
.file("curl/lib/http2.c");
243248

244249
println!("cargo:rustc-cfg=link_libnghttp2");
245250
if let Some(path) = env::var_os("DEP_NGHTTP2_ROOT") {
@@ -261,20 +266,7 @@ fn main() {
261266

262267
// Configure TLS backend. Since Cargo does not support mutually exclusive
263268
// features, make sure we only compile one vtls.
264-
if cfg!(feature = "mesalink") {
265-
cfg.define("USE_MESALINK", None)
266-
.file("curl/lib/vtls/mesalink.c");
267-
268-
if let Some(path) = env::var_os("DEP_MESALINK_INCLUDE") {
269-
cfg.include(path);
270-
}
271-
272-
if windows {
273-
cfg.define("HAVE_WINDOWS", None);
274-
} else {
275-
cfg.define("HAVE_UNIX", None);
276-
}
277-
} else if cfg!(feature = "rustls") {
269+
if cfg!(feature = "rustls") {
278270
cfg.define("USE_RUSTLS", None)
279271
.file("curl/lib/vtls/rustls.c")
280272
.include(env::var_os("DEP_RUSTLS_FFI_INCLUDE").unwrap());
@@ -285,17 +277,17 @@ fn main() {
285277
cfg.define("USE_WINDOWS_SSPI", None)
286278
.define("USE_SCHANNEL", None)
287279
.file("curl/lib/http_negotiate.c")
288-
.file("curl/lib/x509asn1.c")
289280
.file("curl/lib/curl_sspi.c")
290281
.file("curl/lib/socks_sspi.c")
291282
.file("curl/lib/vauth/spnego_sspi.c")
292283
.file("curl/lib/vauth/vauth.c")
293284
.file("curl/lib/vtls/schannel.c")
294-
.file("curl/lib/vtls/schannel_verify.c");
285+
.file("curl/lib/vtls/schannel_verify.c")
286+
.file("curl/lib/vtls/x509asn1.c");
295287
} else if target.contains("-apple-") {
296288
cfg.define("USE_SECTRANSP", None)
297-
.file("curl/lib/x509asn1.c")
298-
.file("curl/lib/vtls/sectransp.c");
289+
.file("curl/lib/vtls/sectransp.c")
290+
.file("curl/lib/vtls/x509asn1.c");
299291
if xcode_major_version().map_or(true, |v| v >= 9) {
300292
// On earlier Xcode versions (<9), defining HAVE_BUILTIN_AVAILABLE
301293
// would cause __bultin_available() to fail to compile due to

curl-sys/curl

Submodule curl updated 389 files

curl-sys/lib.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@
66
extern crate libnghttp2_sys;
77
#[cfg(link_libz)]
88
extern crate libz_sys;
9-
#[cfg(feature = "mesalink")]
10-
extern crate mesalink;
119
#[cfg(link_openssl)]
1210
extern crate openssl_sys;
1311
#[cfg(feature = "rustls")]

0 commit comments

Comments
 (0)