From eb58d3f9c4ed68b31d7a1e290fe7a90af270cefc Mon Sep 17 00:00:00 2001 From: Kornel Date: Tue, 17 Sep 2024 18:21:42 +0100 Subject: [PATCH 1/2] Upgrade cargo-xwin to unify rustls versions --- Cargo.lock | 720 +++++++++++++++++++++++++---------------------------- Cargo.toml | 4 +- 2 files changed, 347 insertions(+), 377 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index fb0fc66de..2b864cb2e 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -86,9 +86,18 @@ dependencies = [ [[package]] name = "anyhow" -version = "1.0.93" +version = "1.0.89" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c95c10ba0b00a02636238b814946408b1322d5ac4760326e6fb8ec956d85775" +checksum = "86fdf8605db99b54d3cd748a44c6d04df638eb5dafb219b135d0149bd0db01f6" + +[[package]] +name = "arbitrary" +version = "1.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dde20b3d026af13f561bdd0f15edf01fc734f0dafcedbaf42bba506a9517f223" +dependencies = [ + "derive_arbitrary", +] [[package]] name = "autocfg" @@ -104,7 +113,34 @@ checksum = "edf3ee19dbc0a46d740f6f0926bde8c50f02bdbc7b536842da28f6ac56513a8b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.89", + "syn 2.0.87", +] + +[[package]] +name = "aws-lc-rs" +version = "1.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cdd82dba44d209fddb11c190e0a94b78651f95299598e472215667417a03ff1d" +dependencies = [ + "aws-lc-sys", + "mirai-annotations", + "paste", + "zeroize", +] + +[[package]] +name = "aws-lc-sys" +version = "0.22.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "df7a4168111d7eb622a31b214057b8509c0a7e1794f44c546d742330dc793972" +dependencies = [ + "bindgen", + "cc", + "cmake", + "dunce", + "fs_extra", + "libc", + "paste", ] [[package]] @@ -119,6 +155,29 @@ version = "0.22.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" +[[package]] +name = "bindgen" +version = "0.69.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "271383c67ccabffb7381723dea0672a673f292304fcb45c01cc648c7a8d58088" +dependencies = [ + "bitflags 2.5.0", + "cexpr", + "clang-sys", + "itertools", + "lazy_static", + "lazycell", + "log", + "prettyplease", + "proc-macro2", + "quote", + "regex", + "rustc-hash", + "shlex", + "syn 2.0.87", + "which 4.4.2", +] + [[package]] name = "bitflags" version = "1.3.2" @@ -150,6 +209,12 @@ dependencies = [ "serde", ] +[[package]] +name = "bumpalo" +version = "3.16.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "79296716171880943b8470b5f8d03aa55eb2e645a4874bdbb28adb49162e012c" + [[package]] name = "byteorder" version = "1.5.0" @@ -191,9 +256,9 @@ dependencies = [ [[package]] name = "cab" -version = "0.5.0" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e8636d870cf15918e416b7904f0db1cbd06de0ffe392986c3b16662552df00c" +checksum = "171228650e6721d5acc0868a462cd864f49ac5f64e4a42cde270406e64e404d2" dependencies = [ "byteorder", "flate2", @@ -243,9 +308,9 @@ dependencies = [ [[package]] name = "cargo-xwin" -version = "0.16.5" +version = "0.17.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "471f6fff351fc5ab837ce7223637f7c20048e4a846708e7e58fda64db9d3a8b9" +checksum = "dc80ddf05acf2ff312d58830f763f07d522aa1ea56c9e7895189b920126b9197" dependencies = [ "anyhow", "cargo-config2", @@ -261,15 +326,15 @@ dependencies = [ "rustls-pemfile", "tracing-subscriber", "ureq", - "which 5.0.0", + "which 6.0.3", "xwin", ] [[package]] name = "cargo-zigbuild" -version = "0.19.4" +version = "0.19.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "20de66555d3ebec780021a7cd51aafe92b9e8f4fa648ef1f12e9c723b76c9764" +checksum = "e700178b11124560cdbabc8808e938fe6d77abde036b77a4c03a191b02bac854" dependencies = [ "anyhow", "cargo-config2", @@ -317,25 +382,36 @@ dependencies = [ "quote", "serde", "serde_json", - "syn 2.0.89", + "syn 2.0.87", "tempfile", "toml", ] [[package]] name = "cc" -version = "1.2.1" +version = "1.1.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fd9de9f2205d5ef3fd67e685b0df337994ddd4495e2a28d185500d0e1edfea47" +checksum = "07b1695e2c7e8fc85310cde85aeaab7e3097f593c91d209d3f9df76c928100f0" dependencies = [ + "jobserver", + "libc", "shlex", ] +[[package]] +name = "cexpr" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6fac387a98bb7c37292057cffc56d62ecb629900026402633ae9160df93a8766" +dependencies = [ + "nom", +] + [[package]] name = "cfb" -version = "0.9.0" +version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b390793e912300f1aa713429f7fd0c391024e6c18b988962558bc4f96a349b1f" +checksum = "d8a4f8e55be323b378facfcf1f06aa97f6ec17cf4ac84fb17325093aaf62da41" dependencies = [ "byteorder", "fnv", @@ -368,6 +444,17 @@ dependencies = [ "stacker", ] +[[package]] +name = "clang-sys" +version = "1.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b023947811758c97c59bf9d1c188fd619ad4718dcaa767947df1cadb14f39f4" +dependencies = [ + "glob", + "libc", + "libloading", +] + [[package]] name = "clap" version = "4.5.7" @@ -430,7 +517,7 @@ dependencies = [ "heck 0.5.0", "proc-macro2", "quote", - "syn 2.0.89", + "syn 2.0.87", ] [[package]] @@ -449,6 +536,15 @@ dependencies = [ "unicode-width", ] +[[package]] +name = "cmake" +version = "0.1.51" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fb1e43aa7fd152b1f968787f7dbcdeb306d1867ff373c69955211876c053f91a" +dependencies = [ + "cc", +] + [[package]] name = "colorchoice" version = "1.0.1" @@ -602,6 +698,17 @@ dependencies = [ "syn 1.0.109", ] +[[package]] +name = "derive_arbitrary" +version = "1.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "30542c1ad912e0e3d22a1935c290e12e8a29d704a420177a31faad4a601a0800" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.87", +] + [[package]] name = "dialoguer" version = "0.11.0" @@ -659,7 +766,7 @@ checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.89", + "syn 2.0.87", ] [[package]] @@ -756,9 +863,9 @@ dependencies = [ [[package]] name = "flate2" -version = "1.0.35" +version = "1.0.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c936bfdafb507ebbf50b8074c54fa31c5be9a1e7e5f467dd659697041407d07c" +checksum = "324a1be68054ef05ad64b861cc9eaf1d623d2d8cb25b4bf2cb9cdd902b4bf253" dependencies = [ "crc32fast", "miniz_oxide", @@ -814,11 +921,17 @@ dependencies = [ "windows-sys 0.52.0", ] +[[package]] +name = "fs_extra" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "42703706b716c37f96a77aea830392ad231f44c9e9a67872fa5548707e11b11c" + [[package]] name = "futures" -version = "0.3.31" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "65bc07b1a8bc7c85c5f2e110c476c7389b4554ba72af57d8445ea63a576b0876" +checksum = "645c6916888f6cb6350d2550b80fb63e734897a8498abe35cfb732b6487804b0" dependencies = [ "futures-channel", "futures-core", @@ -847,9 +960,9 @@ checksum = "05f29059c0c2090612e8d742178b0580d2dc940c837851ad723096f87af6663e" [[package]] name = "futures-executor" -version = "0.3.31" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e28d1d997f585e54aebc3f97d39e72338912123a67330d723fdbb564d646c9f" +checksum = "a576fc72ae164fca6b9db127eaa9a9dda0d61316034f33a0a0d4eda41f02b01d" dependencies = [ "futures-core", "futures-task", @@ -870,7 +983,7 @@ checksum = "162ee34ebcb7c64a8abebc059ce0fee27c2262618d7b60ed8faf72fef13c3650" dependencies = [ "proc-macro2", "quote", - "syn 2.0.89", + "syn 2.0.87", ] [[package]] @@ -945,8 +1058,8 @@ dependencies = [ "aho-corasick", "bstr", "log", - "regex-automata 0.4.9", - "regex-syntax 0.8.5", + "regex-automata 0.4.7", + "regex-syntax 0.8.4", ] [[package]] @@ -1007,143 +1120,14 @@ dependencies = [ "serde", ] -[[package]] -name = "icu_collections" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db2fa452206ebee18c4b5c2274dbf1de17008e874b4dc4f0aea9d01ca79e4526" -dependencies = [ - "displaydoc", - "yoke", - "zerofrom", - "zerovec", -] - -[[package]] -name = "icu_locid" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "13acbb8371917fc971be86fc8057c41a64b521c184808a698c02acc242dbf637" -dependencies = [ - "displaydoc", - "litemap", - "tinystr", - "writeable", - "zerovec", -] - -[[package]] -name = "icu_locid_transform" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "01d11ac35de8e40fdeda00d9e1e9d92525f3f9d887cdd7aa81d727596788b54e" -dependencies = [ - "displaydoc", - "icu_locid", - "icu_locid_transform_data", - "icu_provider", - "tinystr", - "zerovec", -] - -[[package]] -name = "icu_locid_transform_data" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fdc8ff3388f852bede6b579ad4e978ab004f139284d7b28715f773507b946f6e" - -[[package]] -name = "icu_normalizer" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "19ce3e0da2ec68599d193c93d088142efd7f9c5d6fc9b803774855747dc6a84f" -dependencies = [ - "displaydoc", - "icu_collections", - "icu_normalizer_data", - "icu_properties", - "icu_provider", - "smallvec", - "utf16_iter", - "utf8_iter", - "write16", - "zerovec", -] - -[[package]] -name = "icu_normalizer_data" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8cafbf7aa791e9b22bec55a167906f9e1215fd475cd22adfcf660e03e989516" - -[[package]] -name = "icu_properties" -version = "1.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "93d6020766cfc6302c15dbbc9c8778c37e62c14427cb7f6e601d849e092aeef5" -dependencies = [ - "displaydoc", - "icu_collections", - "icu_locid_transform", - "icu_properties_data", - "icu_provider", - "tinystr", - "zerovec", -] - -[[package]] -name = "icu_properties_data" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67a8effbc3dd3e4ba1afa8ad918d5684b8868b3b26500753effea8d2eed19569" - -[[package]] -name = "icu_provider" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ed421c8a8ef78d3e2dbc98a973be2f3770cb42b606e3ab18d6237c4dfde68d9" -dependencies = [ - "displaydoc", - "icu_locid", - "icu_provider_macros", - "stable_deref_trait", - "tinystr", - "writeable", - "yoke", - "zerofrom", - "zerovec", -] - -[[package]] -name = "icu_provider_macros" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ec89e9337638ecdc08744df490b221a7399bf8d164eb52a665454e60e075ad6" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.89", -] - [[package]] name = "idna" -version = "1.0.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "686f825264d630750a544639377bae737628043f20d38bbc029e8f29ea968a7e" -dependencies = [ - "idna_adapter", - "smallvec", - "utf8_iter", -] - -[[package]] -name = "idna_adapter" -version = "1.2.0" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "daca1df1c957320b2cf139ac61e7bd64fed304c5040df000a745aa1de3b4ef71" +checksum = "634d9b1461af396cad843f47fdba5597a4f9e6ddd4bfb6ff5d85028c25cb12f6" dependencies = [ - "icu_normalizer", - "icu_properties", + "unicode-bidi", + "unicode-normalization", ] [[package]] @@ -1156,7 +1140,7 @@ dependencies = [ "globset", "log", "memchr", - "regex-automata 0.4.9", + "regex-automata 0.4.7", "same-file", "walkdir", "winapi-util", @@ -1222,6 +1206,15 @@ version = "1.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "49f1f14873335454500d59611f1cf4a4b0f786f9ac11f4312a78e4cf2566695b" +[[package]] +name = "jobserver" +version = "0.1.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "48d1dbcbbeb6a7fec7e059840aa538bd62aaccf972c7346c4d9d2059312853d0" +dependencies = [ + "libc", +] + [[package]] name = "keyring" version = "2.3.3" @@ -1238,6 +1231,12 @@ version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" +[[package]] +name = "lazycell" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55" + [[package]] name = "lddtree" version = "0.3.6" @@ -1255,6 +1254,16 @@ version = "0.2.158" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d8adc4bb1803a324070e64a98ae98f38934d91957a99cfb3a43dcbc01bc56439" +[[package]] +name = "libloading" +version = "0.8.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4979f22fdb869068da03c9f7528f8297c6fd2606bc3a4affe42e6a823fdb8da4" +dependencies = [ + "cfg-if", + "windows-targets 0.52.5", +] + [[package]] name = "libmimalloc-sys" version = "0.1.38" @@ -1291,12 +1300,6 @@ version = "0.4.14" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "78b3ae25bc7c8c38cec158d1f2757ee79e9b3740fbc7ccf0e59e4b08d793fa89" -[[package]] -name = "litemap" -version = "0.7.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ee93343901ab17bd981295f2cf0026d4ad018c7c31ba84549a4ddbb47a45104" - [[package]] name = "lock_api" version = "0.4.12" @@ -1307,6 +1310,12 @@ dependencies = [ "scopeguard", ] +[[package]] +name = "lockfree-object-pool" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9374ef4228402d4b7e403e5838cb880d9ee663314b0a900d5a6aabf0c213552e" + [[package]] name = "log" version = "0.4.21" @@ -1413,7 +1422,7 @@ dependencies = [ "url", "which 6.0.3", "wild", - "zip", + "zip 0.6.6", ] [[package]] @@ -1471,11 +1480,17 @@ dependencies = [ "adler2", ] +[[package]] +name = "mirai-annotations" +version = "1.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c9be0862c1b3f26a88803c4a49de6889c10e608b3ee9344e6ef5b45fb37ad3d1" + [[package]] name = "msi" -version = "0.7.0" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "226b2404f03d2cf47375b9715c8adfae4e388bb2377cff908e8a40f31e421514" +checksum = "4a2332f87a064dea9cce571408c879e0da8dc193b3af06a2b3b2604ee4182a32" dependencies = [ "byteorder", "cfb", @@ -1562,9 +1577,9 @@ checksum = "830b246a0e5f20af87141b25c173cd1b609bd7779a4617d6ec582abaf90870f3" [[package]] name = "once_cell" -version = "1.20.2" +version = "1.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1261fe7e33c73b354eab43b1273a57c8f967d0391e80353e51f764ac02cf6775" +checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" [[package]] name = "openssl" @@ -1589,7 +1604,7 @@ checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.89", + "syn 2.0.87", ] [[package]] @@ -1652,7 +1667,7 @@ dependencies = [ "libc", "redox_syscall 0.5.1", "smallvec", - "windows-targets 0.52.6", + "windows-targets 0.52.5", ] [[package]] @@ -1730,9 +1745,9 @@ checksum = "b4596b6d070b27117e987119b4dac604f3c58cfb0b191112e24771b2faeac1a6" [[package]] name = "platform-info" -version = "2.0.4" +version = "2.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91077ffd05d058d70d79eefcd7d7f6aac34980860a7519960f7913b6563a8c3a" +checksum = "d5ff316b9c4642feda973c18f0decd6c8b0919d4722566f6e4337cce0dd88217" dependencies = [ "libc", "winapi", @@ -1766,6 +1781,16 @@ dependencies = [ "yansi", ] +[[package]] +name = "prettyplease" +version = "0.2.25" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "64d1ec885c64d0457d564db4ec299b2dae3f9c02808b8ad9c3a089c591b18033" +dependencies = [ + "proc-macro2", + "syn 2.0.87", +] + [[package]] name = "proc-macro-crate" version = "3.1.0" @@ -1777,9 +1802,9 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.92" +version = "1.0.85" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "37d3544b3f2748c54e147655edb5025752e2303145b5aefb3c3ea2c78b973bb0" +checksum = "22244ce15aa966053a896d1accb3a6e68469b97c7f33f284b99f0d576879fc23" dependencies = [ "unicode-ident", ] @@ -1818,7 +1843,7 @@ dependencies = [ "rfc2047-decoder", "tar", "thiserror", - "zip", + "zip 0.6.6", ] [[package]] @@ -1917,14 +1942,14 @@ dependencies = [ [[package]] name = "regex" -version = "1.11.1" +version = "1.10.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b544ef1b4eac5dc2db33ea63606ae9ffcfac26c1416a2806ae0bf5f56b201191" +checksum = "4219d74c6b67a3654a9fbebc4b419e22126d13d2f3c4a07ee0cb61ff79a79619" dependencies = [ "aho-corasick", "memchr", - "regex-automata 0.4.9", - "regex-syntax 0.8.5", + "regex-automata 0.4.7", + "regex-syntax 0.8.4", ] [[package]] @@ -1938,13 +1963,13 @@ dependencies = [ [[package]] name = "regex-automata" -version = "0.4.9" +version = "0.4.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "809e8dc61f6de73b46c85f4c96486310fe304c434cfa43669d7b40f711150908" +checksum = "38caf58cc5ef2fed281f89292ef23f6365465ed9a41b7a7754eb4e26496c92df" dependencies = [ "aho-corasick", "memchr", - "regex-syntax 0.8.5", + "regex-syntax 0.8.4", ] [[package]] @@ -1955,9 +1980,9 @@ checksum = "f162c6dd7b008981e4d40210aca20b4bd0f9b60ca9271061b07f78537722f2e1" [[package]] name = "regex-syntax" -version = "0.8.5" +version = "0.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b15c43186be67a4fd63bee50d0303afffcef381492ebe2c5d87f324e1b8815c" +checksum = "7a66a03ae7c801facd77a29370b4faec201768915ac14a721ba36f20bc9c209b" [[package]] name = "relative-path" @@ -2020,10 +2045,16 @@ dependencies = [ "regex", "relative-path", "rustc_version", - "syn 2.0.89", + "syn 2.0.87", "unicode-ident", ] +[[package]] +name = "rustc-hash" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" + [[package]] name = "rustc_version" version = "0.4.1" @@ -2054,11 +2085,13 @@ dependencies = [ [[package]] name = "rustls" -version = "0.22.4" +version = "0.23.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf4ef73721ac7bcd79b2b315da7779d8fc09718c6b3d2d1b2d94850eb8c18432" +checksum = "f2dabaac7466917e566adb06783a81ca48944c6898a1b08b9374106dd671f4c8" dependencies = [ + "aws-lc-rs", "log", + "once_cell", "ring", "rustls-pki-types", "rustls-webpki", @@ -2084,10 +2117,11 @@ checksum = "976295e77ce332211c0d24d92c0e83e50f5c5f046d11082cea19f3df13a3562d" [[package]] name = "rustls-webpki" -version = "0.102.4" +version = "0.102.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff448f7e92e913c4b7d4c6d8e4540a1724b319b4152b8aef6d4cf8339712b33e" +checksum = "64ca1bc8749bd4cf37b5ce386cc146580777b4e8572c7b97baf22c83f444bee9" dependencies = [ + "aws-lc-rs", "ring", "rustls-pki-types", "untrusted", @@ -2095,9 +2129,9 @@ dependencies = [ [[package]] name = "rustversion" -version = "1.0.18" +version = "1.0.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0e819f2bc632f285be6d7cd36e25940d45b2391dd6d9b939e79de557f7014248" +checksum = "955d28af4278de8121b7ebeb796b6a45735dc01436d898801014aced2773a3d6" [[package]] name = "ryu" @@ -2144,7 +2178,7 @@ dependencies = [ "proc-macro2", "quote", "serde_derive_internals", - "syn 2.0.89", + "syn 2.0.87", ] [[package]] @@ -2170,7 +2204,7 @@ checksum = "7f81c2fde025af7e69b1d1420531c8a8811ca898919db177141a85313b1cb932" dependencies = [ "proc-macro2", "quote", - "syn 2.0.89", + "syn 2.0.87", ] [[package]] @@ -2207,22 +2241,22 @@ dependencies = [ [[package]] name = "serde" -version = "1.0.215" +version = "1.0.210" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6513c1ad0b11a9376da888e3e0baa0077f1aed55c17f50e7b2397136129fb88f" +checksum = "c8e3592472072e6e22e0a54d5904d9febf8508f65fb8552499a1abc7d1078c3a" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.215" +version = "1.0.210" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad1e866f866923f252f05c889987993144fb74e722403468a4ebd70c3cd756c0" +checksum = "243902eda00fad750862fc144cea25caca5e20d615af0a81bee94ca738f1df1f" dependencies = [ "proc-macro2", "quote", - "syn 2.0.89", + "syn 2.0.87", ] [[package]] @@ -2233,14 +2267,14 @@ checksum = "18d26a20a969b9e3fdf2fc2d9f21eda6c40e2de84c9408bb5d3b05d499aae711" dependencies = [ "proc-macro2", "quote", - "syn 2.0.89", + "syn 2.0.87", ] [[package]] name = "serde_json" -version = "1.0.133" +version = "1.0.128" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c7fceb2473b9166b2294ef05efcb65a3db80803f0b03ef86a5fc88a2b85ee377" +checksum = "6ff5456707a1de34e7e37f2a6fd3d3f808c318259cbd01ab6377795054b483d8" dependencies = [ "itoa", "memchr", @@ -2289,6 +2323,12 @@ version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" +[[package]] +name = "simd-adler32" +version = "0.3.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d66dc143e6b11c1eddc06d5c423cfc97062865baf299914ab64caa38182078fe" + [[package]] name = "similar" version = "2.5.0" @@ -2318,9 +2358,9 @@ checksum = "b7c388c1b5e93756d0c740965c41e8822f866621d41acbdf6336a6a168f8840c" [[package]] name = "snapbox" -version = "0.6.20" +version = "0.6.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1373ce406dfad473059bbc31d807715642182bbc952a811952b58d1c9e41dcfa" +checksum = "027c936207f85d10d015e21faf5c676c7e08c453ed371adf55c0874c443ca77a" dependencies = [ "anstream", "anstyle", @@ -2335,7 +2375,7 @@ dependencies = [ "tempfile", "wait-timeout", "walkdir", - "windows-sys 0.59.0", + "windows-sys 0.52.0", ] [[package]] @@ -2364,12 +2404,6 @@ version = "0.9.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67" -[[package]] -name = "stable_deref_trait" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3" - [[package]] name = "stacker" version = "0.1.15" @@ -2414,31 +2448,20 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.89" +version = "2.0.87" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44d46482f1c1c87acd84dea20c1bf5ebff4c757009ed6bf19cfd36fb10e92c4e" +checksum = "25aa4ce346d03a6dcd68dd8b4010bcb74e54e62c90c573f394c46eae99aba32d" dependencies = [ "proc-macro2", "quote", "unicode-ident", ] -[[package]] -name = "synstructure" -version = "0.13.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c8af7666ab7b6390ab78131fb5b0fce11d6b7a6951602017c35fa82800708971" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.89", -] - [[package]] name = "tar" -version = "0.4.43" +version = "0.4.42" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c65998313f8e17d0d553d28f91a0df93e4dbbbf770279c7bc21ca0f09ea1a1f6" +checksum = "4ff6c40d3aedb5e06b57c6f669ad17ab063dd1e63d977c6a88e7f4dfa4f04020" dependencies = [ "filetime", "libc", @@ -2511,7 +2534,7 @@ checksum = "08904e7672f5eb876eaaf87e0ce17857500934f4981c4a0ab2b4aa98baac7fc3" dependencies = [ "proc-macro2", "quote", - "syn 2.0.89", + "syn 2.0.87", ] [[package]] @@ -2555,15 +2578,20 @@ dependencies = [ ] [[package]] -name = "tinystr" -version = "0.7.6" +name = "tinyvec" +version = "1.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9117f5d4db391c1cf6927e7bea3db74b9a1c1add8f7eda9ffd5364f40f57b82f" +checksum = "ce6b6a2fb3a985e99cebfaefa9faa3024743da73304ca1c683a36429613d3d22" dependencies = [ - "displaydoc", - "zerovec", + "tinyvec_macros", ] +[[package]] +name = "tinyvec_macros" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" + [[package]] name = "toml" version = "0.8.15" @@ -2628,7 +2656,7 @@ checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.89", + "syn 2.0.87", ] [[package]] @@ -2685,11 +2713,10 @@ dependencies = [ [[package]] name = "trycmd" -version = "0.15.7" +version = "0.15.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "288c25d9be00f5ac52a3b3ff7720248c223096534ec34e870188f1bc93f2465c" +checksum = "3e8673f1dc45acdff8e25a06cc62f8e529563e8acd84237ce83d5a28e2befa12" dependencies = [ - "anstream", "automod", "glob", "humantime", @@ -2727,6 +2754,12 @@ dependencies = [ "version_check", ] +[[package]] +name = "unicode-bidi" +version = "0.3.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "08f95100a766bf4f8f28f90d77e0a5461bbdb219042e7679bebe79004fed8d75" + [[package]] name = "unicode-ident" version = "1.0.12" @@ -2739,6 +2772,15 @@ version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3b09c83c3c29d37506a3e260c08c03743a6bb66a9cd432c6934ab501a190571f" +[[package]] +name = "unicode-normalization" +version = "0.1.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a56d1686db2308d901306f92a263857ef59ea39678a5458e7cb17f01415101f5" +dependencies = [ + "tinyvec", +] + [[package]] name = "unicode-width" version = "0.1.13" @@ -2765,9 +2807,9 @@ checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" [[package]] name = "ureq" -version = "2.9.7" +version = "2.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d11a831e3c0b56e438a28308e7c810799e3c118417f342d30ecec080105395cd" +checksum = "b74fc6b57825be3373f7054754755f03ac3a8f5d70015ccad699ba2029956f4a" dependencies = [ "base64 0.22.1", "flate2", @@ -2776,7 +2818,6 @@ dependencies = [ "once_cell", "rustls", "rustls-pki-types", - "rustls-webpki", "serde", "serde_json", "socks", @@ -2786,9 +2827,9 @@ dependencies = [ [[package]] name = "url" -version = "2.5.4" +version = "2.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "32f8b686cadd1473f4bd0117a5d28d36b1ade384ea9b5069a1c40aefed7fda60" +checksum = "22784dbdf76fdde8af1aeda5622b546b422b6fc585325248a2bf9f5e41e94d6c" dependencies = [ "form_urlencoded", "idna", @@ -2802,18 +2843,6 @@ version = "2.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "daf8dba3b7eb870caf1ddeed7bc9d2a049f3cfdfae7cb521b087cc33ae4c49da" -[[package]] -name = "utf16_iter" -version = "1.0.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c8232dd3cdaed5356e0f716d285e4b40b932ac434100fe9b7e0e8e935b9e6246" - -[[package]] -name = "utf8_iter" -version = "1.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6c140620e7ffbb22c2dee59cafe6084a59b5ffc27a8859a5f0d494b5d52b6be" - [[package]] name = "utf8parse" version = "0.2.2" @@ -2890,15 +2919,14 @@ dependencies = [ [[package]] name = "which" -version = "5.0.0" +version = "4.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9bf3ea8596f3a0dd5980b46430f2058dfe2c36a27ccfbb1845d6fbfcd9ba6e14" +checksum = "87ba24419a2078cd2b0f2ede2691b6c66d8e47836da3b6db8265ebad47afbfc7" dependencies = [ "either", "home", "once_cell", "rustix", - "windows-sys 0.48.0", ] [[package]] @@ -2968,16 +2996,7 @@ version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" dependencies = [ - "windows-targets 0.52.6", -] - -[[package]] -name = "windows-sys" -version = "0.59.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b" -dependencies = [ - "windows-targets 0.52.6", + "windows-targets 0.52.5", ] [[package]] @@ -2997,18 +3016,18 @@ dependencies = [ [[package]] name = "windows-targets" -version = "0.52.6" +version = "0.52.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" +checksum = "6f0713a46559409d202e70e28227288446bf7841d3211583a4b53e3f6d96e7eb" dependencies = [ - "windows_aarch64_gnullvm 0.52.6", - "windows_aarch64_msvc 0.52.6", - "windows_i686_gnu 0.52.6", + "windows_aarch64_gnullvm 0.52.5", + "windows_aarch64_msvc 0.52.5", + "windows_i686_gnu 0.52.5", "windows_i686_gnullvm", - "windows_i686_msvc 0.52.6", - "windows_x86_64_gnu 0.52.6", - "windows_x86_64_gnullvm 0.52.6", - "windows_x86_64_msvc 0.52.6", + "windows_i686_msvc 0.52.5", + "windows_x86_64_gnu 0.52.5", + "windows_x86_64_gnullvm 0.52.5", + "windows_x86_64_msvc 0.52.5", ] [[package]] @@ -3019,9 +3038,9 @@ checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" [[package]] name = "windows_aarch64_gnullvm" -version = "0.52.6" +version = "0.52.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" +checksum = "7088eed71e8b8dda258ecc8bac5fb1153c5cffaf2578fc8ff5d61e23578d3263" [[package]] name = "windows_aarch64_msvc" @@ -3031,9 +3050,9 @@ checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" [[package]] name = "windows_aarch64_msvc" -version = "0.52.6" +version = "0.52.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" +checksum = "9985fd1504e250c615ca5f281c3f7a6da76213ebd5ccc9561496568a2752afb6" [[package]] name = "windows_i686_gnu" @@ -3043,15 +3062,15 @@ checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" [[package]] name = "windows_i686_gnu" -version = "0.52.6" +version = "0.52.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" +checksum = "88ba073cf16d5372720ec942a8ccbf61626074c6d4dd2e745299726ce8b89670" [[package]] name = "windows_i686_gnullvm" -version = "0.52.6" +version = "0.52.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" +checksum = "87f4261229030a858f36b459e748ae97545d6f1ec60e5e0d6a3d32e0dc232ee9" [[package]] name = "windows_i686_msvc" @@ -3061,9 +3080,9 @@ checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" [[package]] name = "windows_i686_msvc" -version = "0.52.6" +version = "0.52.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" +checksum = "db3c2bf3d13d5b658be73463284eaf12830ac9a26a90c717b7f771dfe97487bf" [[package]] name = "windows_x86_64_gnu" @@ -3073,9 +3092,9 @@ checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" [[package]] name = "windows_x86_64_gnu" -version = "0.52.6" +version = "0.52.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" +checksum = "4e4246f76bdeff09eb48875a0fd3e2af6aada79d409d33011886d3e1581517d9" [[package]] name = "windows_x86_64_gnullvm" @@ -3085,9 +3104,9 @@ checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" [[package]] name = "windows_x86_64_gnullvm" -version = "0.52.6" +version = "0.52.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" +checksum = "852298e482cd67c356ddd9570386e2862b5673c85bd5f88df9ab6802b334c596" [[package]] name = "windows_x86_64_msvc" @@ -3097,9 +3116,9 @@ checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" [[package]] name = "windows_x86_64_msvc" -version = "0.52.6" +version = "0.52.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" +checksum = "bec47e5bfd1bff0eeaf6d8b485cc1074891a197ab4225d504cb7a1ab88b02bf0" [[package]] name = "winnow" @@ -3125,18 +3144,6 @@ version = "0.0.19" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d135d17ab770252ad95e9a872d365cf3090e3be864a34ab46f48555993efc904" -[[package]] -name = "write16" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d1890f4022759daae28ed4fe62859b1236caebfc61ede2f63ed4e695f3f6d936" - -[[package]] -name = "writeable" -version = "0.5.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e9df38ee2d2c3c5948ea468a8406ff0db0b29ae1ffde1bcf20ef305bcc95c51" - [[package]] name = "xattr" version = "1.3.1" @@ -3150,9 +3157,9 @@ dependencies = [ [[package]] name = "xwin" -version = "0.5.1" +version = "0.6.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c13f18103ecd54342d0f923b33fff9ed595e5813e5af85620f1a8e7622474acb" +checksum = "ca7e4546db1514c186778f0a257d89732ed9ed75587d0953ac25be7519d9f0d1" dependencies = [ "anyhow", "bytes", @@ -3161,7 +3168,6 @@ dependencies = [ "clap", "cli-table", "crossbeam-channel", - "flate2", "indicatif", "memchr", "mimalloc", @@ -3180,7 +3186,7 @@ dependencies = [ "ureq", "versions", "walkdir", - "zip", + "zip 2.1.6", ] [[package]] @@ -3189,30 +3195,6 @@ version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cfe53a6657fd280eaa890a3bc59152892ffa3e30101319d168b781ed6529b049" -[[package]] -name = "yoke" -version = "0.7.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "120e6aef9aa629e3d4f52dc8cc43a015c7724194c97dfaf45180d2daf2b77f40" -dependencies = [ - "serde", - "stable_deref_trait", - "yoke-derive", - "zerofrom", -] - -[[package]] -name = "yoke-derive" -version = "0.7.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2380878cad4ac9aac1e2435f3eb4020e8374b5f13c296cb75b4620ff8e229154" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.89", - "synstructure", -] - [[package]] name = "zerocopy" version = "0.7.34" @@ -3230,28 +3212,7 @@ checksum = "15e934569e47891f7d9411f1a451d947a60e000ab3bd24fbb970f000387d1b3b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.89", -] - -[[package]] -name = "zerofrom" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cff3ee08c995dee1859d998dea82f7374f2826091dd9cd47def953cae446cd2e" -dependencies = [ - "zerofrom-derive", -] - -[[package]] -name = "zerofrom-derive" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "595eed982f7d355beb85837f651fa22e90b3c044842dc7f2c2842c086f295808" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.89", - "synstructure", + "syn 2.0.87", ] [[package]] @@ -3261,37 +3222,46 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ced3678a2879b30306d323f4542626697a464a97c0a07c9aebf7ebca65cd4dde" [[package]] -name = "zerovec" -version = "0.10.4" +name = "zip" +version = "0.6.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aa2b893d79df23bfb12d5461018d408ea19dfafe76c2c7ef6d4eba614f8ff079" +checksum = "760394e246e4c28189f19d488c058bf16f564016aefac5d32bb1f3b51d5e9261" dependencies = [ - "yoke", - "zerofrom", - "zerovec-derive", + "byteorder", + "bzip2", + "crc32fast", + "crossbeam-utils", + "flate2", + "time", ] [[package]] -name = "zerovec-derive" -version = "0.10.3" +name = "zip" +version = "2.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6eafa6dfb17584ea3e2bd6e76e0cc15ad7af12b09abdd1ca55961bed9b1063c6" +checksum = "40dd8c92efc296286ce1fbd16657c5dbefff44f1b4ca01cc5f517d8b7b3d3e2e" dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.89", + "arbitrary", + "crc32fast", + "crossbeam-utils", + "displaydoc", + "flate2", + "indexmap", + "memchr", + "thiserror", + "zopfli", ] [[package]] -name = "zip" -version = "0.6.6" +name = "zopfli" +version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "760394e246e4c28189f19d488c058bf16f564016aefac5d32bb1f3b51d5e9261" +checksum = "e5019f391bac5cf252e93bbcc53d039ffd62c7bfb7c150414d61369afe57e946" dependencies = [ - "byteorder", - "bzip2", + "bumpalo", "crc32fast", - "crossbeam-utils", - "flate2", - "time", + "lockfree-object-pool", + "log", + "once_cell", + "simd-adler32", ] diff --git a/Cargo.toml b/Cargo.toml index 24edb7ad5..6195ab233 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -98,7 +98,7 @@ clap_complete_command = { version = "0.6.1", optional = true } # cross compile cargo-zigbuild = { version = "0.19.3", default-features = false, optional = true } -cargo-xwin = { version = "0.16.5", default-features = false, optional = true } +cargo-xwin = { version = "0.17", default-features = false, optional = true } # log tracing = "0.1.36" @@ -122,7 +122,7 @@ ureq = { version = "2.9.4", features = [ "socks-proxy", ], default-features = false, optional = true } native-tls = { version = "0.2.8", optional = true } -rustls = { version = "0.22.4", optional = true } +rustls = { version = "0.23", optional = true } rustls-pemfile = { version = "2.1.0", optional = true } keyring = { version = "2.3.2", default-features = false, features = [ "linux-no-secret-service", From 176c85901572a3f8028df6f3dd7350c1f36fff9d Mon Sep 17 00:00:00 2001 From: messense Date: Sat, 30 Nov 2024 11:23:30 +0800 Subject: [PATCH 2/2] Upgrade more deps to reduce duplication --- Cargo.lock | 283 +++++++++++++----------------------- Cargo.toml | 22 +-- deny.toml | 1 + maturin.schema.json | 59 +++++++- src/build_context.rs | 5 +- src/build_options.rs | 27 ++-- src/compile.rs | 34 +++-- src/module_writer.rs | 5 +- src/pyproject_toml.rs | 41 +++++- tests/common/integration.rs | 6 +- tests/common/other.rs | 2 +- 11 files changed, 253 insertions(+), 232 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 2b864cb2e..eef99c77d 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -116,33 +116,6 @@ dependencies = [ "syn 2.0.87", ] -[[package]] -name = "aws-lc-rs" -version = "1.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cdd82dba44d209fddb11c190e0a94b78651f95299598e472215667417a03ff1d" -dependencies = [ - "aws-lc-sys", - "mirai-annotations", - "paste", - "zeroize", -] - -[[package]] -name = "aws-lc-sys" -version = "0.22.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df7a4168111d7eb622a31b214057b8509c0a7e1794f44c546d742330dc793972" -dependencies = [ - "bindgen", - "cc", - "cmake", - "dunce", - "fs_extra", - "libc", - "paste", -] - [[package]] name = "base64" version = "0.21.7" @@ -155,29 +128,6 @@ version = "0.22.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" -[[package]] -name = "bindgen" -version = "0.69.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "271383c67ccabffb7381723dea0672a673f292304fcb45c01cc648c7a8d58088" -dependencies = [ - "bitflags 2.5.0", - "cexpr", - "clang-sys", - "itertools", - "lazy_static", - "lazycell", - "log", - "prettyplease", - "proc-macro2", - "quote", - "regex", - "rustc-hash", - "shlex", - "syn 2.0.87", - "which 4.4.2", -] - [[package]] name = "bitflags" version = "1.3.2" @@ -308,16 +258,16 @@ dependencies = [ [[package]] name = "cargo-xwin" -version = "0.17.3" +version = "0.17.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc80ddf05acf2ff312d58830f763f07d522aa1ea56c9e7895189b920126b9197" +checksum = "177548480a9f6291a24d0183941d59c4552bb3206c888bf89caef30a1c036e03" dependencies = [ "anyhow", "cargo-config2", "cargo-options", "clap", "dirs", - "fs-err", + "fs-err 3.0.0", "indicatif", "native-tls", "paste", @@ -326,15 +276,15 @@ dependencies = [ "rustls-pemfile", "tracing-subscriber", "ureq", - "which 6.0.3", + "which", "xwin", ] [[package]] name = "cargo-zigbuild" -version = "0.19.3" +version = "0.19.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e700178b11124560cdbabc8808e938fe6d77abde036b77a4c03a191b02bac854" +checksum = "5eb13fbc2ba490ac9eb0b359cf46ba265255424c04a172f1c1772a8b9532283d" dependencies = [ "anyhow", "cargo-config2", @@ -343,7 +293,7 @@ dependencies = [ "clap", "crc", "dirs", - "fs-err", + "fs-err 3.0.0", "path-slash", "rustc_version", "rustflags", @@ -352,21 +302,21 @@ dependencies = [ "serde_json", "shlex", "target-lexicon", - "which 6.0.3", + "which", ] [[package]] name = "cargo_metadata" -version = "0.18.1" +version = "0.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d886547e41f740c616ae73108f6eb70afe6d940c7bc697cb30f13daec073037" +checksum = "afc309ed89476c8957c50fb818f56fe894db857866c3e163335faa91dc34eb85" dependencies = [ "camino", "cargo-platform", "semver", "serde", "serde_json", - "thiserror", + "thiserror 1.0.64", ] [[package]] @@ -393,20 +343,9 @@ version = "1.1.21" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "07b1695e2c7e8fc85310cde85aeaab7e3097f593c91d209d3f9df76c928100f0" dependencies = [ - "jobserver", - "libc", "shlex", ] -[[package]] -name = "cexpr" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6fac387a98bb7c37292057cffc56d62ecb629900026402633ae9160df93a8766" -dependencies = [ - "nom", -] - [[package]] name = "cfb" version = "0.10.0" @@ -444,17 +383,6 @@ dependencies = [ "stacker", ] -[[package]] -name = "clang-sys" -version = "1.8.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b023947811758c97c59bf9d1c188fd619ad4718dcaa767947df1cadb14f39f4" -dependencies = [ - "glob", - "libc", - "libloading", -] - [[package]] name = "clap" version = "4.5.7" @@ -536,15 +464,6 @@ dependencies = [ "unicode-width", ] -[[package]] -name = "cmake" -version = "0.1.51" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fb1e43aa7fd152b1f968787f7dbcdeb306d1867ff373c69955211876c053f91a" -dependencies = [ - "cc", -] - [[package]] name = "colorchoice" version = "1.0.1" @@ -717,7 +636,7 @@ checksum = "658bce805d770f407bc62102fca7c2c64ceef2fbcb2b8bd19d2765ce093980de" dependencies = [ "console", "shell-words", - "thiserror", + "thiserror 1.0.64", "zeroize", ] @@ -910,23 +829,26 @@ dependencies = [ "autocfg", ] +[[package]] +name = "fs-err" +version = "3.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8bb60e7409f34ef959985bc9d9c5ee8f5db24ee46ed9775850548021710f807f" +dependencies = [ + "autocfg", +] + [[package]] name = "fs4" version = "0.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e871a4cfa68bb224863b53149d973df1ac8d1ed2fa1d1bfc37ac1bb65dd37207" dependencies = [ - "fs-err", + "fs-err 2.11.0", "rustix", "windows-sys 0.52.0", ] -[[package]] -name = "fs_extra" -version = "1.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "42703706b716c37f96a77aea830392ad231f44c9e9a67872fa5548707e11b11c" - [[package]] name = "futures" version = "0.3.30" @@ -1206,15 +1128,6 @@ version = "1.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "49f1f14873335454500d59611f1cf4a4b0f786f9ac11f4312a78e4cf2566695b" -[[package]] -name = "jobserver" -version = "0.1.32" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "48d1dbcbbeb6a7fec7e059840aa538bd62aaccf972c7346c4d9d2059312853d0" -dependencies = [ - "libc", -] - [[package]] name = "keyring" version = "2.3.3" @@ -1231,19 +1144,13 @@ version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" -[[package]] -name = "lazycell" -version = "1.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55" - [[package]] name = "lddtree" -version = "0.3.6" +version = "0.3.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "470645aa69c87af88557f2b87e0b0894b0843a2b059b4661d892414a89c24169" +checksum = "e0779ac94bd7b6ab781fa12388dbf79ac45ec1fa433e7d25521753be8227b08e" dependencies = [ - "fs-err", + "fs-err 3.0.0", "glob", "goblin", ] @@ -1254,16 +1161,6 @@ version = "0.2.158" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d8adc4bb1803a324070e64a98ae98f38934d91957a99cfb3a43dcbc01bc56439" -[[package]] -name = "libloading" -version = "0.8.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4979f22fdb869068da03c9f7528f8297c6fd2606bc3a4affe42e6a823fdb8da4" -dependencies = [ - "cfg-if", - "windows-targets 0.52.5", -] - [[package]] name = "libmimalloc-sys" version = "0.1.38" @@ -1300,6 +1197,12 @@ version = "0.4.14" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "78b3ae25bc7c8c38cec158d1f2757ee79e9b3740fbc7ccf0e59e4b08d793fa89" +[[package]] +name = "litemap" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "643cb0b8d4fcc284004d5fd0d67ccf61dfffadb7f75e1e71bc420f4688a3a704" + [[package]] name = "lock_api" version = "0.4.12" @@ -1372,7 +1275,7 @@ dependencies = [ "expect-test", "fat-macho", "flate2", - "fs-err", + "fs-err 3.0.0", "fs4", "glob", "goblin", @@ -1410,7 +1313,7 @@ dependencies = [ "target-lexicon", "tempfile", "textwrap", - "thiserror", + "thiserror 2.0.3", "time", "toml", "toml_edit 0.22.16", @@ -1420,9 +1323,9 @@ dependencies = [ "unicode-xid", "ureq", "url", - "which 6.0.3", + "which", "wild", - "zip 0.6.6", + "zip 2.1.6", ] [[package]] @@ -1480,12 +1383,6 @@ dependencies = [ "adler2", ] -[[package]] -name = "mirai-annotations" -version = "1.12.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c9be0862c1b3f26a88803c4a49de6889c10e608b3ee9344e6ef5b45fb37ad3d1" - [[package]] name = "msi" version = "0.8.0" @@ -1706,7 +1603,7 @@ dependencies = [ "pep440_rs", "regex", "serde", - "thiserror", + "thiserror 1.0.64", "tracing", "unicode-width", "url", @@ -1781,16 +1678,6 @@ dependencies = [ "yansi", ] -[[package]] -name = "prettyplease" -version = "0.2.25" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "64d1ec885c64d0457d564db4ec299b2dae3f9c02808b8ad9c3a089c591b18033" -dependencies = [ - "proc-macro2", - "syn 2.0.87", -] - [[package]] name = "proc-macro-crate" version = "3.1.0" @@ -1838,11 +1725,11 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ba3f3f0d552c7efdde2b6898bf21b49c4e76b3e6071ff196dfe52109804db896" dependencies = [ "flate2", - "fs-err", + "fs-err 2.11.0", "mailparse", "rfc2047-decoder", "tar", - "thiserror", + "thiserror 1.0.64", "zip 0.6.6", ] @@ -1937,7 +1824,7 @@ checksum = "bd283d9651eeda4b2a83a43c1c91b266c40fd76ecd39a50a8c630ae69dc72891" dependencies = [ "getrandom", "libredox", - "thiserror", + "thiserror 1.0.64", ] [[package]] @@ -2001,7 +1888,7 @@ dependencies = [ "chumsky", "memchr", "quoted_printable", - "thiserror", + "thiserror 1.0.64", ] [[package]] @@ -2049,12 +1936,6 @@ dependencies = [ "unicode-ident", ] -[[package]] -name = "rustc-hash" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" - [[package]] name = "rustc_version" version = "0.4.1" @@ -2085,11 +1966,10 @@ dependencies = [ [[package]] name = "rustls" -version = "0.23.13" +version = "0.23.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f2dabaac7466917e566adb06783a81ca48944c6898a1b08b9374106dd671f4c8" +checksum = "934b404430bb06b3fae2cba809eb45a1ab1aecd64491213d7c3301b88393f8d1" dependencies = [ - "aws-lc-rs", "log", "once_cell", "ring", @@ -2111,9 +1991,9 @@ dependencies = [ [[package]] name = "rustls-pki-types" -version = "1.7.0" +version = "1.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "976295e77ce332211c0d24d92c0e83e50f5c5f046d11082cea19f3df13a3562d" +checksum = "16f1201b3c9a7ee8039bcadc17b7e605e2945b27eee7631788c1bd2b0643674b" [[package]] name = "rustls-webpki" @@ -2121,7 +2001,6 @@ version = "0.102.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "64ca1bc8749bd4cf37b5ce386cc146580777b4e8572c7b97baf22c83f444bee9" dependencies = [ - "aws-lc-rs", "ring", "rustls-pki-types", "untrusted", @@ -2404,6 +2283,12 @@ version = "0.9.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67" +[[package]] +name = "stable_deref_trait" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3" + [[package]] name = "stacker" version = "0.1.15" @@ -2523,7 +2408,16 @@ version = "1.0.64" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d50af8abc119fb8bb6dbabcfa89656f46f84aa0ac7688088608076ad2b459a84" dependencies = [ - "thiserror-impl", + "thiserror-impl 1.0.64", +] + +[[package]] +name = "thiserror" +version = "2.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c006c85c7651b3cf2ada4584faa36773bd07bac24acfb39f3c431b36d7e667aa" +dependencies = [ + "thiserror-impl 2.0.3", ] [[package]] @@ -2537,6 +2431,17 @@ dependencies = [ "syn 2.0.87", ] +[[package]] +name = "thiserror-impl" +version = "2.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f077553d607adc1caf65430528a576c757a71ed73944b66ebb58ef2bbd243568" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.87", +] + [[package]] name = "thread_local" version = "1.1.8" @@ -2807,12 +2712,13 @@ checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" [[package]] name = "ureq" -version = "2.10.1" +version = "2.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b74fc6b57825be3373f7054754755f03ac3a8f5d70015ccad699ba2029956f4a" +checksum = "b30e6f97efe1fa43535ee241ee76967d3ff6ff3953ebb430d8d55c5393029e7b" dependencies = [ "base64 0.22.1", "flate2", + "litemap", "log", "native-tls", "once_cell", @@ -2823,6 +2729,8 @@ dependencies = [ "socks", "url", "webpki-roots", + "yoke", + "zerofrom", ] [[package]] @@ -2919,21 +2827,9 @@ dependencies = [ [[package]] name = "which" -version = "4.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87ba24419a2078cd2b0f2ede2691b6c66d8e47836da3b6db8265ebad47afbfc7" -dependencies = [ - "either", - "home", - "once_cell", - "rustix", -] - -[[package]] -name = "which" -version = "6.0.3" +version = "7.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4ee928febd44d98f2f459a4a79bd4d928591333a494a10a868418ac1b39cf1f" +checksum = "c9cad3279ade7346b96e38731a641d7343dd6a53d55083dd54eadfa5a1b38c6b" dependencies = [ "either", "home", @@ -3195,6 +3091,17 @@ version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cfe53a6657fd280eaa890a3bc59152892ffa3e30101319d168b781ed6529b049" +[[package]] +name = "yoke" +version = "0.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c5b1314b079b0930c31e3af543d8ee1757b1951ae1e1565ec704403a7240ca5" +dependencies = [ + "serde", + "stable_deref_trait", + "zerofrom", +] + [[package]] name = "zerocopy" version = "0.7.34" @@ -3215,6 +3122,12 @@ dependencies = [ "syn 2.0.87", ] +[[package]] +name = "zerofrom" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "91ec111ce797d0e0784a1116d0ddcdbea84322cd79e5d5ad173daeba4f93ab55" + [[package]] name = "zeroize" version = "1.8.1" @@ -3228,11 +3141,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "760394e246e4c28189f19d488c058bf16f564016aefac5d32bb1f3b51d5e9261" dependencies = [ "byteorder", - "bzip2", "crc32fast", "crossbeam-utils", "flate2", - "time", ] [[package]] @@ -3242,13 +3153,15 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "40dd8c92efc296286ce1fbd16657c5dbefff44f1b4ca01cc5f517d8b7b3d3e2e" dependencies = [ "arbitrary", + "bzip2", "crc32fast", "crossbeam-utils", "displaydoc", "flate2", "indexmap", "memchr", - "thiserror", + "thiserror 1.0.64", + "time", "zopfli", ] diff --git a/Cargo.toml b/Cargo.toml index 6195ab233..fa51b4962 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -43,7 +43,7 @@ anyhow = "1.0.80" base64 = "0.21.0" glob = "0.3.0" cargo-config2 = "0.1.24" -cargo_metadata = "0.18.0" +cargo_metadata = "0.19.0" cargo-options = "0.7.2" cbindgen = { version = "0.27.0", default-features = false } flate2 = "1.0.18" @@ -57,13 +57,13 @@ tar = "0.4.38" tempfile = "3.2.0" toml = "0.8.10" toml_edit = "0.22.6" -zip = { version = "0.6.1", default-features = false, features = [ +zip = { version = "2.0.0", default-features = false, features = [ "bzip2", "deflate", "time", ] } -thiserror = "1.0.37" -fs-err = "2.11.0" +thiserror = "2.0.3" +fs-err = "3.0.0" fat-macho = { version = "0.4.8", default-features = false } once_cell = "1.7.2" rustc_version = "0.4.0" @@ -75,7 +75,7 @@ python-pkginfo = "0.6.0" textwrap = "0.16.1" ignore = "0.4.20" itertools = "0.12.1" -lddtree = "0.3.4" +lddtree = "0.3.7" cc = "1.0.88" dunce = "1.0.2" normpath = "1.1.1" @@ -97,8 +97,8 @@ clap = { version = "4.0.0", features = [ clap_complete_command = { version = "0.6.1", optional = true } # cross compile -cargo-zigbuild = { version = "0.19.3", default-features = false, optional = true } -cargo-xwin = { version = "0.17", default-features = false, optional = true } +cargo-zigbuild = { version = "0.19.5", default-features = false, optional = true } +cargo-xwin = { version = "0.17.4", default-features = false, optional = true } # log tracing = "0.1.36" @@ -122,7 +122,11 @@ ureq = { version = "2.9.4", features = [ "socks-proxy", ], default-features = false, optional = true } native-tls = { version = "0.2.8", optional = true } -rustls = { version = "0.23", optional = true } +rustls = { version = "0.23", default-features = false, features = [ + "logging", + "std", + "tls12", +], optional = true } rustls-pemfile = { version = "2.1.0", optional = true } keyring = { version = "2.3.2", default-features = false, features = [ "linux-no-secret-service", @@ -142,7 +146,7 @@ rstest = "0.22.0" rustversion = "1.0.9" time = { version = "0.3.34", features = ["macros"] } trycmd = "0.15.0" -which = "6.0.0" +which = "7.0.0" [features] default = ["full", "rustls"] diff --git a/deny.toml b/deny.toml index aa0847056..ae56e270c 100644 --- a/deny.toml +++ b/deny.toml @@ -105,6 +105,7 @@ allow = [ "BSD-3-Clause", "CC0-1.0", "Unicode-3.0", + "BSL-1.0", ] # The confidence threshold for detecting a license from license text. # The higher the value, the more closely the license text must be to the diff --git a/maturin.schema.json b/maturin.schema.json index 0af4b8173..0f1360095 100644 --- a/maturin.schema.json +++ b/maturin.schema.json @@ -231,6 +231,53 @@ } ] }, + "CargoCrateType": { + "description": "Supported cargo crate types", + "oneOf": [ + { + "description": "Binary executable target", + "type": "string", + "enum": [ + "bin" + ] + }, + { + "description": "Dynamic system library target", + "type": "string", + "enum": [ + "cdylib" + ] + }, + { + "description": "Dynamic Rust library target", + "type": "string", + "enum": [ + "dylib" + ] + }, + { + "description": "Rust library", + "type": "string", + "enum": [ + "lib" + ] + }, + { + "description": "Rust library for use as an intermediate target", + "type": "string", + "enum": [ + "rlib" + ] + }, + { + "description": "Static library", + "type": "string", + "enum": [ + "staticlib" + ] + } + ] + }, "CargoTarget": { "description": "Cargo compile target", "type": "object", @@ -239,10 +286,14 @@ ], "properties": { "kind": { - "description": "Kind of target (\"bin\", \"lib\")", - "type": [ - "string", - "null" + "description": "Kind of target (\"bin\", \"cdylib\")", + "anyOf": [ + { + "$ref": "#/definitions/CargoCrateType" + }, + { + "type": "null" + } ] }, "name": { diff --git a/src/build_context.rs b/src/build_context.rs index a7a5b9b95..409eed016 100644 --- a/src/build_context.rs +++ b/src/build_context.rs @@ -14,6 +14,7 @@ use crate::{ PythonInterpreter, Target, }; use anyhow::{anyhow, bail, Context, Result}; +use cargo_metadata::CrateType; use cargo_metadata::Metadata; use fs_err as fs; use ignore::overrides::{Override, OverrideBuilder}; @@ -841,7 +842,7 @@ impl BuildContext { let artifacts = artifacts.first().context(error_msg)?; let mut artifact = artifacts - .get("cdylib") + .get(&CrateType::CDyLib) .cloned() .ok_or_else(|| anyhow!(error_msg,))?; @@ -1089,7 +1090,7 @@ impl BuildContext { let mut artifact_paths = Vec::with_capacity(artifacts.len()); for artifact in artifacts { let artifact = artifact - .get("bin") + .get(&CrateType::Bin) .cloned() .ok_or_else(|| anyhow!("Cargo didn't build a binary"))?; diff --git a/src/build_options.rs b/src/build_options.rs index 4b8ea0bed..f8c98ca1f 100644 --- a/src/build_options.rs +++ b/src/build_options.rs @@ -7,6 +7,7 @@ use crate::pyproject_toml::ToolMaturin; use crate::python_interpreter::{InterpreterConfig, InterpreterKind, MINIMUM_PYTHON_MINOR}; use crate::{BuildContext, PythonInterpreter, Target}; use anyhow::{bail, format_err, Context, Result}; +use cargo_metadata::{CrateType, TargetKind}; use cargo_metadata::{Metadata, Node}; use cargo_options::heading; use pep440_rs::VersionSpecifiers; @@ -884,7 +885,7 @@ fn filter_cargo_targets( .all(|f| resolved_features.contains(f)) } } - _ => target.kind.contains(&"cdylib".to_string()), + _ => target.crate_types.contains(&CrateType::CDyLib), }) .map(|target| CompileTarget { target: target.clone(), @@ -896,9 +897,9 @@ fn filter_cargo_targets( // Let's try compile one of the target with `--crate-type cdylib` let lib_target = root_pkg.targets.iter().find(|target| { target - .kind + .crate_types .iter() - .any(|k| LIB_CRATE_TYPES.contains(&k.as_str())) + .any(|crate_type| LIB_CRATE_TYPES.contains(crate_type)) }); if let Some(target) = lib_target { targets.push(CompileTarget { @@ -914,7 +915,7 @@ fn filter_cargo_targets( config_targets.iter().any(|config_target| { let name_eq = config_target.name == target.name; match &config_target.kind { - Some(kind) => name_eq && target.kind.contains(kind), + Some(kind) => name_eq && target.crate_types.contains(&CrateType::from(*kind)), None => name_eq, } }) @@ -1066,11 +1067,17 @@ pub fn find_bridge(cargo_metadata: &Metadata, bridge: Option<&str>) -> Result
) -> Result
) -> Result
, targets: &[CompileTarget], -) -> Result>> { +) -> Result>> { if context.universal2 { compile_universal2(context, python_interpreter, targets) } else { @@ -61,7 +67,7 @@ fn compile_universal2( context: &BuildContext, python_interpreter: Option<&PythonInterpreter>, targets: &[CompileTarget], -) -> Result>> { +) -> Result>> { let mut aarch64_context = context.clone(); aarch64_context.target = Target::from_target_triple(Some("aarch64-apple-darwin".to_string()))?; @@ -80,12 +86,12 @@ fn compile_universal2( .zip(aarch64_artifacts.iter().zip(&x86_64_artifacts)) { let build_type = if bridge_model.is_bin() { - "bin" + CrateType::Bin } else { - "cdylib" + CrateType::CDyLib }; - let aarch64_artifact = aarch64_artifact.get(build_type).cloned().ok_or_else(|| { - if build_type == "cdylib" { + let aarch64_artifact = aarch64_artifact.get(&build_type).cloned().ok_or_else(|| { + if build_type == CrateType::CDyLib { anyhow!( "Cargo didn't build an aarch64 cdylib. Did you miss crate-type = [\"cdylib\"] \ in the lib section of your Cargo.toml?", @@ -94,8 +100,8 @@ fn compile_universal2( anyhow!("Cargo didn't build an aarch64 bin.") } })?; - let x86_64_artifact = x86_64_artifact.get(build_type).cloned().ok_or_else(|| { - if build_type == "cdylib" { + let x86_64_artifact = x86_64_artifact.get(&build_type).cloned().ok_or_else(|| { + if build_type == CrateType::CDyLib { anyhow!( "Cargo didn't build a x86_64 cdylib. Did you miss crate-type = [\"cdylib\"] \ in the lib section of your Cargo.toml?", @@ -128,7 +134,7 @@ fn compile_universal2( path: PathBuf::from(output_path), ..x86_64_artifact }; - result.insert(build_type.to_string(), universal_artifact); + result.insert(build_type, universal_artifact); universal_artifacts.push(result); } Ok(universal_artifacts) @@ -138,7 +144,7 @@ fn compile_targets( context: &BuildContext, python_interpreter: Option<&PythonInterpreter>, targets: &[CompileTarget], -) -> Result>> { +) -> Result>> { let mut artifacts = Vec::with_capacity(targets.len()); for target in targets { let build_command = cargo_build_command(context, python_interpreter, target)?; @@ -165,9 +171,9 @@ fn cargo_build_command( // Add `--crate-type cdylib` if available if compile_target .target - .kind + .crate_types .iter() - .any(|k| LIB_CRATE_TYPES.contains(&k.as_str())) + .any(|crate_type| LIB_CRATE_TYPES.contains(crate_type)) { // `--crate-type` is stable since Rust 1.64.0 // See https://github.com/rust-lang/cargo/pull/10838 @@ -461,7 +467,7 @@ fn cargo_build_command( fn compile_target( context: &BuildContext, mut build_command: Command, -) -> Result> { +) -> Result> { debug!("Running {:?}", build_command); let using_cross = build_command diff --git a/src/module_writer.rs b/src/module_writer.rs index 003434e8a..04103c0e9 100644 --- a/src/module_writer.rs +++ b/src/module_writer.rs @@ -270,7 +270,7 @@ impl ModuleWriter for WheelWriter { zip::CompressionMethod::Deflated }; - let mut options = zip::write::FileOptions::default() + let mut options = zip::write::SimpleFileOptions::default() .unix_permissions(permissions) .compression_method(compression_method); let mtime = self.mtime().ok(); @@ -379,7 +379,8 @@ impl WheelWriter { zip::CompressionMethod::Deflated }; - let mut options = zip::write::FileOptions::default().compression_method(compression_method); + let mut options = + zip::write::SimpleFileOptions::default().compression_method(compression_method); let mtime = self.mtime().ok(); if let Some(mtime) = mtime { options = options.last_modified_time(mtime); diff --git a/src/pyproject_toml.rs b/src/pyproject_toml.rs index 8728a27f4..f338b03ed 100644 --- a/src/pyproject_toml.rs +++ b/src/pyproject_toml.rs @@ -97,13 +97,50 @@ impl GlobPattern { pub struct CargoTarget { /// Name as given in the `Cargo.toml` or generated from the file name pub name: String, - /// Kind of target ("bin", "lib") - pub kind: Option, + /// Kind of target ("bin", "cdylib") + pub kind: Option, // TODO: Add bindings option // Bridge model, which kind of bindings to use // pub bindings: Option, } +/// Supported cargo crate types +#[derive(Serialize, Deserialize, Debug, Clone, Copy)] +#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] +pub enum CargoCrateType { + /// Binary executable target + #[serde(rename = "bin")] + Bin, + /// Dynamic system library target + #[serde(rename = "cdylib")] + CDyLib, + /// Dynamic Rust library target + #[serde(rename = "dylib")] + DyLib, + /// Rust library + #[serde(rename = "lib")] + Lib, + /// Rust library for use as an intermediate target + #[serde(rename = "rlib")] + RLib, + /// Static library + #[serde(rename = "staticlib")] + StaticLib, +} + +impl From for cargo_metadata::CrateType { + fn from(value: CargoCrateType) -> Self { + match value { + CargoCrateType::Bin => cargo_metadata::CrateType::Bin, + CargoCrateType::CDyLib => cargo_metadata::CrateType::CDyLib, + CargoCrateType::DyLib => cargo_metadata::CrateType::DyLib, + CargoCrateType::Lib => cargo_metadata::CrateType::Lib, + CargoCrateType::RLib => cargo_metadata::CrateType::RLib, + CargoCrateType::StaticLib => cargo_metadata::CrateType::StaticLib, + } + } +} + /// Target configuration #[derive(Serialize, Deserialize, Debug, Clone)] #[serde(rename_all = "kebab-case")] diff --git a/tests/common/integration.rs b/tests/common/integration.rs index 84e1f5dc4..47c1f97be 100644 --- a/tests/common/integration.rs +++ b/tests/common/integration.rs @@ -5,7 +5,7 @@ use anyhow::{bail, Context, Result}; #[cfg(feature = "zig")] use cargo_zigbuild::Zig; use clap::Parser; -use fs4::fs_err::FileExt; +use fs4::fs_std::FileExt; use fs_err::File; use maturin::{BuildOptions, PlatformTag, PythonInterpreter, Target}; use normpath::PathExt; @@ -90,7 +90,7 @@ pub fn test_integration( // All tests try to use this venv at the same time, so we need to make sure only one // modifies it at a time and that during that time, no other test reads it. let file = File::create(venvs_dir.join("cffi-provider.lock"))?; - file.lock_exclusive()?; + file.file().lock_exclusive()?; let python = if !cffi_venv.is_dir() { create_named_virtualenv(cffi_provider, python_interp.clone().map(PathBuf::from))?; let target_triple = Target::from_target_triple(None)?; @@ -123,7 +123,7 @@ pub fn test_integration( let target_triple = Target::from_target_triple(None)?; target_triple.get_venv_python(&cffi_venv) }; - file.unlock()?; + file.file().unlock()?; cli.push("--interpreter".into()); cli.push(python.as_os_str().to_owned()); } diff --git a/tests/common/other.rs b/tests/common/other.rs index 4448885d4..b7a51beb4 100644 --- a/tests/common/other.rs +++ b/tests/common/other.rs @@ -248,7 +248,7 @@ pub fn check_wheel_mtimes( let mut mtimes = BTreeSet::::new(); for idx in 0..wheel.len() { - let mtime = wheel.by_index(idx)?.last_modified().to_time()?; + let mtime = wheel.by_index(idx)?.last_modified().unwrap().try_into()?; mtimes.insert(mtime); }