diff --git a/Cargo.lock b/Cargo.lock index 3351e525fb87..127a646ddf81 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -839,11 +839,11 @@ dependencies = [ [[package]] name = "coreaudio-sys" -version = "0.2.9" +version = "0.2.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca4679a59dbd8c15f064c012dfe8c1163b9453224238b59bb9328c142b8b248b" +checksum = "3dff444d80630d7073077d38d40b4501fd518bd2b922c2a55edcc8b0f7be57e6" dependencies = [ - "bindgen 0.56.999", + "bindgen 0.59.2", ] [[package]] diff --git a/third_party/rust/coreaudio-sys/.cargo-checksum.json b/third_party/rust/coreaudio-sys/.cargo-checksum.json index 02af42457210..3355bd43fdfc 100644 --- a/third_party/rust/coreaudio-sys/.cargo-checksum.json +++ b/third_party/rust/coreaudio-sys/.cargo-checksum.json @@ -1 +1 @@ -{"files":{"Cargo.toml":"a19c6ae65a70da64b409c136006863de3d347e1e3acce7786ed60e69775e08c5","LICENSE":"7576269ea71f767b99297934c0b2367532690f8c4badc695edf8e04ab6a1e545","README.md":"a8adeaf1947035175b890109b36604ac3676f887911b5b8debd216689c0b65bd","build.rs":"7c3c9bfcbd4f88ca14444a9ce7ef2fafc5facea9d8007442471a4bb4c4ecbdb5","src/lib.rs":"22c9dbbb1dc38d6f77b9362e806a7ee59a8ca1aa9b2c9344d1a487a91287ed59"},"package":"ca4679a59dbd8c15f064c012dfe8c1163b9453224238b59bb9328c142b8b248b"} \ No newline at end of file +{"files":{"Cargo.toml":"52ef8967f3de2269b3058deb3f3577adb95743a24b44fde1f709b93f98579a30","LICENSE":"7576269ea71f767b99297934c0b2367532690f8c4badc695edf8e04ab6a1e545","README.md":"a8adeaf1947035175b890109b36604ac3676f887911b5b8debd216689c0b65bd","build.rs":"e3d45b1a17b655996a09b1d8f5f4dabb8c574e5b803814a13494f56dfce32f4e","src/lib.rs":"22c9dbbb1dc38d6f77b9362e806a7ee59a8ca1aa9b2c9344d1a487a91287ed59"},"package":"3dff444d80630d7073077d38d40b4501fd518bd2b922c2a55edcc8b0f7be57e6"} \ No newline at end of file diff --git a/third_party/rust/coreaudio-sys/Cargo.toml b/third_party/rust/coreaudio-sys/Cargo.toml index 0ad752236a54..e73909ffa5e7 100644 --- a/third_party/rust/coreaudio-sys/Cargo.toml +++ b/third_party/rust/coreaudio-sys/Cargo.toml @@ -11,21 +11,32 @@ [package] name = "coreaudio-sys" -version = "0.2.9" +version = "0.2.10" authors = ["Mitchell Nordine "] build = "build.rs" description = "Bindings for Apple's CoreAudio frameworks generated via rust-bindgen" homepage = "https://github.com/RustAudio/coreaudio-sys" readme = "README.md" -keywords = ["core", "audio", "unit", "osx", "ios"] +keywords = [ + "core", + "audio", + "unit", + "osx", + "ios", +] license = "MIT" repository = "https://github.com/RustAudio/coreaudio-sys.git" + [package.metadata.docs.rs] all-features = true default-target = "x86_64-apple-darwin" -targets = ["x86_64-apple-darwin", "x86_64-apple-ios"] +targets = [ + "x86_64-apple-darwin", + "x86_64-apple-ios", +] + [build-dependencies.bindgen] -version = "0.56" +version = "0.59" features = ["runtime"] default-features = false @@ -34,5 +45,11 @@ audio_toolbox = [] audio_unit = [] core_audio = [] core_midi = [] -default = ["audio_toolbox", "audio_unit", "core_audio", "open_al", "core_midi"] +default = [ + "audio_toolbox", + "audio_unit", + "core_audio", + "open_al", + "core_midi", +] open_al = [] diff --git a/third_party/rust/coreaudio-sys/build.rs b/third_party/rust/coreaudio-sys/build.rs index dd831510b8d3..81cfbcc855a2 100644 --- a/third_party/rust/coreaudio-sys/build.rs +++ b/third_party/rust/coreaudio-sys/build.rs @@ -128,10 +128,15 @@ fn build(sdk_path: Option<&str>, target: &str) { if target.contains("apple-ios") { // time.h as has a variable called timezone that conflicts with some of the objective-c // calls from NSCalendar.h in the Foundation framework. This removes that one variable. - builder = builder.blacklist_item("timezone"); - builder = builder.blacklist_item("objc_object"); + builder = builder.blocklist_item("timezone"); + builder = builder.blocklist_item("objc_object"); } + // bindgen produces alignment tests that cause undefined behavior in some cases. + // This seems to happen across all apple target tripples :/. + // https://github.com/rust-lang/rust-bindgen/issues/1651 + builder = builder.layout_tests(false); + let meta_header: Vec<_> = headers .iter() .map(|h| format!("#include <{}>\n", h))