Skip to content

Commit 226030a

Browse files
ehussalexcrichton
andauthored
Update to 8.10.0 (#571)
* Update to 8.10.0 * Fix version detection in `systest` Factor in both major/minor instead of just minor. This has been broken for awhile since the 8.0 release. * Fix compilation against system libcurl for me Doesn't actually break the bindings since the underlying Rust type is still the same, but gets things running locally at least. * Fix bindings for `curl_version_info_data` --------- Co-authored-by: Alex Crichton <alex@alexcrichton.com>
1 parent 0622181 commit 226030a

File tree

6 files changed

+63
-43
lines changed

6 files changed

+63
-43
lines changed

curl-sys/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "curl-sys"
3-
version = "0.4.74+curl-8.9.0"
3+
version = "0.4.75+curl-8.10.0"
44
authors = ["Alex Crichton <alex@alexcrichton.com>"]
55
links = "curl"
66
build = "build.rs"

curl-sys/build.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ fn main() {
100100
.replace("@LIBCURL_LIBS@", "")
101101
.replace("@SUPPORT_FEATURES@", "")
102102
.replace("@SUPPORT_PROTOCOLS@", "")
103-
.replace("@CURLVERSION@", "8.9.0"),
103+
.replace("@CURLVERSION@", "8.10.0"),
104104
)
105105
.unwrap();
106106

@@ -283,6 +283,7 @@ fn main() {
283283
// features, make sure we only compile one vtls.
284284
if cfg!(feature = "rustls") {
285285
cfg.define("USE_RUSTLS", None)
286+
.file("curl/lib/vtls/cipher_suite.c")
286287
.file("curl/lib/vtls/rustls.c")
287288
.include(env::var_os("DEP_RUSTLS_FFI_INCLUDE").unwrap());
288289
} else if cfg!(feature = "windows-static-ssl") {

curl-sys/curl

Submodule curl updated 1052 files

curl-sys/lib.rs

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -414,7 +414,8 @@ pub const CURLOPT_TIMEVALUE: CURLoption = CURLOPTTYPE_LONG + 34;
414414
pub const CURLOPT_CUSTOMREQUEST: CURLoption = CURLOPTTYPE_OBJECTPOINT + 36;
415415
pub const CURLOPT_STDERR: CURLoption = CURLOPTTYPE_OBJECTPOINT + 37;
416416
pub const CURLOPT_POSTQUOTE: CURLoption = CURLOPTTYPE_OBJECTPOINT + 39;
417-
pub const CURLOPT_WRITEINFO: CURLoption = CURLOPTTYPE_OBJECTPOINT + 40;
417+
#[deprecated = "has no effect"]
418+
pub const CURLOPT_WRITEINFO: CURLoption = 9999;
418419
pub const CURLOPT_VERBOSE: CURLoption = CURLOPTTYPE_LONG + 41;
419420
pub const CURLOPT_HEADER: CURLoption = CURLOPTTYPE_LONG + 42;
420421
pub const CURLOPT_NOPROGRESS: CURLoption = CURLOPTTYPE_LONG + 43;
@@ -442,7 +443,8 @@ pub const CURLOPT_MAXREDIRS: CURLoption = CURLOPTTYPE_LONG + 68;
442443
pub const CURLOPT_FILETIME: CURLoption = CURLOPTTYPE_LONG + 69;
443444
pub const CURLOPT_TELNETOPTIONS: CURLoption = CURLOPTTYPE_OBJECTPOINT + 70;
444445
pub const CURLOPT_MAXCONNECTS: CURLoption = CURLOPTTYPE_LONG + 71;
445-
pub const CURLOPT_CLOSEPOLICY: CURLoption = CURLOPTTYPE_LONG + 72;
446+
#[deprecated = "has no effect"]
447+
pub const CURLOPT_CLOSEPOLICY: CURLoption = 9999;
446448
pub const CURLOPT_FRESH_CONNECT: CURLoption = CURLOPTTYPE_LONG + 74;
447449
pub const CURLOPT_FORBID_REUSE: CURLoption = CURLOPTTYPE_LONG + 75;
448450
pub const CURLOPT_RANDOM_FILE: CURLoption = CURLOPTTYPE_OBJECTPOINT + 76;
@@ -665,14 +667,14 @@ pub const CURL_HTTP_VERSION_2_PRIOR_KNOWLEDGE: c_int = 5;
665667
pub const CURL_HTTP_VERSION_3: c_int = 30;
666668

667669
// Note that the type here is wrong, it's just intended to just be an enum.
668-
pub const CURL_SSLVERSION_DEFAULT: CURLoption = 0;
669-
pub const CURL_SSLVERSION_TLSv1: CURLoption = 1;
670-
pub const CURL_SSLVERSION_SSLv2: CURLoption = 2;
671-
pub const CURL_SSLVERSION_SSLv3: CURLoption = 3;
672-
pub const CURL_SSLVERSION_TLSv1_0: CURLoption = 4;
673-
pub const CURL_SSLVERSION_TLSv1_1: CURLoption = 5;
674-
pub const CURL_SSLVERSION_TLSv1_2: CURLoption = 6;
675-
pub const CURL_SSLVERSION_TLSv1_3: CURLoption = 7;
670+
pub const CURL_SSLVERSION_DEFAULT: __enum_ty = 0;
671+
pub const CURL_SSLVERSION_TLSv1: __enum_ty = 1;
672+
pub const CURL_SSLVERSION_SSLv2: __enum_ty = 2;
673+
pub const CURL_SSLVERSION_SSLv3: __enum_ty = 3;
674+
pub const CURL_SSLVERSION_TLSv1_0: __enum_ty = 4;
675+
pub const CURL_SSLVERSION_TLSv1_1: __enum_ty = 5;
676+
pub const CURL_SSLVERSION_TLSv1_2: __enum_ty = 6;
677+
pub const CURL_SSLVERSION_TLSv1_3: __enum_ty = 7;
676678

677679
pub const CURLOPT_READDATA: CURLoption = CURLOPT_INFILE;
678680
pub const CURLOPT_WRITEDATA: CURLoption = CURLOPT_FILE;
@@ -871,7 +873,8 @@ pub const CURLVERSION_EIGHTH: CURLversion = 7;
871873
pub const CURLVERSION_NINTH: CURLversion = 8;
872874
pub const CURLVERSION_TENTH: CURLversion = 9;
873875
pub const CURLVERSION_ELEVENTH: CURLversion = 10;
874-
pub const CURLVERSION_NOW: CURLversion = CURLVERSION_ELEVENTH;
876+
pub const CURLVERSION_TWELFTH: CURLversion = 11;
877+
pub const CURLVERSION_NOW: CURLversion = CURLVERSION_TWELFTH;
875878

876879
#[repr(C)]
877880
pub struct curl_version_info_data {
@@ -901,6 +904,7 @@ pub struct curl_version_info_data {
901904
pub hyper_version: *const c_char,
902905
pub gsasl_version: *const c_char,
903906
pub feature_names: *const *const c_char,
907+
pub rtmp_version: *const c_char,
904908
}
905909

906910
pub const CURL_VERSION_IPV6: c_int = 1 << 0;

systest/build.rs

Lines changed: 43 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,14 @@ fn main() {
1515
let version = version
1616
.lines()
1717
.find(|l| !l.is_empty() && !l.starts_with('#'))
18-
.and_then(|s| s.parse::<u32>().ok())
19-
.unwrap_or(10000);
20-
println!("got version: {}", version);
18+
.and_then(|s| {
19+
let mut parts = s.split_whitespace();
20+
let major = parts.next()?.parse::<u32>().ok()?;
21+
let minor = parts.next()?.parse::<u32>().ok()?;
22+
Some((major, minor))
23+
})
24+
.unwrap_or((10000, 0));
25+
println!("got version: {version:?}");
2126

2227
if env::var("TARGET").unwrap().contains("msvc") {
2328
cfg.flag("/wd4574"); // did you mean to use '#if INCL_WINSOCK_API_TYPEDEFS'
@@ -39,20 +44,21 @@ fn main() {
3944
"curl_khtype" | "curl_khstat" | "curl_khmatch" => format!("enum {}", s),
4045
s if is_struct => format!("struct {}", s),
4146
"sockaddr" => "struct sockaddr".to_string(),
47+
"__enum_ty" => "unsigned".to_string(),
4248
s => s.to_string(),
4349
});
4450
// cfg.fn_cname(|s, l| l.unwrap_or(s).to_string());
4551
cfg.skip_type(|n| n == "__enum_ty");
4652
cfg.skip_signededness(|s| s.ends_with("callback") || s.ends_with("function"));
4753

4854
cfg.skip_struct(move |s| {
49-
if version < 71 {
55+
if version < (7, 71) {
5056
match s {
5157
"curl_blob" => return true,
5258
_ => {}
5359
}
5460
}
55-
if version < 87 {
61+
if version < (8, 10) {
5662
match s {
5763
"curl_version_info_data" => return true,
5864
_ => {}
@@ -64,13 +70,22 @@ fn main() {
6470

6571
// Version symbols are extracted from https://curl.se/libcurl/c/symbols-in-versions.html
6672
cfg.skip_const(move |s| {
67-
if version < 87 {
73+
if version < (8, 10) {
6874
match s {
69-
"CURLVERSION_ELEVENTH" | "CURLVERSION_NOW" => return true,
75+
"CURLVERSION_TWELFTH"
76+
| "CURLVERSION_NOW"
77+
| "CURLOPT_WRITEINFO"
78+
| "CURLOPT_CLOSEPOLICY" => return true,
7079
_ => {}
7180
}
7281
}
73-
if version < 77 {
82+
if version < (7, 87) {
83+
match s {
84+
"CURLVERSION_ELEVENTH" => return true,
85+
_ => {}
86+
}
87+
}
88+
if version < (7, 77) {
7489
match s {
7590
"CURLVERSION_TENTH"
7691
| "CURLOPT_CAINFO_BLOB"
@@ -84,29 +99,29 @@ fn main() {
8499
_ => {}
85100
}
86101
}
87-
if version < 76 {
102+
if version < (7, 76) {
88103
match s {
89104
"CURLOPT_DOH_SSL_VERIFYHOST" => return true,
90105
"CURLOPT_DOH_SSL_VERIFYPEER" => return true,
91106
"CURLOPT_DOH_SSL_VERIFYSTATUS" => return true,
92107
_ => {}
93108
}
94109
}
95-
if version < 75 {
110+
if version < (7, 75) {
96111
match s {
97112
"CURLAUTH_AWS_SIGV4" => return true,
98113
"CURLOPT_AWS_SIGV4" => return true,
99114
"CURLVERSION_NINTH" => return true,
100115
_ => {}
101116
}
102117
}
103-
if version < 72 {
118+
if version < (7, 72) {
104119
match s {
105120
"CURLVERSION_EIGHTH" => return true,
106121
_ => {}
107122
}
108123
}
109-
if version < 71 {
124+
if version < (7, 71) {
110125
match s {
111126
"CURLOPT_SSLCERT_BLOB"
112127
| "CURLOPT_SSLKEY_BLOB"
@@ -122,7 +137,7 @@ fn main() {
122137
_ => {}
123138
}
124139
}
125-
if version < 70 {
140+
if version < (7, 70) {
126141
match s {
127142
"CURL_VERSION_HTTP3"
128143
| "CURL_VERSION_BROTLI"
@@ -131,32 +146,32 @@ fn main() {
131146
_ => {}
132147
}
133148
}
134-
if version < 68 {
149+
if version < (7, 68) {
135150
match s {
136151
"CURLSSLOPT_NO_PARTIALCHAIN" => return true,
137152
_ => {}
138153
}
139154
}
140-
if version < 67 {
155+
if version < (7, 67) {
141156
match s {
142157
"CURLMOPT_MAX_CONCURRENT_STREAMS" => return true,
143158
_ => {}
144159
}
145160
}
146-
if version < 66 {
161+
if version < (7, 66) {
147162
match s {
148163
"CURL_HTTP_VERSION_3" => return true,
149164
"CURLOPT_MAXAGE_CONN" => return true,
150165
_ => {}
151166
}
152167
}
153-
if version < 65 {
168+
if version < (7, 65) {
154169
match s {
155170
"CURLVERSION_SIXTH" => return true,
156171
_ => {}
157172
}
158173
}
159-
if version < 64 {
174+
if version < (7, 64) {
160175
match s {
161176
"CURLE_HTTP2" => return true,
162177
"CURLE_PEER_FAILED_VERIFICATION" => return true,
@@ -169,35 +184,35 @@ fn main() {
169184
_ => {}
170185
}
171186
}
172-
if version < 62 {
187+
if version < (7, 62) {
173188
match s {
174189
"CURLOPT_DOH_URL" => return true,
175190
"CURLOPT_UPLOAD_BUFFERSIZE" => return true,
176191
_ => {}
177192
}
178193
}
179-
if version < 61 {
194+
if version < (7, 61) {
180195
match s {
181196
"CURLOPT_PIPEWAIT" => return true,
182197
"CURLE_PEER_FAILED_VERIFICATION" => return true,
183198
_ => {}
184199
}
185200
}
186-
if version < 60 {
201+
if version < (7, 60) {
187202
match s {
188203
"CURLVERSION_FIFTH" => return true,
189204
_ => {}
190205
}
191206
}
192-
if version < 54 {
207+
if version < (7, 54) {
193208
match s {
194209
"CURL_SSLVERSION_TLSv1_3" | "CURLOPT_PROXY_SSLCERT" | "CURLOPT_PROXY_SSLKEY" => {
195210
return true
196211
}
197212
_ => {}
198213
}
199214
}
200-
if version < 52 {
215+
if version < (7, 52) {
201216
match s {
202217
"CURLOPT_PROXY_CAINFO"
203218
| "CURLOPT_PROXY_CAPATH"
@@ -217,29 +232,29 @@ fn main() {
217232
}
218233
}
219234

220-
if version < 49 {
235+
if version < (7, 49) {
221236
match s {
222237
"CURL_HTTP_VERSION_2_PRIOR_KNOWLEDGE" | "CURLOPT_CONNECT_TO" => return true,
223238
_ => {}
224239
}
225240
}
226-
if version < 47 {
241+
if version < (7, 47) {
227242
if s.starts_with("CURL_HTTP_VERSION_2") {
228243
return true;
229244
}
230245
}
231-
if version < 44 {
246+
if version < (7, 44) {
232247
match s {
233248
"CURLMOPT_PUSHDATA" | "CURLMOPT_PUSHFUNCTION" => return true,
234249
_ => {}
235250
}
236251
}
237-
if version < 43 {
252+
if version < (7, 43) {
238253
if s.starts_with("CURLPIPE_") {
239254
return true;
240255
}
241256
}
242-
if version < 25 {
257+
if version < (7, 25) {
243258
match s {
244259
"CURLSSLOPT_ALLOW_BEAST" => return true,
245260
_ => {}

systest/version_detect.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
#include <curl/curlver.h>
22

3-
LIBCURL_VERSION_MINOR
3+
LIBCURL_VERSION_MAJOR LIBCURL_VERSION_MINOR

0 commit comments

Comments
 (0)