diff --git a/CHANGELOG.md b/CHANGELOG.md index cb9892f..cacabf9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [Unreleased] +### Breaking +- Updated to Rust 2024 edition +- Updated all dependencies to latest versions +- cargo-pio: Migrated from structopt to clap 4 derive API + ## [0.33.1] - 2025-07-27 - Fix a bug where the cmake utilities refused to work with CMake 4 due to a broken version check diff --git a/Cargo.lock b/Cargo.lock index dee408b..cd7421c 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1,27 +1,27 @@ # This file is automatically @generated by Cargo. # It is not intended for manual editing. -version = 3 +version = 4 [[package]] name = "addr2line" -version = "0.24.2" +version = "0.25.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dfbe277e56a376000877090da837660b4427aad530e3028d44e0bffe4f89a1c1" +checksum = "1b5d307320b3181d6d7954e663bd7c774a838b8220fe0593c86d9fb09f498b4b" dependencies = [ "gimli", ] [[package]] name = "adler2" -version = "2.0.0" +version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "512761e0bb2578dd7380c6baaa0f4ce03e84f95e960231d1dec8bf4d7d6e2627" +checksum = "320119579fcad9c21884f5c4861d16174d0e06250625266f50fe6898340abefa" [[package]] name = "aho-corasick" -version = "1.1.3" +version = "1.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e60d3430d3a69478ad0993f19238d2df97c507009a52b3c10addcd7f6bcb916" +checksum = "ddd31a130427c27518df266943a5308ed92d4b226cc639f5a8f1002816174301" dependencies = [ "memchr", ] @@ -36,19 +36,60 @@ dependencies = [ ] [[package]] -name = "ansi_term" -version = "0.12.1" +name = "anstream" +version = "0.6.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d52a9bb7ec0cf484c551830a7ce27bd20d67eac647e1befb56b0be4ee39a55d2" +checksum = "43d5b281e737544384e969a5ccad3f1cdd24b48086a0fc1b2a5262a26b8f4f4a" dependencies = [ - "winapi", + "anstyle", + "anstyle-parse", + "anstyle-query", + "anstyle-wincon", + "colorchoice", + "is_terminal_polyfill", + "utf8parse", +] + +[[package]] +name = "anstyle" +version = "1.0.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5192cca8006f1fd4f7237516f40fa183bb07f8fbdfedaa0036de5ea9b0b45e78" + +[[package]] +name = "anstyle-parse" +version = "0.2.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4e7644824f0aa2c7b9384579234ef10eb7efb6a0deb83f9630a49594dd9c15c2" +dependencies = [ + "utf8parse", +] + +[[package]] +name = "anstyle-query" +version = "1.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "40c48f72fd53cd289104fc64099abca73db4166ad86ea0b4341abe65af83dadc" +dependencies = [ + "windows-sys 0.61.2", +] + +[[package]] +name = "anstyle-wincon" +version = "3.0.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "291e6a250ff86cd4a820112fb8898808a366d8f9f58ce16d1f538353ad55747d" +dependencies = [ + "anstyle", + "once_cell_polyfill", + "windows-sys 0.61.2", ] [[package]] name = "anyhow" -version = "1.0.95" +version = "1.0.100" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34ac096ce696dc2fcabef30516bb13c0a68a11d30131d3df6f04711467681b04" +checksum = "a23eb6b1614318a8071c9b2521f36b424b2c83db5eb3a0fead4a6c0809af6e61" dependencies = [ "backtrace", ] @@ -62,22 +103,11 @@ dependencies = [ "stable_deref_trait", ] -[[package]] -name = "atty" -version = "0.2.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8" -dependencies = [ - "hermit-abi", - "libc", - "winapi", -] - [[package]] name = "backtrace" -version = "0.3.74" +version = "0.3.76" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8d82cb332cdfaed17ae235a638438ac4d4839913cc2af585c3c6746e8f8bee1a" +checksum = "bb531853791a215d7c62a30daf0dde835f381ab5de4589cfe7c649d2cbe92bd6" dependencies = [ "addr2line", "cfg-if", @@ -85,7 +115,7 @@ dependencies = [ "miniz_oxide", "object", "rustc-demangle", - "windows-targets", + "windows-link", ] [[package]] @@ -96,11 +126,11 @@ checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" [[package]] name = "bindgen" -version = "0.71.1" +version = "0.72.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f58bf3d7db68cfbac37cfc485a8d711e87e064c3d0fe0435b92f7a407f9d6b3" +checksum = "993776b509cfb49c750f11b8f07a46fa23e0a1386ffc01fb1e7d343efc387895" dependencies = [ - "bitflags 2.6.0", + "bitflags", "cexpr", "clang-sys", "itertools", @@ -111,48 +141,48 @@ dependencies = [ "regex", "rustc-hash", "shlex", - "syn 2.0.93", + "syn", ] [[package]] name = "bitflags" -version = "1.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" - -[[package]] -name = "bitflags" -version = "2.6.0" +version = "2.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b048fb63fd8b5923fc5aa7b340d8e156aec7ec02f0c78fa8a6ddc2613f6f71de" +checksum = "812e12b5285cc515a9c72a5c1d3b6d46a19dac5acfef5265968c166106e31dd3" [[package]] name = "bstr" -version = "1.11.1" +version = "1.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "786a307d683a5bf92e6fd5fd69a7eb613751668d1d8d67d802846dfe367c62c8" +checksum = "63044e1ae8e69f3b5a92c736ca6269b8d12fa7efe39bf34ddb06d102cf0e2cab" dependencies = [ "memchr", "serde", ] +[[package]] +name = "bytes" +version = "1.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b35204fbdc0b3f4446b89fc1ac2cf84a8a68971995d0bf2e925ec7cd960f9cb3" + [[package]] name = "cargo-pio" version = "0.26.0" dependencies = [ "anyhow", + "clap", "embuild", "env_logger", "log", - "structopt", "tempfile", ] [[package]] name = "cargo_toml" -version = "0.15.3" +version = "0.22.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "599aa35200ffff8f04c1925aa1acc92fa2e08874379ef42e210a80e527e60838" +checksum = "374b7c592d9c00c1f4972ea58390ac6b18cbb6ab79011f3bdc90a0b82ca06b77" dependencies = [ "serde", "toml", @@ -160,10 +190,11 @@ dependencies = [ [[package]] name = "cc" -version = "1.2.6" +version = "1.2.46" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8d6dbb628b8f8555f86d0323c2eb39e3ec81901f4b83e091db8a6a76d316a333" +checksum = "b97463e1064cb1b1c1384ad0a0b9c8abd0988e2a91f52606c80ef14aadb63e36" dependencies = [ + "find-msvc-tools", "shlex", ] @@ -178,9 +209,9 @@ dependencies = [ [[package]] name = "cfg-if" -version = "1.0.0" +version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" +checksum = "9330f8b2ff13f34540b44e946ef35111825727b38d33286ef986142615121801" [[package]] name = "cfg_aliases" @@ -201,33 +232,64 @@ dependencies = [ [[package]] name = "clap" -version = "2.34.0" +version = "4.5.51" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a0610544180c38b88101fecf2dd634b174a62eef6946f84dfc6a7127512b381c" +checksum = "4c26d721170e0295f191a69bd9a1f93efcdb0aff38684b61ab5750468972e5f5" dependencies = [ - "ansi_term", - "atty", - "bitflags 1.3.2", + "clap_builder", + "clap_derive", +] + +[[package]] +name = "clap_builder" +version = "4.5.51" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "75835f0c7bf681bfd05abe44e965760fea999a5286c6eb2d59883634fd02011a" +dependencies = [ + "anstream", + "anstyle", + "clap_lex", "strsim", - "textwrap", - "unicode-width", - "vec_map", ] +[[package]] +name = "clap_derive" +version = "4.5.49" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2a0b5487afeab2deb2ff4e03a807ad1a03ac532ff5a2cee5d86884440c7f7671" +dependencies = [ + "heck", + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "clap_lex" +version = "0.7.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a1d728cc89cf3aee9ff92b05e62b19ee65a02b5702cff7d5a377e32c6ae29d8d" + [[package]] name = "cmake" -version = "0.1.52" +version = "0.1.54" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c682c223677e0e5b6b7f63a64b9351844c3f1b1678a68b7ee617e30fb082620e" +checksum = "e7caa3f9de89ddbe2c607f4101924c5abec803763ae9534e4f4d7d8f84aa81f0" dependencies = [ "cc", ] +[[package]] +name = "colorchoice" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b05b61dc5112cbb17e4b6cd61790d9845d13888356391624cbe7e41efeac1e75" + [[package]] name = "crc32fast" -version = "1.4.2" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a97769d94ddab943e4510d138150169a2758b5ef3eb191a9ee688de3e23ef7b3" +checksum = "9481c1c90cbf2ac953f07c8d4a58aa3945c425b7185c9154d67a65e4230da511" dependencies = [ "cfg-if", ] @@ -266,22 +328,11 @@ dependencies = [ "cfg-if", ] -[[package]] -name = "displaydoc" -version = "0.2.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.93", -] - [[package]] name = "either" -version = "1.13.0" +version = "1.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "60b1af1c220855b6ceac025d3f6ecdd2b7c4894bfe9cd9bda4fbb4bc7c0d4cf0" +checksum = "48c757948c5ede0e46177b7add2e67155f70e33c07fea8284df6576da70b3719" [[package]] name = "embuild" @@ -289,7 +340,7 @@ version = "0.33.1" dependencies = [ "anyhow", "bindgen", - "bitflags 1.3.2", + "bitflags", "cargo_toml", "cmake", "filetime", @@ -311,32 +362,48 @@ dependencies = [ ] [[package]] -name = "env_logger" -version = "0.9.3" +name = "env_filter" +version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a12e6657c4c97ebab115a42dcee77225f7f482cdd841cf7088c657a42e9e00e7" +checksum = "1bf3c259d255ca70051b30e2e95b5446cdb8949ac4cd22c0d7fd634d89f568e2" dependencies = [ - "atty", - "humantime", "log", "regex", - "termcolor", +] + +[[package]] +name = "env_home" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c7f84e12ccf0a7ddc17a6c41c93326024c42920d7ee630d04950e6926645c0fe" + +[[package]] +name = "env_logger" +version = "0.11.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "13c863f0904021b108aa8b2f55046443e6b1ebde8fd4a15c399893aae4fa069f" +dependencies = [ + "anstream", + "anstyle", + "env_filter", + "jiff", + "log", ] [[package]] name = "equivalent" -version = "1.0.1" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" +checksum = "877a4ace8713b0bcf2a4e7eec82529c029f1d0619886d18145fea96c3ffe5c0f" [[package]] name = "errno" -version = "0.3.10" +version = "0.3.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "33d852cb9b869c2a9b3df2f71a3074817f01e1844f839a144f5fcef059a4eb5d" +checksum = "39cab71617ae0d63f51a36d69f866391735b51691dbda63cf6f96d042b63efeb" dependencies = [ "libc", - "windows-sys 0.59.0", + "windows-sys 0.61.2", ] [[package]] @@ -347,34 +414,37 @@ checksum = "37909eebbb50d72f9059c3b6d82c0463f2ff062c9e95845c43a6c9c0355411be" [[package]] name = "filetime" -version = "0.2.25" +version = "0.2.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "35c0522e981e68cbfa8c3f978441a5f34b30b96e146b33cd3359176b50fe8586" +checksum = "bc0505cd1b6fa6580283f6bdf70a73fcf4aba1184038c90902b92b3dd0df63ed" dependencies = [ "cfg-if", "libc", "libredox", - "windows-sys 0.59.0", + "windows-sys 0.60.2", ] +[[package]] +name = "find-msvc-tools" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3a3076410a55c90011c298b04d0cfa770b00fa04e1e3c97d3f6c9de105a03844" + [[package]] name = "flate2" -version = "1.0.35" +version = "1.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c936bfdafb507ebbf50b8074c54fa31c5be9a1e7e5f467dd659697041407d07c" +checksum = "bfe33edd8e85a12a67454e37f8c75e730830d83e313556ab9ebf9ee7fbeb3bfb" dependencies = [ "crc32fast", "miniz_oxide", ] [[package]] -name = "form_urlencoded" -version = "1.2.1" +name = "fnv" +version = "1.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e13624c2627564efccf4934284bdd98cbaa14e79b0b5a141218e507b3a823456" -dependencies = [ - "percent-encoding", -] +checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" [[package]] name = "fs_at" @@ -392,32 +462,44 @@ dependencies = [ [[package]] name = "getrandom" -version = "0.2.15" +version = "0.2.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4567c8db10ae91089c99af84c68c38da3ec2f087c3f82960bcdbf3656b6f4d7" +checksum = "335ff9f135e4384c8150d6f27c6daed433577f86b4750418338c01a1a2528592" dependencies = [ "cfg-if", "libc", "wasi", ] +[[package]] +name = "getrandom" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "899def5c37c4fd7b2664648c28120ecec138e4d395b459e5ca34f9cce2dd77fd" +dependencies = [ + "cfg-if", + "libc", + "r-efi", + "wasip2", +] + [[package]] name = "gimli" -version = "0.31.1" +version = "0.32.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "07e28edb80900c19c28f1072f2e8aeca7fa06b23cd4169cefe1af5aa3260783f" +checksum = "e629b9b98ef3dd8afe6ca2bd0f89306cec16d43d907889945bc5d6687f2f13c7" [[package]] name = "glob" -version = "0.3.2" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a8d1add55171497b4705a648c6b583acafb01d58050a51727785f0b2c8e0a2b2" +checksum = "0cc23270f6e1808e30a928bdc84dea0b9b4136a8bc82338574f23baf47bbd280" [[package]] name = "globset" -version = "0.4.15" +version = "0.4.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "15f1ce686646e7f1e19bf7d5533fe443a45dbfb990e00629110797578b42fb19" +checksum = "52dfc19153a48bde0cbd630453615c8151bce3a5adfac7a0aebfbf0a1e1f57e3" dependencies = [ "aho-corasick", "bstr", @@ -428,204 +510,58 @@ dependencies = [ [[package]] name = "globwalk" -version = "0.8.1" +version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "93e3af942408868f6934a7b85134a3230832b9977cf66125df2f9edcfce4ddcc" +checksum = "0bf760ebf69878d9fd8f110c89703d90ce35095324d1f1edcb595c63945ee757" dependencies = [ - "bitflags 1.3.2", + "bitflags", "ignore", "walkdir", ] [[package]] name = "hashbrown" -version = "0.15.2" +version = "0.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf151400ff0baff5465007dd2f3e717f3fe502074ca563069ce3a6629d07b289" +checksum = "5419bdc4f6a9207fbeba6d11b604d481addf78ecd10c11ad51e76c2f6482748d" [[package]] name = "heck" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d621efb26863f0e9924c6ac577e8275e5e6b77455db64ffa6c65c904e9e132c" -dependencies = [ - "unicode-segmentation", -] - -[[package]] -name = "heck" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" - -[[package]] -name = "hermit-abi" -version = "0.1.19" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62b467343b94ba476dcb2500d242dadbb39557df889310ac77c5d99100aaac33" -dependencies = [ - "libc", -] +checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" [[package]] name = "home" -version = "0.5.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "589533453244b0995c858700322199b2becb13b627df2851f64a2775d024abcf" -dependencies = [ - "windows-sys 0.59.0", -] - -[[package]] -name = "humantime" -version = "2.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4" - -[[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" +version = "0.5.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "19ce3e0da2ec68599d193c93d088142efd7f9c5d6fc9b803774855747dc6a84f" +checksum = "cc627f471c528ff0c4a49e1d5e60450c8f6461dd6d10ba9dcd3a61d3dff7728d" dependencies = [ - "displaydoc", - "icu_collections", - "icu_normalizer_data", - "icu_properties", - "icu_provider", - "smallvec", - "utf16_iter", - "utf8_iter", - "write16", - "zerovec", + "windows-sys 0.61.2", ] [[package]] -name = "icu_normalizer_data" -version = "1.5.0" +name = "http" +version = "1.3.1" 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" +checksum = "f4a85d31aea989eead29a3aaf9e1115a180df8282431156e533de47660892565" 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.93", -] - -[[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", + "bytes", + "fnv", + "itoa", ] [[package]] -name = "idna_adapter" -version = "1.2.0" +name = "httparse" +version = "1.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "daca1df1c957320b2cf139ac61e7bd64fed304c5040df000a745aa1de3b4ef71" -dependencies = [ - "icu_normalizer", - "icu_properties", -] +checksum = "6dbf3de79e51f3d586ab4cb9d5c3e2c14aa28ed23d180cf89b4df0454a69cc87" [[package]] name = "ignore" -version = "0.4.23" +version = "0.4.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d89fd380afde86567dfba715db065673989d6253f42b88179abd3eae47bda4b" +checksum = "d3d782a365a015e0f5c04902246139249abf769125006fbe7649e2ee88169b4a" dependencies = [ "crossbeam-deque", "globset", @@ -639,14 +575,20 @@ dependencies = [ [[package]] name = "indexmap" -version = "2.7.0" +version = "2.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62f822373a4fe84d4bb149bf54e584a7f4abec90e072ed49cda0edea5b95471f" +checksum = "6717a8d2a5a929a1a2eb43a12812498ed141a0bcfb7e8f7844fbdbe4303bba9f" dependencies = [ "equivalent", "hashbrown", ] +[[package]] +name = "is_terminal_polyfill" +version = "1.70.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a6cb138bb79a146c1bd460005623e142ef0181e3d0219cb493e02f7d08a35695" + [[package]] name = "itertools" version = "0.13.0" @@ -658,15 +600,33 @@ dependencies = [ [[package]] name = "itoa" -version = "1.0.14" +version = "1.0.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d75a2a4b1b190afb6f5425f10f6a8f959d2ea0b9c2b1d79553551850539e4674" +checksum = "4a5f13b858c8d314ee3e8f639011f7ccefe71f97f96e50151fb991f267928e2c" [[package]] -name = "lazy_static" -version = "1.5.0" +name = "jiff" +version = "0.2.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" +checksum = "49cce2b81f2098e7e3efc35bc2e0a6b7abec9d34128283d7a26fa8f32a6dbb35" +dependencies = [ + "jiff-static", + "log", + "portable-atomic", + "portable-atomic-util", + "serde_core", +] + +[[package]] +name = "jiff-static" +version = "0.2.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "980af8b43c3ad5d8d349ace167ec8170839f753a42d233ba19e08afe1850fa69" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] [[package]] name = "ldproxy" @@ -680,54 +640,48 @@ dependencies = [ [[package]] name = "libc" -version = "0.2.169" +version = "0.2.177" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5aba8db14291edd000dfcc4d620c7ebfb122c613afb886ca8803fa4e128a20a" +checksum = "2874a2af47a2325c2001a6e6fad9b16a53b802102b528163885171cf92b15976" [[package]] name = "libloading" -version = "0.8.6" +version = "0.8.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fc2f4eb4bc735547cfed7c0a4922cbd04a4655978c09b54f1f7b228750664c34" +checksum = "d7c4b02199fee7c5d21a5ae7d8cfa79a6ef5bb2fc834d6e9058e89c825efdc55" dependencies = [ "cfg-if", - "windows-targets", + "windows-link", ] [[package]] name = "libredox" -version = "0.1.3" +version = "0.1.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c0ff37bd590ca25063e35af745c343cb7a0271906fb7b37e4813e8f79f00268d" +checksum = "416f7e718bdb06000964960ffa43b4335ad4012ae8b99060261aa4a8088d5ccb" dependencies = [ - "bitflags 2.6.0", + "bitflags", "libc", "redox_syscall", ] [[package]] name = "linux-raw-sys" -version = "0.4.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "78b3ae25bc7c8c38cec158d1f2757ee79e9b3740fbc7ccf0e59e4b08d793fa89" - -[[package]] -name = "litemap" -version = "0.7.4" +version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ee93343901ab17bd981295f2cf0026d4ad018c7c31ba84549a4ddbb47a45104" +checksum = "df1d3c3b53da64cf5760482273a98e575c651a67eec7f77df96b5b642de8f039" [[package]] name = "log" -version = "0.4.22" +version = "0.4.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a7a70ba024b9dc04c27ea2f0c0548feb474ec5c54bba33a7f72f873a39d07b24" +checksum = "34080505efa8e45a4b816c349525ebe327ceaa8559756f0356cba97ef3bf7432" [[package]] name = "memchr" -version = "2.7.4" +version = "2.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3" +checksum = "f52b00d39961fc5b2736ea853c9cc86238e165017a493d1d5c8eac6bdc4cc273" [[package]] name = "minimal-lexical" @@ -737,11 +691,12 @@ checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" [[package]] name = "miniz_oxide" -version = "0.8.2" +version = "0.8.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ffbe83022cedc1d264172192511ae958937694cd57ce297164951b8b3568394" +checksum = "1fa76a2c86f704bdb222d66965fb3d63269ce38518b83cb0575fca855ebb6316" dependencies = [ "adler2", + "simd-adler32", ] [[package]] @@ -750,7 +705,7 @@ version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "71e2746dc3a24dd78b3cfcb7be93368c6de9963d30f43a6a73998a9cf4b17b46" dependencies = [ - "bitflags 2.6.0", + "bitflags", "cfg-if", "cfg_aliases", "libc", @@ -768,100 +723,103 @@ dependencies = [ [[package]] name = "normpath" -version = "1.3.0" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c8911957c4b1549ac0dc74e30db9c8b0e66ddcd6d7acc33098f4c63a64a6d7ed" +checksum = "bf23ab2b905654b4cb177e30b629937b3868311d4e1cba859f899c041046e69b" dependencies = [ - "windows-sys 0.59.0", + "windows-sys 0.61.2", ] [[package]] name = "object" -version = "0.36.7" +version = "0.37.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62948e14d923ea95ea2c7c86c71013138b66525b86bdc08d2dcc262bdb497b87" +checksum = "ff76201f031d8863c38aa7f905eca4f53abbfa15f609db4277d44cd8938f33fe" dependencies = [ "memchr", ] [[package]] name = "once_cell" -version = "1.20.2" +version = "1.21.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "42f5e15c9953c5e4ccceeb2e7382a716482c34515315f7b03532b8b4e8393d2d" + +[[package]] +name = "once_cell_polyfill" +version = "1.70.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1261fe7e33c73b354eab43b1273a57c8f967d0391e80353e51f764ac02cf6775" +checksum = "384b8ab6d37215f3c5301a95a4accb5d64aa607f1fcb26a11b5303878451b4fe" [[package]] name = "percent-encoding" -version = "2.3.1" +version = "2.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" +checksum = "9b4f627cb1b25917193a259e49bdad08f671f8d9708acfd5fe0a8c1455d87220" [[package]] -name = "prettyplease" -version = "0.2.25" +name = "portable-atomic" +version = "1.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "64d1ec885c64d0457d564db4ec299b2dae3f9c02808b8ad9c3a089c591b18033" -dependencies = [ - "proc-macro2", - "syn 2.0.93", -] +checksum = "f84267b20a16ea918e43c6a88433c2d54fa145c92a811b5b047ccbe153674483" [[package]] -name = "proc-macro-error" -version = "1.0.4" +name = "portable-atomic-util" +version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c" +checksum = "d8a2f0d8d040d7848a709caf78912debcc3f33ee4b3cac47d73d1e1069e83507" dependencies = [ - "proc-macro-error-attr", - "proc-macro2", - "quote", - "syn 1.0.109", - "version_check", + "portable-atomic", ] [[package]] -name = "proc-macro-error-attr" -version = "1.0.4" +name = "prettyplease" +version = "0.2.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869" +checksum = "479ca8adacdd7ce8f1fb39ce9ecccbfe93a3f1344b3d0d97f20bc0196208f62b" dependencies = [ "proc-macro2", - "quote", - "version_check", + "syn", ] [[package]] name = "proc-macro2" -version = "1.0.92" +version = "1.0.103" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "37d3544b3f2748c54e147655edb5025752e2303145b5aefb3c3ea2c78b973bb0" +checksum = "5ee95bc4ef87b8d5ba32e8b7714ccc834865276eab0aed5c9958d00ec45f49e8" dependencies = [ "unicode-ident", ] [[package]] name = "quote" -version = "1.0.38" +version = "1.0.42" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0e4dccaaaf89514f546c693ddc140f729f958c247918a13380cccc6078391acc" +checksum = "a338cc41d27e6cc6dce6cefc13a0729dfbb81c262b1f519331575dd80ef3067f" dependencies = [ "proc-macro2", ] +[[package]] +name = "r-efi" +version = "5.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "69cdb34c158ceb288df11e18b4bd39de994f6657d83847bdffdbd7f346754b0f" + [[package]] name = "redox_syscall" -version = "0.5.8" +version = "0.5.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "03a862b389f93e68874fbf580b9de08dd02facb9a788ebadaf4a3fd33cf58834" +checksum = "ed2bf2547551a7053d6fdfafda3f938979645c44812fbfcda098faae3f1a362d" dependencies = [ - "bitflags 2.6.0", + "bitflags", ] [[package]] name = "regex" -version = "1.11.1" +version = "1.12.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b544ef1b4eac5dc2db33ea63606ae9ffcfac26c1416a2806ae0bf5f56b201191" +checksum = "843bc0191f75f3e22651ae5f1e72939ab2f72a4bc30fa80a066bd66edefc24d4" dependencies = [ "aho-corasick", "memchr", @@ -871,9 +829,9 @@ dependencies = [ [[package]] name = "regex-automata" -version = "0.4.9" +version = "0.4.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "809e8dc61f6de73b46c85f4c96486310fe304c434cfa43669d7b40f711150908" +checksum = "5276caf25ac86c8d810222b3dbb938e512c55c6831a10f3e6ed1c93b84041f1c" dependencies = [ "aho-corasick", "memchr", @@ -882,15 +840,15 @@ dependencies = [ [[package]] name = "regex-syntax" -version = "0.8.5" +version = "0.8.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b15c43186be67a4fd63bee50d0303afffcef381492ebe2c5d87f324e1b8815c" +checksum = "7a2d987857b319362043e95f5353c0535c1f58eec5336fdfcf626430af7def58" [[package]] name = "remove_dir_all" -version = "0.8.4" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a694f9e0eb3104451127f6cc1e5de55f59d3b1fc8c5ddfaeb6f1e716479ceb4a" +checksum = "808cc0b475acf76adf36f08ca49429b12aad9f678cb56143d5b3cb49b9a1dd08" dependencies = [ "cfg-if", "cvt", @@ -902,49 +860,48 @@ dependencies = [ [[package]] name = "ring" -version = "0.17.8" +version = "0.17.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c17fa4cb658e3583423e915b9f3acc01cceaee1860e33d59ebae66adc3a2dc0d" +checksum = "a4689e6c2294d81e88dc6261c768b63bc4fcdb852be6d1352498b114f61383b7" dependencies = [ "cc", "cfg-if", - "getrandom", + "getrandom 0.2.16", "libc", - "spin", "untrusted", "windows-sys 0.52.0", ] [[package]] name = "rustc-demangle" -version = "0.1.24" +version = "0.1.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "719b953e2095829ee67db738b3bfa9fa368c94900df327b3f07fe6e794d2fe1f" +checksum = "56f7d92ca342cea22a06f2121d944b4fd82af56988c270852495420f961d4ace" [[package]] name = "rustc-hash" -version = "2.1.0" +version = "2.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c7fb8039b3032c191086b10f11f319a6e99e1e82889c5cc6046f515c9db1d497" +checksum = "357703d41365b4b27c590e3ed91eabb1b663f07c4c084095e60cbed4362dff0d" [[package]] name = "rustix" -version = "0.38.42" +version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f93dc38ecbab2eb790ff964bb77fa94faf256fd3e73285fd7ba0903b76bedb85" +checksum = "cd15f8a2c5551a84d56efdc1cd049089e409ac19a3072d5037a17fd70719ff3e" dependencies = [ - "bitflags 2.6.0", + "bitflags", "errno", "libc", "linux-raw-sys", - "windows-sys 0.59.0", + "windows-sys 0.61.2", ] [[package]] name = "rustls" -version = "0.23.20" +version = "0.23.35" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5065c3f250cbd332cd894be57c40fa52387247659b14a2d6041d121547903b1b" +checksum = "533f54bc6a7d4f647e46ad909549eda97bf5afc1585190ef692b4286b198bd8f" dependencies = [ "log", "once_cell", @@ -957,32 +914,29 @@ dependencies = [ [[package]] name = "rustls-pki-types" -version = "1.10.1" +version = "1.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2bf47e6ff922db3825eb750c4e2ff784c6ff8fb9e13046ef6a1d1c5401b0b37" +checksum = "94182ad936a0c91c324cd46c6511b9510ed16af436d7b5bab34beab0afd55f7a" +dependencies = [ + "zeroize", +] [[package]] name = "rustls-webpki" -version = "0.102.8" +version = "0.103.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "64ca1bc8749bd4cf37b5ce386cc146580777b4e8572c7b97baf22c83f444bee9" +checksum = "2ffdfa2f5286e2247234e03f680868ac2815974dc39e00ea15adc445d0aafe52" dependencies = [ "ring", "rustls-pki-types", "untrusted", ] -[[package]] -name = "rustversion" -version = "1.0.19" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f7c45b9784283f1b2e7fb61b42047c2fd678ef0960d4f6f1eba131594cc369d4" - [[package]] name = "ryu" -version = "1.0.18" +version = "1.0.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f3cb5ba0dc43242ce17de99c180e96db90b235b8a9fdc9543c96d2209116bd9f" +checksum = "28d3b2b1366ec20994f1fd18c3c594f05c5dd4bc44d8bb0c1c632c8d6829481f" [[package]] name = "same-file" @@ -995,43 +949,54 @@ dependencies = [ [[package]] name = "serde" -version = "1.0.217" +version = "1.0.228" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "02fc4265df13d6fa1d00ecff087228cc0a2b5f3c0e87e258d8b94a156e984c70" +checksum = "9a8e94ea7f378bd32cbbd37198a4a91436180c5bb472411e48b5ec2e2124ae9e" +dependencies = [ + "serde_core", + "serde_derive", +] + +[[package]] +name = "serde_core" +version = "1.0.228" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "41d385c7d4ca58e59fc732af25c3983b67ac852c1a25000afe1175de458b67ad" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.217" +version = "1.0.228" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a9bf7cf98d04a2b28aead066b7496853d4779c9cc183c440dbac457641e19a0" +checksum = "d540f220d3187173da220f885ab66608367b6574e925011a9353e4badda91d79" dependencies = [ "proc-macro2", "quote", - "syn 2.0.93", + "syn", ] [[package]] name = "serde_json" -version = "1.0.134" +version = "1.0.145" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d00f4175c42ee48b15416f6193a959ba3a0d67fc699a0db9ad12df9f83991c7d" +checksum = "402a6f66d8c709116cf22f558eab210f5a50187f702eb4d7e5ef38d9a7f1c79c" dependencies = [ "itoa", "memchr", "ryu", "serde", + "serde_core", ] [[package]] name = "serde_spanned" -version = "0.6.8" +version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87607cb1398ed59d48732e575a4c28a7a8ebf2454b964fe3f224f2afc07909e1" +checksum = "e24345aa0fe688594e73770a5f6d1b216508b4f93484c0026d521acd30134392" dependencies = [ - "serde", + "serde_core", ] [[package]] @@ -1041,73 +1006,42 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" [[package]] -name = "smallvec" -version = "1.13.2" +name = "simd-adler32" +version = "0.3.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67" - -[[package]] -name = "spin" -version = "0.9.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67" +checksum = "d66dc143e6b11c1eddc06d5c423cfc97062865baf299914ab64caa38182078fe" [[package]] name = "stable_deref_trait" -version = "1.2.0" +version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3" +checksum = "6ce2be8dc25455e1f91df71bfa12ad37d7af1092ae736f3a6cd0e37bc7810596" [[package]] name = "strsim" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ea5119cdb4c55b55d432abb513a0429384878c15dde60cc77b1c99de1a95a6a" - -[[package]] -name = "structopt" -version = "0.3.26" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c6b5c64445ba8094a6ab0c3cd2ad323e07171012d9c98b0b15651daf1787a10" -dependencies = [ - "clap", - "lazy_static", - "structopt-derive", -] - -[[package]] -name = "structopt-derive" -version = "0.4.18" +version = "0.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dcb5ae327f9cc13b68763b5749770cb9e048a99bd9dfdfa58d0cf05d5f64afe0" -dependencies = [ - "heck 0.3.3", - "proc-macro-error", - "proc-macro2", - "quote", - "syn 1.0.109", -] +checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f" [[package]] name = "strum" -version = "0.24.1" +version = "0.27.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "063e6045c0e62079840579a7e47a355ae92f60eb74daaf156fb1e84ba164e63f" +checksum = "af23d6f6c1a224baef9d3f61e287d2761385a5b88fdab4eb4c6f11aeb54c4bcf" dependencies = [ "strum_macros", ] [[package]] name = "strum_macros" -version = "0.24.3" +version = "0.27.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e385be0d24f186b4ce2f9982191e7101bb737312ad61c1f2f984f34bcf85d59" +checksum = "7695ce3845ea4b33927c055a39dc438a45b059f7c1b3d91d38d10355fb8cbca7" dependencies = [ - "heck 0.4.1", + "heck", "proc-macro2", "quote", - "rustversion", - "syn 1.0.109", + "syn", ] [[package]] @@ -1118,149 +1052,92 @@ checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292" [[package]] name = "syn" -version = "1.0.109" +version = "2.0.110" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" +checksum = "a99801b5bd34ede4cf3fc688c5919368fea4e4814a4664359503e6015b280aea" dependencies = [ "proc-macro2", "quote", "unicode-ident", ] -[[package]] -name = "syn" -version = "2.0.93" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c786062daee0d6db1132800e623df74274a0a87322d8e183338e01b3d98d058" -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.93", -] - [[package]] name = "tempfile" -version = "3.14.0" +version = "3.23.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "28cce251fcbc87fac86a866eeb0d6c2d536fc16d06f184bb61aeae11aa4cee0c" +checksum = "2d31c77bdf42a745371d260a26ca7163f1e0924b64afa0b688e61b5a9fa02f16" dependencies = [ - "cfg-if", "fastrand", + "getrandom 0.3.4", "once_cell", "rustix", - "windows-sys 0.59.0", -] - -[[package]] -name = "termcolor" -version = "1.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "06794f8f6c5c898b3275aebefa6b8a1cb24cd2c6c79397ab15774837a0bc5755" -dependencies = [ - "winapi-util", -] - -[[package]] -name = "textwrap" -version = "0.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d326610f408c7a4eb6f51c37c330e496b08506c9457c9d34287ecc38809fb060" -dependencies = [ - "unicode-width", + "windows-sys 0.61.2", ] [[package]] name = "thiserror" -version = "1.0.69" +version = "2.0.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6aaf5339b578ea85b50e080feb250a3e8ae8cfcdff9a461c9ec2904bc923f52" +checksum = "f63587ca0f12b72a0600bcba1d40081f830876000bb46dd2337a3051618f4fc8" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.69" +version = "2.0.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1" +checksum = "3ff15c8ecd7de3849db632e14d18d2571fa09dfc5ed93479bc4485c7a517c913" dependencies = [ "proc-macro2", "quote", - "syn 2.0.93", -] - -[[package]] -name = "tinystr" -version = "0.7.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9117f5d4db391c1cf6927e7bea3db74b9a1c1add8f7eda9ffd5364f40f57b82f" -dependencies = [ - "displaydoc", - "zerovec", + "syn", ] [[package]] name = "toml" -version = "0.7.8" +version = "0.9.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd79e69d3b627db300ff956027cc6c3798cef26d22526befdfcd12feeb6d2257" +checksum = "f0dc8b1fb61449e27716ec0e1bdf0f6b8f3e8f6b05391e8497b8b6d7804ea6d8" dependencies = [ - "serde", + "indexmap", + "serde_core", "serde_spanned", "toml_datetime", - "toml_edit", + "toml_parser", + "toml_writer", + "winnow", ] [[package]] name = "toml_datetime" -version = "0.6.8" +version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0dd7358ecb8fc2f8d014bf86f6f638ce72ba252a2c3a2572f2a795f1d23efb41" +checksum = "f2cdb639ebbc97961c51720f858597f7f24c4fc295327923af55b74c3c724533" dependencies = [ - "serde", + "serde_core", ] [[package]] -name = "toml_edit" -version = "0.19.15" +name = "toml_parser" +version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b5bb770da30e5cbfde35a2d7b9b8a2c4b8ef89548a7a6aeab5c9a576e3e7421" +checksum = "c0cbe268d35bdb4bb5a56a2de88d0ad0eb70af5384a99d648cd4b3d04039800e" dependencies = [ - "indexmap", - "serde", - "serde_spanned", - "toml_datetime", "winnow", ] [[package]] -name = "unicode-ident" -version = "1.0.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "adb9e6ca4f869e1180728b7950e35922a7fc6397f7b641499e8f3ef06e50dc83" - -[[package]] -name = "unicode-segmentation" -version = "1.12.0" +name = "toml_writer" +version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f6ccf251212114b54433ec949fd6a7841275f9ada20dddd2f29e9ceea4501493" +checksum = "df8b2b54733674ad286d16267dcfc7a71ed5c776e4ac7aa3c3e2561f7c637bf2" [[package]] -name = "unicode-width" -version = "0.1.14" +name = "unicode-ident" +version = "1.0.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7dd6e30e90baa6f72411720665d41d89b9a3d039dc45b8faea1ddd07f617f6af" +checksum = "9312f7c4f6ff9069b165498234ce8be658059c6728633667c526e27dc2cf1df5" [[package]] name = "untrusted" @@ -1270,54 +1147,44 @@ checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" [[package]] name = "ureq" -version = "2.12.1" +version = "3.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "02d1a66277ed75f640d608235660df48c8e3c19f3b4edb6a263315626cc3c01d" +checksum = "d39cb1dbab692d82a977c0392ffac19e188bd9186a9f32806f0aaa859d75585a" dependencies = [ "base64", "flate2", "log", - "once_cell", + "percent-encoding", "rustls", "rustls-pki-types", - "url", + "ureq-proto", + "utf-8", "webpki-roots", ] [[package]] -name = "url" -version = "2.5.4" +name = "ureq-proto" +version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "32f8b686cadd1473f4bd0117a5d28d36b1ade384ea9b5069a1c40aefed7fda60" +checksum = "60b4531c118335662134346048ddb0e54cc86bd7e81866757873055f0e38f5d2" dependencies = [ - "form_urlencoded", - "idna", - "percent-encoding", + "base64", + "http", + "httparse", + "log", ] [[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 = "vec_map" -version = "0.8.2" +name = "utf-8" +version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1bddf1187be692e79c5ffeab891132dfb0f236ed36a43c7ed39f1165ee20191" +checksum = "09cc8ee72d2a9becf2f2febe0205bbed8fc6615b7cb429ad062dc7b7ddd036a9" [[package]] -name = "version_check" -version = "0.9.5" +name = "utf8parse" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a" +checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821" [[package]] name = "walkdir" @@ -1331,78 +1198,88 @@ dependencies = [ [[package]] name = "wasi" -version = "0.11.0+wasi-snapshot-preview1" +version = "0.11.1+wasi-snapshot-preview1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" +checksum = "ccf3ec651a847eb01de73ccad15eb7d99f80485de043efb2f370cd654f4ea44b" + +[[package]] +name = "wasip2" +version = "1.0.1+wasi-0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0562428422c63773dad2c345a1882263bbf4d65cf3f42e90921f787ef5ad58e7" +dependencies = [ + "wit-bindgen", +] [[package]] name = "webpki-roots" -version = "0.26.7" +version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d642ff16b7e79272ae451b7322067cdc17cadf68c23264be9d94a32319efe7e" +checksum = "b2878ef029c47c6e8cf779119f20fcf52bde7ad42a731b2a304bc221df17571e" dependencies = [ "rustls-pki-types", ] [[package]] name = "which" -version = "4.4.2" +version = "8.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87ba24419a2078cd2b0f2ede2691b6c66d8e47836da3b6db8265ebad47afbfc7" +checksum = "d3fabb953106c3c8eea8306e4393700d7657561cb43122571b172bbfb7c7ba1d" dependencies = [ - "either", - "home", - "once_cell", + "env_home", "rustix", + "winsafe", ] [[package]] -name = "winapi" -version = "0.3.9" +name = "winapi-util" +version = "0.1.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" +checksum = "c2a7b1c03c876122aa43f3020e6c3c3ee5c05081c9a00739faf7503aeba10d22" dependencies = [ - "winapi-i686-pc-windows-gnu", - "winapi-x86_64-pc-windows-gnu", + "windows-sys 0.61.2", ] [[package]] -name = "winapi-i686-pc-windows-gnu" -version = "0.4.0" +name = "windows-link" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" +checksum = "f0805222e57f7521d6a62e36fa9163bc891acd422f971defe97d64e70d0a4fe5" [[package]] -name = "winapi-util" -version = "0.1.9" +name = "windows-sys" +version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf221c93e13a30d793f7645a0e7762c55d169dbb0a49671918a2319d289b10bb" +checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" dependencies = [ - "windows-sys 0.59.0", + "windows-targets 0.52.6", ] [[package]] -name = "winapi-x86_64-pc-windows-gnu" -version = "0.4.0" +name = "windows-sys" +version = "0.59.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" +checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b" +dependencies = [ + "windows-targets 0.52.6", +] [[package]] name = "windows-sys" -version = "0.52.0" +version = "0.60.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" +checksum = "f2f500e4d28234f72040990ec9d39e3a6b950f9f22d3dba18416c35882612bcb" dependencies = [ - "windows-targets", + "windows-targets 0.53.5", ] [[package]] name = "windows-sys" -version = "0.59.0" +version = "0.61.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b" +checksum = "ae137229bcbd6cdf0f7b80a31df61766145077ddf49416a728b02cb3921ff3fc" dependencies = [ - "windows-targets", + "windows-link", ] [[package]] @@ -1411,14 +1288,31 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" dependencies = [ - "windows_aarch64_gnullvm", - "windows_aarch64_msvc", - "windows_i686_gnu", - "windows_i686_gnullvm", - "windows_i686_msvc", - "windows_x86_64_gnu", - "windows_x86_64_gnullvm", - "windows_x86_64_msvc", + "windows_aarch64_gnullvm 0.52.6", + "windows_aarch64_msvc 0.52.6", + "windows_i686_gnu 0.52.6", + "windows_i686_gnullvm 0.52.6", + "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", +] + +[[package]] +name = "windows-targets" +version = "0.53.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4945f9f551b88e0d65f3db0bc25c33b8acea4d9e41163edf90dcd0b19f9069f3" +dependencies = [ + "windows-link", + "windows_aarch64_gnullvm 0.53.1", + "windows_aarch64_msvc 0.53.1", + "windows_i686_gnu 0.53.1", + "windows_i686_gnullvm 0.53.1", + "windows_i686_msvc 0.53.1", + "windows_x86_64_gnu 0.53.1", + "windows_x86_64_gnullvm 0.53.1", + "windows_x86_64_msvc 0.53.1", ] [[package]] @@ -1427,36 +1321,72 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.53.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a9d8416fa8b42f5c947f8482c43e7d89e73a173cead56d044f6a56104a6d1b53" + [[package]] name = "windows_aarch64_msvc" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" +[[package]] +name = "windows_aarch64_msvc" +version = "0.53.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b9d782e804c2f632e395708e99a94275910eb9100b2114651e04744e9b125006" + [[package]] name = "windows_i686_gnu" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" +[[package]] +name = "windows_i686_gnu" +version = "0.53.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "960e6da069d81e09becb0ca57a65220ddff016ff2d6af6a223cf372a506593a3" + [[package]] name = "windows_i686_gnullvm" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" +[[package]] +name = "windows_i686_gnullvm" +version = "0.53.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fa7359d10048f68ab8b09fa71c3daccfb0e9b559aed648a8f95469c27057180c" + [[package]] name = "windows_i686_msvc" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" +[[package]] +name = "windows_i686_msvc" +version = "0.53.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e7ac75179f18232fe9c285163565a57ef8d3c89254a30685b57d83a38d326c2" + [[package]] name = "windows_x86_64_gnu" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" +[[package]] +name = "windows_x86_64_gnu" +version = "0.53.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9c3842cdd74a865a8066ab39c8a7a473c0778a3f29370b5fd6b4b9aa7df4a499" + [[package]] name = "windows_x86_64_gnullvm" version = "0.52.6" @@ -1464,63 +1394,48 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" [[package]] -name = "windows_x86_64_msvc" -version = "0.52.6" +name = "windows_x86_64_gnullvm" +version = "0.53.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" +checksum = "0ffa179e2d07eee8ad8f57493436566c7cc30ac536a3379fdf008f47f6bb7ae1" [[package]] -name = "winnow" -version = "0.5.40" +name = "windows_x86_64_msvc" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f593a95398737aeed53e489c785df13f3618e41dbcd6718c6addbf1395aa6876" -dependencies = [ - "memchr", -] +checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" [[package]] -name = "write16" -version = "1.0.0" +name = "windows_x86_64_msvc" +version = "0.53.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d1890f4022759daae28ed4fe62859b1236caebfc61ede2f63ed4e695f3f6d936" +checksum = "d6bbff5f0aada427a1e5a6da5f1f98158182f26556f345ac9e04d36d0ebed650" [[package]] -name = "writeable" -version = "0.5.5" +name = "winnow" +version = "0.7.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e9df38ee2d2c3c5948ea468a8406ff0db0b29ae1ffde1bcf20ef305bcc95c51" +checksum = "21a0236b59786fed61e2a80582dd500fe61f18b5dca67a4a067d0bc9039339cf" [[package]] -name = "xmas-elf" -version = "0.9.1" +name = "winsafe" +version = "0.0.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "42c49817e78342f7f30a181573d82ff55b88a35f86ccaf07fc64b3008f56d1c6" -dependencies = [ - "zero", -] +checksum = "d135d17ab770252ad95e9a872d365cf3090e3be864a34ab46f48555993efc904" [[package]] -name = "yoke" -version = "0.7.5" +name = "wit-bindgen" +version = "0.46.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "120e6aef9aa629e3d4f52dc8cc43a015c7724194c97dfaf45180d2daf2b77f40" -dependencies = [ - "serde", - "stable_deref_trait", - "yoke-derive", - "zerofrom", -] +checksum = "f17a85883d4e6d00e8a97c586de764dabcc06133f7f1d55dce5cdc070ad7fe59" [[package]] -name = "yoke-derive" -version = "0.7.5" +name = "xmas-elf" +version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2380878cad4ac9aac1e2435f3eb4020e8374b5f13c296cb75b4620ff8e229154" +checksum = "18245fcbb8b3de8dd198ce7944fdd4096986fd6cd306b0fcfa27df817bd545d6" dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.93", - "synstructure", + "zero", ] [[package]] @@ -1529,51 +1444,8 @@ version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2fe21bcc34ca7fe6dd56cc2cb1261ea59d6b93620215aefb5ea6032265527784" -[[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.93", - "synstructure", -] - [[package]] name = "zeroize" -version = "1.8.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ced3678a2879b30306d323f4542626697a464a97c0a07c9aebf7ebca65cd4dde" - -[[package]] -name = "zerovec" -version = "0.10.4" +version = "1.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aa2b893d79df23bfb12d5461018d408ea19dfafe76c2c7ef6d4eba614f8ff079" -dependencies = [ - "yoke", - "zerofrom", - "zerovec-derive", -] - -[[package]] -name = "zerovec-derive" -version = "0.10.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6eafa6dfb17584ea3e2bd6e76e0cc15ad7af12b09abdd1ca55961bed9b1063c6" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.93", -] +checksum = "b97154e67e32c85465826e8bcc1c59429aaaf107c1e4a9e53c8d8ccd5eff88d0" diff --git a/Cargo.toml b/Cargo.toml index c819735..02927da 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -8,8 +8,8 @@ authors = [ "Ivan Markov ", "Dominik Gschwind ", ] -edition = "2021" -rust-version = "1.59" +edition = "2024" +rust-version = "1.85" categories = ["embedded", "development-tools::build-utils"] keywords = ["cargo", "platformio", "build-dependencies"] description = "A build support library for embedded Rust" @@ -60,27 +60,27 @@ kconfig = ["serde", "serde_json"] elf = ["xmas-elf"] [dependencies] -anyhow = "1" -log = "0.4" -bitflags = "1" -shlex = "1" -thiserror = "1" -filetime = "0.2" +anyhow = "1.0.100" +log = "0.4.28" +bitflags = "2.10.0" +shlex = "1.3.0" +thiserror = "2.0.17" +filetime = "0.2.26" -xmas-elf = { version = "0.9", optional = true } -home = { version = "0.5", optional = true } -strum = { version = "0.24", features = ["derive"], optional = true } -serde = { version = "1", features = ["derive"], optional = true } -serde_json = { version = "1", optional = true } -toml = { version = "0.7", optional = true } -remove_dir_all = { version = "0.8", optional = true } -cargo_toml = { version = "0.15", optional = true } -which = { version = "4.1", optional = true } -globwalk = { version = "0.8", optional = true } -tempfile = { version = "3", optional = true } -ureq = { version = "2", optional = true } -bindgen = { version = "0.71.1", optional = true } -dep-cmake = { package = "cmake", version = "0.1", optional = true } -regex = { version = "1.5", optional = true, default-features = false, features = [ +xmas-elf = { version = "0.10.0", optional = true } +home = { version = "0.5.12", optional = true } +strum = { version = "0.27.2", features = ["derive"], optional = true } +serde = { version = "1.0.228", features = ["derive"], optional = true } +serde_json = { version = "1.0.145", optional = true } +toml = { version = "0.9.8", optional = true } +remove_dir_all = { version = "1.0.0", optional = true } +cargo_toml = { version = "0.22.3", optional = true } +which = { version = "8.0.0", optional = true } +globwalk = { version = "0.9.1", optional = true } +tempfile = { version = "3.23.0", optional = true } +ureq = { version = "3.1.4", optional = true } +bindgen = { version = "0.72.1", optional = true } +dep-cmake = { package = "cmake", version = "0.1.54", optional = true } +regex = { version = "1.12.2", optional = true, default-features = false, features = [ "std", ] } diff --git a/cargo-pio/Cargo.toml b/cargo-pio/Cargo.toml index 89445f1..d952a02 100644 --- a/cargo-pio/Cargo.toml +++ b/cargo-pio/Cargo.toml @@ -1,8 +1,8 @@ [package] name = "cargo-pio" version = "0.26.0" -edition = "2021" -rust-version = "1.58" +edition = "2024" +rust-version = "1.85" authors = ["Ivan Markov ", "Dominik Gschwind "] categories = ["embedded", "development-tools::cargo-plugins"] keywords = ["cargo", "platformio"] @@ -13,8 +13,8 @@ readme = "README.md" [dependencies] embuild = { version = "0.33", path = "..", features = ["pio"] } -anyhow = {version = "1", features = ["backtrace"]} -log = "0.4" -env_logger = "0.9" -structopt = { version = "0.3.22" } -tempfile = "3.2" +anyhow = {version = "1.0.100", features = ["backtrace"]} +log = "0.4.28" +env_logger = "0.11.8" +clap = { version = "4.5.51", features = ["derive"] } +tempfile = "3.23.0" diff --git a/cargo-pio/src/main.rs b/cargo-pio/src/main.rs index 25ebedd..36a8d02 100644 --- a/cargo-pio/src/main.rs +++ b/cargo-pio/src/main.rs @@ -2,111 +2,111 @@ use std::ffi::OsString; use std::path::{Path, PathBuf}; use std::{env, fs}; -use anyhow::{bail, Result}; +use anyhow::{Result, bail}; +use clap::Parser; use embuild::cargo::CargoCmd; use embuild::pio::*; use embuild::*; use log::*; -use structopt::StructOpt; use tempfile::TempDir; const PLATFORMIO_ESP32_EXCEPTION_DECODER_DIFF: &[u8] = include_bytes!("patches/filter_exception_decoder_esp32c3_external_conf_fix.diff"); -#[derive(Debug, StructOpt)] -#[structopt( +#[derive(Debug, Parser)] +#[command( author, about = "Cargo <-> PlatformIO integration. Build Rust embedded projects with PlatformIO!", - setting = structopt::clap::AppSettings::DeriveDisplayOrder + next_display_order = None )] struct Opt { /// Prints verbose output - #[structopt(short, long)] + #[arg(short, long)] verbose: bool, /// Stay quiet, don't print any output - #[structopt(short, long)] + #[arg(short, long)] quiet: bool, - #[structopt(subcommand)] + #[command(subcommand)] cmd: Command, } -#[derive(Debug, StructOpt)] +#[derive(Debug, Parser)] enum Command { /// Installs PlatformIO Installpio { /// The directory where PlatformIO should be installed. Defaults to ~/.platformio - #[structopt(parse(from_os_str))] + #[arg(value_parser)] path: Option, }, /// Checks whether PlatformIO is installed Checkpio { /// PlatformIO installation directory to be checked. Defaults to ~/.platformio - #[structopt(parse(from_os_str))] + #[arg(value_parser)] path: Option, }, /// Prints one or all Scons environment variables that would be used when PlatformIO builds a project Printscons { - #[structopt(flatten)] + #[command(flatten)] framework_args: PioFrameworkArgs, /// Precise Scons environment variables calculation. Simulates a real PlatformIO build - #[structopt(long)] + #[arg(long)] precise: bool, /// Do a release build - #[structopt(short, long)] + #[arg(short, long)] release: bool, /// PlatformIO Scons environment variable to print - #[structopt(short = "s", long, - possible_values = &["path", "incflags", "libflags", "libdirflags", "libs", - "linkflags", "link", "linkcom", "mcu", "clangargs"])] + #[arg(short = 's', long, + value_parser = ["path", "incflags", "libflags", "libdirflags", "libs", + "linkflags", "link", "linkcom", "mcu", "clangargs"])] var: Option, }, /// Creates a new PIO->Cargo project New { - #[structopt(flatten)] + #[command(flatten)] pio_ini_args: PioIniArgs, /// The directory where the PIO->Cargo project should be created - #[structopt(parse(from_os_str))] + #[arg(value_parser)] path: PathBuf, /// Pass-through arguments down to Cargo - #[structopt(required = false, allow_hyphen_values = true, last = true)] + #[arg(trailing_var_arg = true, allow_hyphen_values = true)] cargo_args: Vec, }, /// Creates a new PIO->Cargo project in an existing directory Init { - #[structopt(flatten)] + #[command(flatten)] pio_ini_args: PioIniArgs, /// The directory where the PIO->Cargo project should be created - #[structopt(parse(from_os_str))] + #[arg(value_parser)] path: Option, /// Pass-through arguments down to Cargo - #[structopt(required = false, allow_hyphen_values = true, last = true)] + #[arg(trailing_var_arg = true, allow_hyphen_values = true)] cargo_args: Vec, }, /// Upgrades an existing Cargo library crate to a PIO->Cargo project Upgrade { - #[structopt(flatten)] + #[command(flatten)] pio_ini_args: PioIniArgs, /// The directory of the existing Cargo library crate. Defaults to the current directory - #[structopt(parse(from_os_str))] + #[arg(value_parser)] path: Option, /// Pass-through arguments down to Cargo - #[structopt(required = false, allow_hyphen_values = true, last = true)] + #[arg(trailing_var_arg = true, allow_hyphen_values = true)] cargo_args: Vec, }, /// Updates an existing PIO->Cargo project with the latest PlatformIO=>Cargo integration scripts Update { /// The directory of the existing Cargo library crate. Defaults to the current directory - #[structopt(parse(from_os_str))] + #[arg(value_parser)] path: Option, }, /// Builds a PIO->Cargo project (both the Cargo library crate and the PlatformIO build) @@ -141,115 +141,115 @@ enum Command { }, } -#[derive(Debug, StructOpt)] +#[derive(Debug, clap::Args)] struct PioInstallation { /// PlatformIO installation directory (default is ~/.platformio) - #[structopt(short = "i", long = "pio-installation")] + #[arg(short = 'i', long = "pio-installation")] pio_path: Option, } -#[derive(Debug, StructOpt)] +#[derive(Debug, clap::Args)] struct PioFrameworkArgs { - #[structopt(flatten)] + #[command(flatten)] pio_install: PioInstallation, /// Resolves the PlatformIO project with this board ID - #[structopt(short, long)] + #[arg(short, long)] board: Option, /// Resolves the PlatformIO project with this MCU ID - #[structopt(short, long)] + #[arg(short, long)] mcu: Option, /// Resolves the PlatformIO project with this platform ID - #[structopt(short, long)] + #[arg(short, long)] platform: Option, /// Resolves the PlatformIO project with this framework ID(s) - #[structopt(short, long)] + #[arg(short, long)] frameworks: Option>, /// Rust target to be used. Defaults to a target derived from the board MCU - #[structopt(short, long)] + #[arg(short, long)] target: Option, } -#[derive(Debug, StructOpt)] +#[derive(Debug, clap::Args)] struct PioIniArgs { - #[structopt(flatten)] + #[command(flatten)] framework_args: PioFrameworkArgs, /// Selects which part of the standard library cargo should build /// /// If not set to `none` create an `[unstable]` section in `.cargo/config.toml` that /// specifies if `core` or `std` should be built by cargo. Useful for targets that do /// not have `core` or `std` pre-built. - #[structopt(short = "s", long, parse(from_str = parse_build_std), - default_value = "core", possible_values = &["none", "core", "std"])] + #[arg(short = 's', long, value_parser = parse_build_std, + default_value = "core")] build_std: cargo::BuildStd, } -#[derive(Debug, StructOpt)] +#[derive(Debug, clap::Subcommand)] enum EspidfCommand { /// Generates or updates the ESP-IDF sdkconfig file using the ESP-IDF Menuconfig interactive system Menuconfig { /// Rust target for which the sdkconfig file will be generated or updated - #[structopt(short, long)] + #[arg(short, long)] target: Option, /// Indicates release configuration /// /// Equivalent to '-e release' - #[structopt(long, short)] + #[arg(long, short)] release: Option, /// PlatformIO environment to configure /// /// If not specified, the PlatformIO project default environment will be used (or error will be generated if there isn't one) - #[structopt(long, short = "e")] + #[arg(long, short = 'e')] environment: Option, }, /// Invokes the PlatformIO monitor Monitor { /// Port - #[structopt()] + #[arg()] port: String, /// Baud rate. Defaults to 115200 - #[structopt(short = "b", long)] + #[arg(short = 'b', long)] baud_rate: Option, /// Do not apply encodings/transformations - #[structopt(long)] + #[arg(long)] raw: bool, /// Binary name built by this crate for which the monitor will be invoked (necessary for access to the ELF file) - #[structopt(long)] + #[arg(long)] binary: Option, /// Rust target for which the monitor will be invoked (necessary for access to the ELF file) - #[structopt(short, long)] + #[arg(short, long)] target: Option, /// Indicates release configuration /// /// Equivalent to '-e release' - #[structopt(long, short)] + #[arg(long, short)] release: Option, /// PlatformIO environment to monitor /// /// If not specified, the PlatformIO project default environment will be used (or error will be generated if there isn't one) - #[structopt(long, short = "e")] + #[arg(long, short = 'e')] environment: Option, }, } -fn parse_build_std(s: &str) -> cargo::BuildStd { +fn parse_build_std(s: &str) -> Result { match s { - "none" => cargo::BuildStd::None, - "core" => cargo::BuildStd::Core, - "std" => cargo::BuildStd::Std, - _ => panic!(), + "none" => Ok(cargo::BuildStd::None), + "core" => Ok(cargo::BuildStd::Core), + "std" => Ok(cargo::BuildStd::Std), + _ => Err(format!("Invalid build-std value: {}", s)), } } @@ -271,7 +271,7 @@ fn main() -> Result<()> { let as_plugin = env::args().nth(1).iter().any(|s| s == "pio"); let args = env::args_os().skip(as_plugin as usize); - let opt = Opt::from_iter(args); + let opt = Opt::parse_from(args); let pio_log_level = if opt.quiet { LogLevel::Quiet @@ -692,7 +692,9 @@ fn derive_target(project: impl AsRef, target: Option<&str>) -> Result { } } +pub use shlex::Shlex as UnixCommandArgs; pub use shlex::join as join_unix_args; pub use shlex::quote as quote_unix_arg; -pub use shlex::Shlex as UnixCommandArgs; #[cfg(windows)] pub type NativeCommandArgs<'a> = WindowsCommandArgs<'a>; diff --git a/src/cmake/file_api/cache.rs b/src/cmake/file_api/cache.rs index af9866f..5a700e9 100644 --- a/src/cmake/file_api/cache.rs +++ b/src/cmake/file_api/cache.rs @@ -3,10 +3,10 @@ use std::convert::TryFrom; use std::fs; -use anyhow::{anyhow, Context, Error}; +use anyhow::{Context, Error, anyhow}; use serde::Deserialize; -use super::{index, ObjKind, Version}; +use super::{ObjKind, Version, index}; /// The variables stored in the persistent cache (`CMakeCache.txt`) for the build tree. #[derive(Debug, Clone, PartialEq, Eq, Deserialize)] diff --git a/src/cmake/file_api/codemodel.rs b/src/cmake/file_api/codemodel.rs index d579351..c30c4d4 100644 --- a/src/cmake/file_api/codemodel.rs +++ b/src/cmake/file_api/codemodel.rs @@ -7,11 +7,11 @@ use std::fs; use std::path::PathBuf; use std::sync::Arc; -use anyhow::{anyhow, Context, Error, Result}; +use anyhow::{Context, Error, Result, anyhow}; use serde::Deserialize; -use super::index::{self, ObjKind}; use super::Version; +use super::index::{self, ObjKind}; /// The description of the build system structure as modeled by CMake. #[derive(Debug, Deserialize, Clone)] @@ -166,7 +166,7 @@ pub use target::Target; pub mod target { use std::path::{Path, PathBuf}; - use anyhow::{anyhow, Context, Result}; + use anyhow::{Context, Result, anyhow}; use serde::Deserialize; use super::Language; diff --git a/src/cmake/file_api/index.rs b/src/cmake/file_api/index.rs index 2a07786..692b541 100644 --- a/src/cmake/file_api/index.rs +++ b/src/cmake/file_api/index.rs @@ -3,7 +3,7 @@ use std::convert::TryFrom; use std::fs; use std::path::PathBuf; -use anyhow::{anyhow, bail, Context, Result}; +use anyhow::{Context, Result, anyhow, bail}; use serde::{Deserialize, Serialize}; use serde_json::Value; diff --git a/src/cmake/file_api/toolchains.rs b/src/cmake/file_api/toolchains.rs index 3ef2ec4..71cdf6b 100644 --- a/src/cmake/file_api/toolchains.rs +++ b/src/cmake/file_api/toolchains.rs @@ -4,11 +4,11 @@ use std::convert::TryFrom; use std::fs; use std::path::PathBuf; -use anyhow::{anyhow, Context, Error}; +use anyhow::{Context, Error, anyhow}; use serde::Deserialize; use super::codemodel::Language; -use super::{index, ObjKind, Version}; +use super::{ObjKind, Version, index}; /// Toolchain object. /// diff --git a/src/cmd.rs b/src/cmd.rs index 1519dc5..b691f7c 100644 --- a/src/cmd.rs +++ b/src/cmd.rs @@ -162,9 +162,8 @@ impl Cmd { ) }) } - .map_err(|e| { + .inspect_err(|_| { self.print_output(&result); - e }) .map(|_| func(result)), } diff --git a/src/espidf.rs b/src/espidf.rs index a4d4444..34629ff 100644 --- a/src/espidf.rs +++ b/src/espidf.rs @@ -17,7 +17,7 @@ use std::process::Command; use std::sync::Arc; use std::{env, fs}; -use anyhow::{anyhow, Context, Error, Result}; +use anyhow::{Context, Error, Result, anyhow}; use serde::{Deserialize, Serialize}; use crate::python::PYTHON; @@ -449,7 +449,7 @@ impl EspIdf { given by ${IDF_PATH_VAR} ('{}')", a.display(), b.display() - ))) + ))); } // ignore this check if canonicalize fails _ => (), diff --git a/src/git.rs b/src/git.rs index d2b0a7b..6b6c2d2 100644 --- a/src/git.rs +++ b/src/git.rs @@ -6,7 +6,7 @@ use std::fmt::Display; use std::num::NonZeroU64; use std::path::{Path, PathBuf}; -use anyhow::{anyhow, Context}; +use anyhow::{Context, anyhow}; use crate::cmd; use crate::cmd::CmdError; @@ -501,7 +501,7 @@ pub mod sdk { use std::hash::{Hash, Hasher}; use std::path::Path; - use anyhow::{anyhow, Context, Result}; + use anyhow::{Context, Result, anyhow}; use crate::git; diff --git a/src/pio.rs b/src/pio.rs index 2269105..4e7764a 100644 --- a/src/pio.rs +++ b/src/pio.rs @@ -11,32 +11,27 @@ use std::io::Write; use std::path::{Path, PathBuf}; use std::process::{Command, Output, Stdio}; -use anyhow::{bail, Result}; +use anyhow::{Result, bail}; use log::*; use serde::de::DeserializeOwned; use serde::{Deserialize, Serialize}; use tempfile::*; -use crate::python::{check_python_at_least, PYTHON}; +use crate::python::{PYTHON, check_python_at_least}; use crate::utils; const INSTALLER_URL: &str = "https://raw.githubusercontent.com/platformio/platformio-core-installer/master/get-platformio.py"; const INSTALLER_BLOB: &[u8] = include_bytes!("pio/resources/get-platformio.py.resource"); /// The logging verbosity level when executing platformio. -#[derive(Serialize, Deserialize, Clone, Copy, PartialEq, Eq, Hash, Debug)] +#[derive(Serialize, Deserialize, Clone, Copy, PartialEq, Eq, Hash, Debug, Default)] pub enum LogLevel { Quiet, + #[default] Standard, Verbose, } -impl Default for LogLevel { - fn default() -> Self { - Self::Standard - } -} - /// A platformio platform defintion. #[deprecated( since = "0.31.2", @@ -817,18 +812,28 @@ impl Resolver { .collect::>(); if boards.is_empty() { - bail!("None of the boards in PIO matching the configured board '{}' supports the configured platform '{}'", board_id, configured_platform); + bail!( + "None of the boards in PIO matching the configured board '{}' supports the configured platform '{}'", + board_id, + configured_platform + ); } else if boards.len() > 1 { - bail!("Should not happen: multiple boards in PIO found matching the configured board '{}' and the configured platform '{}'", board_id, configured_platform); + bail!( + "Should not happen: multiple boards in PIO found matching the configured board '{}' and the configured platform '{}'", + board_id, + configured_platform + ); } } else { - bail!("Configured board '{}' matches multiple boards in PIO: [{}]; please specify platform or target for proper resolution", + bail!( + "Configured board '{}' matches multiple boards in PIO: [{}]; please specify platform or target for proper resolution", board_id, boards .iter() .map(|b| b.id.as_str()) .collect::>() - .join(", ")) + .join(", ") + ) } } @@ -843,7 +848,8 @@ impl Resolver { board.id, board.platform, target_pmf.platform, - target); + target + ); } if !target_pmf.mcus.iter().any(|mcu| *mcu == board.mcu) { @@ -852,7 +858,8 @@ impl Resolver { board.id, board.mcu, target_pmf.mcus.join(", "), - target); + target + ); } if target_pmf @@ -865,7 +872,8 @@ impl Resolver { board.id, board.frameworks.join(", "), target_pmf.frameworks.join(", "), - target); + target + ); } if params.platform.is_none() { @@ -881,7 +889,9 @@ impl Resolver { if params.mcu.is_none() { warn!( "Configuring first supported MCU '{}' derived from the build target '{}' supporting MCUs [{}].\nExplicitly specify a board or an MCU to resolve this ambiguity", - target_pmf.mcus[0], target, target_pmf.mcus.join(", ") + target_pmf.mcus[0], + target, + target_pmf.mcus.join(", ") ); params.mcu = Some(target_pmf.mcus[0].into()); @@ -892,7 +902,8 @@ impl Resolver { "Configuring framework '{}' from the frameworks [{}] derived from the build target '{}'", target_pmf.frameworks[0], target_pmf.frameworks.join(", "), - target); + target + ); params.frameworks.push(target_pmf.frameworks[0].into()); } @@ -904,7 +915,8 @@ impl Resolver { "Platforms mismatch: configured board '{}' has platform '{}' in PIO, which does not match the configured platform '{}'", board.id, board.platform, - configured_platform); + configured_platform + ); } } else { info!( @@ -921,7 +933,8 @@ impl Resolver { "Platforms mismatch: configured board '{}' has MCU '{}' in PIO, which does not match the configured MCU '{}'", board.id, board.mcu, - configured_mcu); + configured_mcu + ); } } else { info!( @@ -942,14 +955,16 @@ impl Resolver { "Frameworks mismatch: configured board '{}' has frameworks [{}] in PIO, which do not contain the configured frameworks [{}]", board.id, board.frameworks.join(", "), - params.frameworks.join(", ")); + params.frameworks.join(", ") + ); } } else { info!( "Configuring framework '{}' from the frameworks [{}] supported by the configured board '{}'", board.frameworks[0], board.frameworks.join(", "), - board.id); + board.id + ); params.frameworks.push(board.frameworks[0].clone()); } @@ -980,7 +995,8 @@ impl Resolver { "Platforms mismatch: configured platform '{}' does not match platform '{}', which was derived from the build target '{}'", configured_platform, target_pmf.platform, - target); + target + ); } } else { info!( @@ -997,12 +1013,15 @@ impl Resolver { "MCUs mismatch: configured MCU '{}' does not match MCUs [{}], which were derived from the build target '{}'", configured_mcu, target_pmf.mcus.join(", "), - target); + target + ); } } else { warn!( "Configuring first supported MCU '{}' derived from the build target '{}' supporting MCUs [{}].\nExplicitly specify a board or an MCU to resolve this ambiguity", - target_pmf.mcus[0], target, target_pmf.mcus.join(", ") + target_pmf.mcus[0], + target, + target_pmf.mcus.join(", ") ); params.mcu = Some(target_pmf.mcus[0].into()); @@ -1018,14 +1037,16 @@ impl Resolver { "Frameworks mismatch: configured frameworks [{}] are not contained in the frameworks [{}], which were derived from the build target '{}'", params.frameworks.join(", "), target_pmf.frameworks.join(", "), - target); + target + ); } } else { info!( "Configuring framework '{}' from the frameworks [{}] derived from the build target '{}'", target_pmf.frameworks[0], target_pmf.frameworks.join(", "), - target); + target + ); params.frameworks.push(target_pmf.frameworks[0].into()); } @@ -1081,14 +1102,20 @@ impl Resolver { bail!( "(Some of) the configured frameworks [{}] are not supported by the configured platform '{}'", not_found_frameworks.join(", "), - configured_platform); + configured_platform + ); } } else { info!( "Configuring framework '{}' from the frameworks [{}] matching the configured platform '{}'", frameworks[0].name, - frameworks.iter().map(|f| f.name.as_str()).collect::>().join(", "), - configured_platform); + frameworks + .iter() + .map(|f| f.name.as_str()) + .collect::>() + .join(", "), + configured_platform + ); params.frameworks.push(frameworks[0].name.clone()); } @@ -1113,20 +1140,25 @@ impl Resolver { .unwrap_or_default(); if platforms.is_empty() { - bail!("Cannot select a platform: configured frameworks [{}] do not have a common platform", params.frameworks.join(", ")); + bail!( + "Cannot select a platform: configured frameworks [{}] do not have a common platform", + params.frameworks.join(", ") + ); } if platforms.len() > 1 { bail!( "Cannot select a platform: configured frameworks [{}] have multiple common platforms: [{}]", params.frameworks.join(", "), - platforms.join(", ")); + platforms.join(", ") + ); } info!( "Configuring platform '{}' as the only common one of the configured frameworks [{}]", platforms[0], - params.frameworks.join(", ")); + params.frameworks.join(", ") + ); params.platform = Some(platforms[0].clone()); } @@ -1159,7 +1191,8 @@ impl Resolver { bail!( "Configured platform '{}' and frameworks [{}] do not have any matching board defined in PIO", params.platform.as_ref().unwrap(), - params.frameworks.join(", ")); + params.frameworks.join(", ") + ); } else { if params.mcu.is_some() { boards = boards @@ -1172,7 +1205,8 @@ impl Resolver { "Configured platform '{}', MCU '{}' and frameworks [{}] do not have any matching board defined in PIO", params.platform.as_ref().unwrap(), params.mcu.as_ref().unwrap(), - params.frameworks.join(", ")); + params.frameworks.join(", ") + ); } } else { let mcus = boards @@ -1187,13 +1221,15 @@ impl Resolver { "Configured platform '{}' and frameworks [{}] match multiple MCUs in PIO: [{}]", params.platform.as_ref().unwrap(), params.frameworks.join(", "), - mcus.join(", ")); + mcus.join(", ") + ); } else { info!( "Configuring MCU '{}' which supports configured platform '{}' and configured frameworks [{}]", mcus[0], params.platform.as_ref().unwrap(), - params.frameworks.join(", ")); + params.frameworks.join(", ") + ); params.mcu = Some(mcus[0].clone()); } @@ -1204,7 +1240,8 @@ impl Resolver { boards[0].id, params.platform.as_ref().unwrap(), params.mcu.as_ref().unwrap(), - params.frameworks.join(", ")); + params.frameworks.join(", ") + ); params.board = Some(boards[0].id.clone()); } diff --git a/src/python.rs b/src/python.rs index 61b1394..ec2dece 100644 --- a/src/python.rs +++ b/src/python.rs @@ -1,6 +1,6 @@ //! Python utilities. -use anyhow::{anyhow, Context, Result}; +use anyhow::{Context, Result, anyhow}; use crate::cmd; diff --git a/src/symgen.rs b/src/symgen.rs index a79b9d1..1382152 100644 --- a/src/symgen.rs +++ b/src/symgen.rs @@ -6,7 +6,7 @@ use std::{env, fmt}; use anyhow::{Error, Result}; use xmas_elf::sections::{SectionData, ShType}; use xmas_elf::symbol_table::{Binding, Visibility}; -use xmas_elf::{symbol_table, ElfFile}; +use xmas_elf::{ElfFile, symbol_table}; pub const VAR_SYMBOLS_FILE: &str = "EMBUILD_GENERATED_SYMBOLS_FILE"; @@ -217,8 +217,10 @@ impl Symgen { output, "#[allow(dead_code, non_upper_case_globals)]\npub const {name}: *{mutable} {typ} = 0x{addr:x} as *{mutable} {typ};\n", name = pointer.name, - mutable = if pointer.mutable { "mut" } else {"const" }, - typ = pointer.r#type.unwrap_or_else(|| "core::ffi::c_void".to_owned()), + mutable = if pointer.mutable { "mut" } else { "const" }, + typ = pointer + .r#type + .unwrap_or_else(|| "core::ffi::c_void".to_owned()), addr = self.start_addr + sym.value() )?; } else { diff --git a/src/utils.rs b/src/utils.rs index d51c56d..dc20e87 100644 --- a/src/utils.rs +++ b/src/utils.rs @@ -92,17 +92,17 @@ impl OsStrExt for PathBuf {} /// Fails if the response status is not `200` (`OK`). #[cfg(feature = "ureq")] pub fn download_file_to(url: &str, writer: &mut impl std::io::Write) -> Result<()> { - let req = ureq::get(url).call()?; - if req.status() != 200 { + let mut req = ureq::get(url).call()?; + let status = req.status(); + if status != 200 { anyhow::bail!( - "Server at url '{}' returned unexpected status {}: {}", + "Server at url '{}' returned unexpected status {}", url, - req.status(), - req.status_text() + status ); } - let mut reader = req.into_reader(); + let mut reader = req.body_mut().as_reader(); std::io::copy(&mut reader, writer)?; Ok(()) }