File tree Expand file tree Collapse file tree 3 files changed +12
-0
lines changed Expand file tree Collapse file tree 3 files changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -64,6 +64,7 @@ fn main() {
64
64
println ! ( "cargo:root={}" , dst. display( ) ) ;
65
65
println ! ( "cargo:include={}" , include. display( ) ) ;
66
66
println ! ( "cargo:static=1" ) ;
67
+ println ! ( "cargo:rustc-cfg=libcurl_vendored" ) ;
67
68
fs:: create_dir_all ( include. join ( "curl" ) ) . unwrap ( ) ;
68
69
69
70
for header in [
Original file line number Diff line number Diff line change @@ -1111,3 +1111,8 @@ extern "C" {
1111
1111
pub fn rust_crate_version ( ) -> & ' static str {
1112
1112
env ! ( "CARGO_PKG_VERSION" )
1113
1113
}
1114
+
1115
+ #[ doc( hidden) ]
1116
+ pub fn vendored ( ) -> bool {
1117
+ cfg ! ( libcurl_vendored)
1118
+ }
Original file line number Diff line number Diff line change @@ -51,6 +51,11 @@ impl Version {
51
51
unsafe { ( * self . inner ) . version_num as u32 }
52
52
}
53
53
54
+ /// Returns true if this was built with the vendored version of libcurl.
55
+ pub fn vendored ( & self ) -> bool {
56
+ curl_sys:: vendored ( )
57
+ }
58
+
54
59
/// Returns a human readable string of the host libcurl is built for.
55
60
///
56
61
/// This is discovered as part of the build environment.
@@ -389,6 +394,7 @@ impl fmt::Debug for Version {
389
394
f. field ( "version" , & self . version ( ) )
390
395
. field ( "rust_crate_version" , & env ! ( "CARGO_PKG_VERSION" ) )
391
396
. field ( "rust_sys_crate_version" , & curl_sys:: rust_crate_version ( ) )
397
+ . field ( "vendored" , & self . vendored ( ) )
392
398
. field ( "host" , & self . host ( ) )
393
399
. field ( "feature_ipv6" , & self . feature_ipv6 ( ) )
394
400
. field ( "feature_ssl" , & self . feature_ssl ( ) )
You can’t perform that action at this time.
0 commit comments