build: bump all dependencies and set MSRV to 1.94; fix build failures

Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: I7d331410864358d30191781d1e6c23f46a6a6964
This commit is contained in:
raf 2026-04-21 17:21:39 +03:00
commit 8b2140c057
Signed by: NotAShelf
GPG key ID: 29D95B64378DB4BF
12 changed files with 248 additions and 196 deletions

265
Cargo.lock generated
View file

@ -30,9 +30,9 @@ dependencies = [
[[package]] [[package]]
name = "anstream" name = "anstream"
version = "0.6.21" version = "1.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "43d5b281e737544384e969a5ccad3f1cdd24b48086a0fc1b2a5262a26b8f4f4a" checksum = "824a212faf96e9acacdbd09febd34438f8f711fb84e09a8916013cd7815ca28d"
dependencies = [ dependencies = [
"anstyle", "anstyle",
"anstyle-parse", "anstyle-parse",
@ -51,9 +51,9 @@ checksum = "5192cca8006f1fd4f7237516f40fa183bb07f8fbdfedaa0036de5ea9b0b45e78"
[[package]] [[package]]
name = "anstyle-parse" name = "anstyle-parse"
version = "0.2.7" version = "1.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4e7644824f0aa2c7b9384579234ef10eb7efb6a0deb83f9630a49594dd9c15c2" checksum = "52ce7f38b242319f7cabaa6813055467063ecdc9d355bbb4ce0c68908cd8130e"
dependencies = [ dependencies = [
"utf8parse", "utf8parse",
] ]
@ -80,9 +80,9 @@ dependencies = [
[[package]] [[package]]
name = "anyhow" name = "anyhow"
version = "1.0.101" version = "1.0.102"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5f0e0fee31ef5ed1ba1316088939cea399010ed7731dba877ed44aeb407a75ea" checksum = "7f202df86484c868dbad7eaa557ef785d5c66295e41b460ef922eca0723b842c"
[[package]] [[package]]
name = "assert-json-diff" name = "assert-json-diff"
@ -160,6 +160,15 @@ dependencies = [
"generic-array", "generic-array",
] ]
[[package]]
name = "block-buffer"
version = "0.12.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "cdd35008169921d80bc60d3d0ab416eecb028c4cd653352907921d95084790be"
dependencies = [
"hybrid-array",
]
[[package]] [[package]]
name = "bumpalo" name = "bumpalo"
version = "3.19.1" version = "3.19.1"
@ -228,15 +237,15 @@ version = "0.4.4"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "773f3b9af64447d2ce9850330c473515014aa235e6a783b02db81ff39e4a3dad" checksum = "773f3b9af64447d2ce9850330c473515014aa235e6a783b02db81ff39e4a3dad"
dependencies = [ dependencies = [
"crypto-common", "crypto-common 0.1.7",
"inout", "inout",
] ]
[[package]] [[package]]
name = "clap" name = "clap"
version = "4.5.58" version = "4.6.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "63be97961acde393029492ce0be7a1af7e323e6bae9511ebfac33751be5e6806" checksum = "1ddb117e43bbf7dacf0a4190fef4d345b9bad68dfc649cb349e7d17d28428e51"
dependencies = [ dependencies = [
"clap_builder", "clap_builder",
"clap_derive", "clap_derive",
@ -244,9 +253,9 @@ dependencies = [
[[package]] [[package]]
name = "clap_builder" name = "clap_builder"
version = "4.5.58" version = "4.6.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7f13174bda5dfd69d7e947827e5af4b0f2f94a4a3ee92912fba07a66150f21e2" checksum = "714a53001bf66416adb0e2ef5ac857140e7dc3a0c48fb28b2f10762fc4b5069f"
dependencies = [ dependencies = [
"anstream", "anstream",
"anstyle", "anstyle",
@ -256,9 +265,9 @@ dependencies = [
[[package]] [[package]]
name = "clap_derive" name = "clap_derive"
version = "4.5.55" version = "4.6.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a92793da1a46a5f2a02a6f4c46c6496b28c43638adea8306fcb0caa1634f24e5" checksum = "f2ce8604710f6733aa641a2b3731eaa1e8b3d9973d5e3565da11800813f997a9"
dependencies = [ dependencies = [
"heck", "heck",
"proc-macro2", "proc-macro2",
@ -330,6 +339,12 @@ dependencies = [
"windows-sys 0.61.2", "windows-sys 0.61.2",
] ]
[[package]]
name = "const-oid"
version = "0.10.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a6ef517f0926dd24a1582492c791b6a4818a4d94e789a334894aa15b0d12f55c"
[[package]] [[package]]
name = "constant_time_eq" name = "constant_time_eq"
version = "0.4.2" version = "0.4.2"
@ -380,21 +395,6 @@ dependencies = [
"libc", "libc",
] ]
[[package]]
name = "crc"
version = "3.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9710d3b3739c2e349eb44fe848ad0b7c8cb1e42bd87ee49371df2f7acaf3e675"
dependencies = [
"crc-catalog",
]
[[package]]
name = "crc-catalog"
version = "2.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "19d374276b40fb8bbdee95aef7c7fa6b5316ec764510eb64b8dd0e2ed0d7e7f5"
[[package]] [[package]]
name = "crc32fast" name = "crc32fast"
version = "1.5.0" version = "1.5.0"
@ -437,6 +437,15 @@ dependencies = [
"typenum", "typenum",
] ]
[[package]]
name = "crypto-common"
version = "0.2.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "77727bb15fa921304124b128af125e7e3b968275d1b108b379190264f4423710"
dependencies = [
"hybrid-array",
]
[[package]] [[package]]
name = "deflate64" name = "deflate64"
version = "0.1.10" version = "0.1.10"
@ -470,11 +479,22 @@ version = "0.10.7"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292"
dependencies = [ dependencies = [
"block-buffer", "block-buffer 0.10.4",
"crypto-common", "crypto-common 0.1.7",
"subtle", "subtle",
] ]
[[package]]
name = "digest"
version = "0.11.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4850db49bf08e663084f7fb5c87d202ef91a3907271aff24a94eb97ff039153c"
dependencies = [
"block-buffer 0.12.0",
"const-oid",
"crypto-common 0.2.1",
]
[[package]] [[package]]
name = "displaydoc" name = "displaydoc"
version = "0.2.5" version = "0.2.5"
@ -528,9 +548,9 @@ dependencies = [
[[package]] [[package]]
name = "env_logger" name = "env_logger"
version = "0.11.9" version = "0.11.10"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b2daee4ea451f429a58296525ddf28b45a3b64f1acf6587e2067437bb11e218d" checksum = "0621c04f2196ac3f488dd583365b9c09be011a4ab8b9f37248ffcc8f6198b56a"
dependencies = [ dependencies = [
"anstream", "anstream",
"anstyle", "anstyle",
@ -607,9 +627,9 @@ checksum = "42703706b716c37f96a77aea830392ad231f44c9e9a67872fa5548707e11b11c"
[[package]] [[package]]
name = "futures" name = "futures"
version = "0.3.31" version = "0.3.32"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "65bc07b1a8bc7c85c5f2e110c476c7389b4554ba72af57d8445ea63a576b0876" checksum = "8b147ee9d1f6d097cef9ce628cd2ee62288d963e16fb287bd9286455b241382d"
dependencies = [ dependencies = [
"futures-channel", "futures-channel",
"futures-core", "futures-core",
@ -622,9 +642,9 @@ dependencies = [
[[package]] [[package]]
name = "futures-channel" name = "futures-channel"
version = "0.3.31" version = "0.3.32"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2dff15bf788c671c1934e366d07e30c1814a8ef514e1af724a602e8a2fbe1b10" checksum = "07bbe89c50d7a535e539b8c17bc0b49bdb77747034daa8087407d655f3f7cc1d"
dependencies = [ dependencies = [
"futures-core", "futures-core",
"futures-sink", "futures-sink",
@ -632,15 +652,15 @@ dependencies = [
[[package]] [[package]]
name = "futures-core" name = "futures-core"
version = "0.3.31" version = "0.3.32"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "05f29059c0c2090612e8d742178b0580d2dc940c837851ad723096f87af6663e" checksum = "7e3450815272ef58cec6d564423f6e755e25379b217b0bc688e295ba24df6b1d"
[[package]] [[package]]
name = "futures-executor" name = "futures-executor"
version = "0.3.31" version = "0.3.32"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1e28d1d997f585e54aebc3f97d39e72338912123a67330d723fdbb564d646c9f" checksum = "baf29c38818342a3b26b5b923639e7b1f4a61fc5e76102d4b1981c6dc7a7579d"
dependencies = [ dependencies = [
"futures-core", "futures-core",
"futures-task", "futures-task",
@ -649,15 +669,15 @@ dependencies = [
[[package]] [[package]]
name = "futures-io" name = "futures-io"
version = "0.3.31" version = "0.3.32"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9e5c1b78ca4aae1ac06c48a526a655760685149f0d465d21f37abfe57ce075c6" checksum = "cecba35d7ad927e23624b22ad55235f2239cfa44fd10428eecbeba6d6a717718"
[[package]] [[package]]
name = "futures-macro" name = "futures-macro"
version = "0.3.31" version = "0.3.32"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "162ee34ebcb7c64a8abebc059ce0fee27c2262618d7b60ed8faf72fef13c3650" checksum = "e835b70203e41293343137df5c0664546da5745f82ec9b84d40be8336958447b"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2",
"quote", "quote",
@ -666,21 +686,21 @@ dependencies = [
[[package]] [[package]]
name = "futures-sink" name = "futures-sink"
version = "0.3.31" version = "0.3.32"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e575fab7d1e0dcb8d0c7bcf9a63ee213816ab51902e6d244a95819acacf1d4f7" checksum = "c39754e157331b013978ec91992bde1ac089843443c49cbc7f46150b0fad0893"
[[package]] [[package]]
name = "futures-task" name = "futures-task"
version = "0.3.31" version = "0.3.32"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f90f7dce0722e95104fcb095585910c0977252f286e354b5e3bd38902cd99988" checksum = "037711b3d59c33004d3856fbdc83b99d4ff37a24768fa1be9ce3538a1cde4393"
[[package]] [[package]]
name = "futures-util" name = "futures-util"
version = "0.3.31" version = "0.3.32"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9fa08315bb612088cc391249efdc3bc77536f16c91f6cf495e6fbe85b20a4a81" checksum = "389ca41296e6190b48053de0321d02a77f32f8a5d2461dd38762c0593805c6d6"
dependencies = [ dependencies = [
"futures-channel", "futures-channel",
"futures-core", "futures-core",
@ -690,7 +710,6 @@ dependencies = [
"futures-task", "futures-task",
"memchr", "memchr",
"pin-project-lite", "pin-project-lite",
"pin-utils",
"slab", "slab",
] ]
@ -814,7 +833,7 @@ version = "0.12.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6c49c37c09c17a53d937dfbb742eb3a961d65a994e6bcdcf37e7399d0cc8ab5e" checksum = "6c49c37c09c17a53d937dfbb742eb3a961d65a994e6bcdcf37e7399d0cc8ab5e"
dependencies = [ dependencies = [
"digest", "digest 0.10.7",
] ]
[[package]] [[package]]
@ -862,6 +881,15 @@ version = "1.0.3"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9" checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9"
[[package]]
name = "hybrid-array"
version = "0.4.10"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3944cf8cf766b40e2a1a333ee5e9b563f854d5fa49d6a8ca2764e97c6eddb214"
dependencies = [
"typenum",
]
[[package]] [[package]]
name = "hyper" name = "hyper"
version = "1.8.1" version = "1.8.1"
@ -1049,9 +1077,9 @@ dependencies = [
[[package]] [[package]]
name = "indicatif" name = "indicatif"
version = "0.18.3" version = "0.18.4"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9375e112e4b463ec1b1c6c011953545c65a30164fbab5b581df32b3abf0dcb88" checksum = "25470f23803092da7d239834776d653104d551bc4d7eacaf31e6837854b8e9eb"
dependencies = [ dependencies = [
"console", "console",
"portable-atomic", "portable-atomic",
@ -1099,9 +1127,9 @@ checksum = "92ecc6618181def0457392ccd0ee51198e065e016d1d527a7ac1b6dc7c1f09d2"
[[package]] [[package]]
name = "jiff" name = "jiff"
version = "0.2.18" version = "0.2.23"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e67e8da4c49d6d9909fe03361f9b620f58898859f5c7aded68351e85e71ecf50" checksum = "1a3546dc96b6d42c5f24902af9e2538e82e39ad350b0c766eb3fbf2d8f3d8359"
dependencies = [ dependencies = [
"jiff-static", "jiff-static",
"log", "log",
@ -1112,9 +1140,9 @@ dependencies = [
[[package]] [[package]]
name = "jiff-static" name = "jiff-static"
version = "0.2.18" version = "0.2.23"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e0c84ee7f197eca9a86c6fd6cb771e55eb991632f15f2bc3ca6ec838929e6e78" checksum = "2a8c8b344124222efd714b73bb41f8b5120b27a7cc1c75593a6ff768d9d05aa4"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2",
"quote", "quote",
@ -1187,9 +1215,9 @@ checksum = "2c4a545a15244c7d945065b5d392b2d2d7f21526fba56ce51467b06ed445e8f7"
[[package]] [[package]]
name = "libc" name = "libc"
version = "0.2.181" version = "0.2.185"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "459427e2af2b9c839b132acb702a1c654d95e10f8c326bfc2ad11310e458b1c5" checksum = "52ff2c0fe9bc6cb6b14a0592c2ff4fa9ceb83eea9db979b0487cd054946a2b8f"
[[package]] [[package]]
name = "libgit2-sys" name = "libgit2-sys"
@ -1242,9 +1270,9 @@ dependencies = [
[[package]] [[package]]
name = "linux-raw-sys" name = "linux-raw-sys"
version = "0.11.0" version = "0.12.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "df1d3c3b53da64cf5760482273a98e575c651a67eec7f77df96b5b642de8f039" checksum = "32a66949e030da00e8c7d4434b251670a91556f4144941d37452769c25d58a53"
[[package]] [[package]]
name = "litemap" name = "litemap"
@ -1281,22 +1309,21 @@ checksum = "112b39cec0b298b6c1999fee3e31427f74f676e4cb9879ed1a121b43661a4154"
[[package]] [[package]]
name = "lzma-rust2" name = "lzma-rust2"
version = "0.15.6" version = "0.16.2"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "17f7337d278fec032975dc884152491580dd23750ee957047856735fe0e61ede" checksum = "47bb1e988e6fb779cf720ad431242d3f03167c1b3f2b1aae7f1a94b2495b36ae"
dependencies = [ dependencies = [
"crc", "sha2 0.10.9",
"sha2",
] ]
[[package]] [[package]]
name = "md-5" name = "md-5"
version = "0.10.6" version = "0.11.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d89e7ee0cfbedfc4da3340218492196241d89eefb6dab27de5df917a6d2e78cf" checksum = "69b6441f590336821bb897fb28fc622898ccceb1d6cea3fde5ea86b090c4de98"
dependencies = [ dependencies = [
"cfg-if", "cfg-if",
"digest", "digest 0.11.2",
] ]
[[package]] [[package]]
@ -1323,9 +1350,9 @@ dependencies = [
[[package]] [[package]]
name = "mio" name = "mio"
version = "1.1.1" version = "1.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a69bcab0ad47271a0234d9422b131806bf3968021e5dc9328caf2d4cd58557fc" checksum = "50b7e5b27aa02a74bac8c3f23f448f8d87ff11f92d3aac1a6ed369ee08cc56c1"
dependencies = [ dependencies = [
"libc", "libc",
"wasi", "wasi",
@ -1418,14 +1445,14 @@ dependencies = [
"log", "log",
"md-5", "md-5",
"mockito", "mockito",
"rand 0.10.0", "rand 0.10.1",
"regex", "regex",
"reqwest", "reqwest",
"semver", "semver",
"serde", "serde",
"serde_json", "serde_json",
"sha1", "sha1 0.11.0",
"sha2", "sha2 0.11.0",
"strsim", "strsim",
"tempfile", "tempfile",
"textwrap", "textwrap",
@ -1465,7 +1492,7 @@ version = "0.12.2"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f8ed6a7761f76e3b9f92dfb0a60a6a6477c61024b775147ff0973a02653abaf2" checksum = "f8ed6a7761f76e3b9f92dfb0a60a6a6477c61024b775147ff0973a02653abaf2"
dependencies = [ dependencies = [
"digest", "digest 0.10.7",
"hmac", "hmac",
] ]
@ -1550,9 +1577,9 @@ dependencies = [
[[package]] [[package]]
name = "proc-macro2" name = "proc-macro2"
version = "1.0.105" version = "1.0.106"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "535d180e0ecab6268a3e718bb9fd44db66bbbc256257165fc699dadf70d16fe7" checksum = "8fd00f0bb2e90d81d1044c2b32617f68fcb9fa3bb7640c23e9c748e53fb30934"
dependencies = [ dependencies = [
"unicode-ident", "unicode-ident",
] ]
@ -1615,9 +1642,9 @@ dependencies = [
[[package]] [[package]]
name = "quote" name = "quote"
version = "1.0.43" version = "1.0.45"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "dc74d9a594b72ae6656596548f56f667211f8a97b3d4c3d467150794690dc40a" checksum = "41f2619966050689382d2b44f664f4bc593e129785a36d6ee376ddf37259b924"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2",
] ]
@ -1640,9 +1667,9 @@ dependencies = [
[[package]] [[package]]
name = "rand" name = "rand"
version = "0.10.0" version = "0.10.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bc266eb313df6c5c09c1c7b1fbe2510961e5bcd3add930c1e31f7ed9da0feff8" checksum = "d2e8e8bcc7961af1fdac401278c6a831614941f6164ee3bf4ce61b7edb162207"
dependencies = [ dependencies = [
"chacha20", "chacha20",
"getrandom 0.4.1", "getrandom 0.4.1",
@ -1774,9 +1801,9 @@ checksum = "357703d41365b4b27c590e3ed91eabb1b663f07c4c084095e60cbed4362dff0d"
[[package]] [[package]]
name = "rustix" name = "rustix"
version = "1.1.3" version = "1.1.4"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "146c9e247ccc180c1f61615433868c99f3de3ae256a30a43b49f67c2d9171f34" checksum = "b6fe4565b9518b83ef4f91bb47ce29620ca828bd32cb7e408f0062e9930ba190"
dependencies = [ dependencies = [
"bitflags 2.10.0", "bitflags 2.10.0",
"errno", "errno",
@ -1921,9 +1948,9 @@ dependencies = [
[[package]] [[package]]
name = "semver" name = "semver"
version = "1.0.27" version = "1.0.28"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d767eb0aabc880b29956c35734170f26ed551a859dbd361d140cdbeca61ab1e2" checksum = "8a7852d02fc848982e0c167ef163aaff9cd91dc640ba85e263cb1ce46fae51cd"
[[package]] [[package]]
name = "serde" name = "serde"
@ -1988,7 +2015,18 @@ checksum = "e3bf829a2d51ab4a5ddf1352d8470c140cadc8301b2ae1789db023f01cedd6ba"
dependencies = [ dependencies = [
"cfg-if", "cfg-if",
"cpufeatures 0.2.17", "cpufeatures 0.2.17",
"digest", "digest 0.10.7",
]
[[package]]
name = "sha1"
version = "0.11.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "aacc4cc499359472b4abe1bf11d0b12e688af9a805fa5e3016f9a386dc2d0214"
dependencies = [
"cfg-if",
"cpufeatures 0.3.0",
"digest 0.11.2",
] ]
[[package]] [[package]]
@ -1999,7 +2037,18 @@ checksum = "a7507d819769d01a365ab707794a4084392c824f54a7a6a7862f8c3d0892b283"
dependencies = [ dependencies = [
"cfg-if", "cfg-if",
"cpufeatures 0.2.17", "cpufeatures 0.2.17",
"digest", "digest 0.10.7",
]
[[package]]
name = "sha2"
version = "0.11.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "446ba717509524cb3f22f17ecc096f10f4822d76ab5c0b9822c5f9c284e825f4"
dependencies = [
"cfg-if",
"cpufeatures 0.3.0",
"digest 0.11.2",
] ]
[[package]] [[package]]
@ -2056,12 +2105,12 @@ checksum = "b7c388c1b5e93756d0c740965c41e8822f866621d41acbdf6336a6a168f8840c"
[[package]] [[package]]
name = "socket2" name = "socket2"
version = "0.6.1" version = "0.6.3"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "17129e116933cf371d018bb80ae557e889637989d8638274fb25622827b03881" checksum = "3a766e1110788c36f4fa1c2b71b387a7815aa65f88ce0229841826633d93723e"
dependencies = [ dependencies = [
"libc", "libc",
"windows-sys 0.60.2", "windows-sys 0.61.2",
] ]
[[package]] [[package]]
@ -2084,9 +2133,9 @@ checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292"
[[package]] [[package]]
name = "syn" name = "syn"
version = "2.0.114" version = "2.0.117"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d4d107df263a3013ef9b1879b0df87d706ff80f65a86ea879bd9c31f9b307c2a" checksum = "e665b8803e7b1d2a727f4023456bbbbe74da67099c585258af0ad9c5013b9b99"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2",
"quote", "quote",
@ -2136,9 +2185,9 @@ dependencies = [
[[package]] [[package]]
name = "tempfile" name = "tempfile"
version = "3.25.0" version = "3.27.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0136791f7c95b1f6dd99f9cc786b91bb81c3800b639b3478e561ddb7be95e5f1" checksum = "32497e9a4c7b38532efcdebeef879707aa9f794296a4f0244f6f69e9bc8574bd"
dependencies = [ dependencies = [
"fastrand", "fastrand",
"getrandom 0.4.1", "getrandom 0.4.1",
@ -2245,9 +2294,9 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20"
[[package]] [[package]]
name = "tokio" name = "tokio"
version = "1.49.0" version = "1.52.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "72a2903cd7736441aac9df9d7688bd0ce48edccaadf181c3b90be801e81d3d86" checksum = "b67dee974fe86fd92cc45b7a95fdd2f99a36a6d7b0d431a231178d3d670bbcc6"
dependencies = [ dependencies = [
"bytes", "bytes",
"libc", "libc",
@ -2262,9 +2311,9 @@ dependencies = [
[[package]] [[package]]
name = "tokio-macros" name = "tokio-macros"
version = "2.6.0" version = "2.7.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "af407857209536a95c8e56f8231ef2c2e2aff839b22e07a1ffcbc617e9db9fa5" checksum = "385a6cb71ab9ab790c5fe8d67f1645e6c450a7ce006a33de03daa956cf70a496"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2",
"quote", "quote",
@ -3090,20 +3139,6 @@ name = "zeroize"
version = "1.8.2" version = "1.8.2"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b97154e67e32c85465826e8bcc1c59429aaaf107c1e4a9e53c8d8ccd5eff88d0" checksum = "b97154e67e32c85465826e8bcc1c59429aaaf107c1e4a9e53c8d8ccd5eff88d0"
dependencies = [
"zeroize_derive",
]
[[package]]
name = "zeroize_derive"
version = "1.4.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "85a5b4158499876c763cb03bc4e49185d3cccbabb15b33c627f7884f43db852e"
dependencies = [
"proc-macro2",
"quote",
"syn",
]
[[package]] [[package]]
name = "zerotrie" name = "zerotrie"
@ -3140,9 +3175,9 @@ dependencies = [
[[package]] [[package]]
name = "zip" name = "zip"
version = "7.4.0" version = "8.5.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "cc12baa6db2b15a140161ce53d72209dacea594230798c24774139b54ecaa980" checksum = "dcab981e19633ebcf0b001ddd37dd802996098bc1864f90b7c5d970ce76c1d59"
dependencies = [ dependencies = [
"aes", "aes",
"bzip2", "bzip2",
@ -3157,7 +3192,7 @@ dependencies = [
"memchr", "memchr",
"pbkdf2", "pbkdf2",
"ppmd-rust", "ppmd-rust",
"sha1", "sha1 0.10.6",
"time", "time",
"typed-path", "typed-path",
"zeroize", "zeroize",

View file

@ -3,45 +3,45 @@ name = "pakker"
version = "0.1.0" version = "0.1.0"
edition = "2024" edition = "2024"
authors = [ "NotAShelf <raf@notashelf.dev>" ] authors = [ "NotAShelf <raf@notashelf.dev>" ]
rust-version = "1.91.0" rust-version = "1.94.0"
readme = true readme = true
[dependencies] [dependencies]
anyhow = "1.0.101" anyhow = "1.0.102"
async-trait = "0.1.89" async-trait = "0.1.89"
clap = { version = "4.5.58", features = [ "derive" ] } clap = { version = "4.6.1", features = [ "derive" ] }
comfy-table = "7.2.2" comfy-table = "7.2.2"
dialoguer = "0.12.0" dialoguer = "0.12.0"
env_logger = "0.11.9" env_logger = "0.11.10"
futures = "0.3.31" futures = "0.3.32"
git2 = "0.20.4" git2 = "0.20.4"
glob = "0.3.3" glob = "0.3.3"
indicatif = "0.18.3" indicatif = "0.18.4"
keyring = "3.6.3" keyring = "3.6.3"
libc = "0.2.181" libc = "0.2.185"
log = "0.4.29" log = "0.4.29"
md-5 = "0.10.6" md-5 = "0.11.0"
rand = "0.10.0" rand = "0.10.1"
regex = "1.12.3" regex = "1.12.3"
reqwest = { version = "0.13.2", features = [ "json" ] } reqwest = { version = "0.13.2", features = [ "json" ] }
semver = "1.0.27" semver = "1.0.28"
serde = { version = "1.0.228", features = [ "derive" ] } serde = { version = "1.0.228", features = [ "derive" ] }
serde_json = "1.0.149" serde_json = "1.0.149"
sha1 = "0.10.6" sha1 = "0.11.0"
sha2 = "0.10.9" sha2 = "0.11.0"
strsim = "0.11.1" strsim = "0.11.1"
tempfile = "3.25.0" tempfile = "3.27.0"
textwrap = "0.16.2" textwrap = "0.16.2"
thiserror = "2.0.18" thiserror = "2.0.18"
tokio = { version = "1.49.0", features = [ "full" ] } tokio = { version = "1.52.1", features = [ "full" ] }
walkdir = "2.5.0" walkdir = "2.5.0"
yansi = "1.0.1" yansi = "1.0.1"
zip = "7.4.0" zip = "8.5.1"
[dev-dependencies] [dev-dependencies]
mockito = "1.7.2" mockito = "1.7.2"
tempfile = "3.25.0" tempfile = "3.27.0"
# Optimize crypto stuff. Building them with optimizations makes that build script # Optimize crypto stuff. Building them with optimizations makes that build script
# run ~5x faster, more than offsetting the additional build time added to the # run ~5x faster, more than offsetting the additional build time added to the
@ -51,3 +51,6 @@ opt-level = 3
[profile.dev.package.sha1] [profile.dev.package.sha1]
opt-level = 3 opt-level = 3
[profile.dev.package.md-5]
opt-level = 3

View file

@ -72,17 +72,17 @@ pub async fn execute(
&format!("Add {} to lockfile?", file_path.display()), &format!("Add {} to lockfile?", file_path.display()),
false, false,
global_yes, global_yes,
)? { )? && let Ok(file_data) = fs::read(file_path)
if let Ok(file_data) = fs::read(file_path) { {
use sha1::Digest; use sha1::Digest;
let mut hasher = sha1::Sha1::new(); let mut hasher = sha1::Sha1::new();
hasher.update(&file_data); hasher.update(&file_data);
let hash = format!("{:x}", hasher.finalize()); let hash =
file_hashes.push(FileHash { crate::utils::hash::hash_to_hex(hasher.finalize().as_slice());
path: file_path.clone(), file_hashes.push(FileHash {
hash, path: file_path.clone(),
}); hash,
} });
} }
} }
@ -91,8 +91,7 @@ pub async fn execute(
let result = add_files_batch(&mut lockfile, file_hashes).await; let result = add_files_batch(&mut lockfile, file_hashes).await;
if let Err(e) = result { if let Err(e) = result {
log::warn!( log::warn!(
"Batch lookup failed, falling back to individual lookups: {}", "Batch lookup failed, falling back to individual lookups: {e}"
e
); );
for fh in fallback_hashes { for fh in fallback_hashes {
if let Err(e) = if let Err(e) =
@ -220,7 +219,7 @@ async fn add_file_to_lockfile(
use sha1::Digest; use sha1::Digest;
let mut hasher = sha1::Sha1::new(); let mut hasher = sha1::Sha1::new();
hasher.update(&file_data); hasher.update(&file_data);
let hash = format!("{:x}", hasher.finalize()); let hash = crate::utils::hash::hash_to_hex(hasher.finalize().as_slice());
// Try Modrinth first (SHA-1 hash) // Try Modrinth first (SHA-1 hash)
if let Ok(Some(project)) = modrinth.lookup_by_hash(&hash).await { if let Ok(Some(project)) = modrinth.lookup_by_hash(&hash).await {
@ -279,7 +278,11 @@ async fn add_files_batch(
for file_info in &project.files { for file_info in &project.files {
for (idx, fh) in file_hashes.iter().enumerate() { for (idx, fh) in file_hashes.iter().enumerate() {
if !matched_indices.contains(&idx) if !matched_indices.contains(&idx)
&& file_info.hashes.get("sha1").map(|s| s.as_str()) == Some(&fh.hash) && file_info
.hashes
.get("sha1")
.map(std::string::String::as_str)
== Some(&fh.hash)
{ {
lockfile.add_project(project.clone()); lockfile.add_project(project.clone());
added_pakku_ids.insert(pakku_id.clone()); added_pakku_ids.insert(pakku_id.clone());

View file

@ -409,7 +409,7 @@ impl Fetcher {
for attempt in 0..max_attempts { for attempt in 0..max_attempts {
match self.download_single_attempt(url, target_path).await { match self.download_single_attempt(url, target_path).await {
Ok(()) => return Ok(()), Ok(()) => return Ok(()),
Err(e) if attempt < self.retry_count => { Err(_e) if attempt < self.retry_count => {
log::warn!( log::warn!(
"Download attempt {}/{} failed for {}, retrying...", "Download attempt {}/{} failed for {}, retrying...",
attempt + 1, attempt + 1,

View file

@ -119,18 +119,17 @@ impl Config {
Ok(config) Ok(config)
}, },
Ok(ConfigWrapper::Pakku { pakku }) => { Ok(ConfigWrapper::Pakku { pakku }) => {
let name = pakku let name = pakku.parent.as_ref().map_or_else(
.parent || "unknown".to_string(),
.as_ref() |p| {
.map(|p| {
p.id p.id
.split('/') .split('/')
.next_back() .next_back()
.unwrap_or(&p.id) .unwrap_or(&p.id)
.trim_end_matches(".git") .trim_end_matches(".git")
.to_string() .to_string()
}) },
.unwrap_or_else(|| "unknown".to_string()); );
let version = pakku let version = pakku
.parent .parent

View file

@ -45,7 +45,7 @@ impl ForkIntegrity {
pub fn hash_content(content: &str) -> String { pub fn hash_content(content: &str) -> String {
let mut hasher = Sha256::new(); let mut hasher = Sha256::new();
hasher.update(content.as_bytes()); hasher.update(content.as_bytes());
format!("{:x}", hasher.finalize()) crate::utils::hash::hash_to_hex(hasher.finalize().as_slice())
} }
/// Reference type for Git operations /// Reference type for Git operations

View file

@ -96,8 +96,8 @@ impl Project {
.name .name
.values() .values()
.next() .next()
.map(|s| s.to_owned()) .map(std::borrow::ToOwned::to_owned)
.or_else(|| self.pakku_id.as_ref().map(|s| s.to_owned())) .or_else(|| self.pakku_id.as_ref().map(std::borrow::ToOwned::to_owned))
.unwrap_or_else(|| "unknown".to_string()) .unwrap_or_else(|| "unknown".to_string())
} }
@ -176,7 +176,7 @@ impl Project {
/// ///
/// # Errors /// # Errors
/// Returns `PakkerError::InvalidProject` if the projects have different types /// Returns `PakkerError::InvalidProject` if the projects have different types
/// or conflicting pakku_links. /// or conflicting `pakku_links`.
pub fn merged(&self, other: Self) -> Result<Self> { pub fn merged(&self, other: Self) -> Result<Self> {
if self.r#type != other.r#type { if self.r#type != other.r#type {
return Err(PakkerError::InvalidProject(format!( return Err(PakkerError::InvalidProject(format!(
@ -192,10 +192,10 @@ impl Project {
} }
// Prefer non-default side // Prefer non-default side
let side = if self.side != ProjectSide::Both { let side = if self.side == ProjectSide::Both {
self.side
} else {
other.side other.side
} else {
self.side
}; };
let mut id = self.id.clone(); let mut id = self.id.clone();
@ -338,7 +338,7 @@ impl Project {
} }
// Sort by release type (Release < Beta < Alpha) and date (newest first) // Sort by release type (Release < Beta < Alpha) and date (newest first)
let mut sorted_files = compatible_files.to_vec(); let mut sorted_files = compatible_files.clone();
sorted_files.sort_by(|a, b| { sorted_files.sort_by(|a, b| {
a.release_type a.release_type
.cmp(&b.release_type) .cmp(&b.release_type)

View file

@ -12,10 +12,10 @@ use crate::{
}; };
const CURSEFORGE_API_BASE: &str = "https://api.curseforge.com/v1"; const CURSEFORGE_API_BASE: &str = "https://api.curseforge.com/v1";
/// CurseForge game version type ID for loader versions (e.g., "fabric", /// `CurseForge` game version type ID for loader versions (e.g., "fabric",
/// "forge") /// "forge")
const LOADER_VERSION_TYPE_ID: i32 = 68441; const LOADER_VERSION_TYPE_ID: i32 = 68441;
/// CurseForge relation type ID for "required dependency" (mod embeds or /// `CurseForge` relation type ID for "required dependency" (mod embeds or
/// requires another mod) /// requires another mod)
const DEPENDENCY_RELATION_TYPE_REQUIRED: u32 = 3; const DEPENDENCY_RELATION_TYPE_REQUIRED: u32 = 3;
@ -404,7 +404,7 @@ impl PlatformClient for CurseForgePlatform {
} }
} }
/// Uses CurseForge's `/fingerprints/432` endpoint to resolve projects by /// Uses `CurseForge`'s `/fingerprints/432` endpoint to resolve projects by
/// their hashes in batch. /// their hashes in batch.
async fn request_projects_from_hashes( async fn request_projects_from_hashes(
&self, &self,
@ -458,19 +458,19 @@ impl PlatformClient for CurseForgePlatform {
let mut seen_ids = std::collections::HashSet::new(); let mut seen_ids = std::collections::HashSet::new();
for m in matches { for m in matches {
if let Some(file) = m["file"].as_object() { if let Some(file) = m["file"].as_object()
if let Some(mod_id) = file["modId"].as_u64() { && let Some(mod_id) = file["modId"].as_u64()
let mod_id_str = mod_id.to_string(); {
if seen_ids.contains(&mod_id_str) { let mod_id_str = mod_id.to_string();
continue; if seen_ids.contains(&mod_id_str) {
} continue;
seen_ids.insert(mod_id_str.clone()); }
seen_ids.insert(mod_id_str.clone());
if let Ok(project) = if let Ok(project) =
self.request_project_with_files(&mod_id_str, &[], &[]).await self.request_project_with_files(&mod_id_str, &[], &[]).await
{ {
projects.push(project); projects.push(project);
}
} }
} }
} }

View file

@ -8,7 +8,7 @@ use crate::{
model::{Project, ProjectFile}, model::{Project, ProjectFile},
}; };
/// Multiplatform platform client that aggregates CurseForge and Modrinth. /// Multiplatform platform client that aggregates `CurseForge` and Modrinth.
/// It attempts to resolve projects on both platforms and cross-references /// It attempts to resolve projects on both platforms and cross-references
/// them via slugs when a project exists on only one platform. /// them via slugs when a project exists on only one platform.
pub struct MultiplatformPlatform { pub struct MultiplatformPlatform {
@ -203,7 +203,7 @@ impl PlatformClient for MultiplatformPlatform {
} }
} }
/// Delegates to both CurseForge and Modrinth in parallel, then deduplicates /// Delegates to both `CurseForge` and Modrinth in parallel, then deduplicates
/// results. /// results.
async fn request_projects_from_hashes( async fn request_projects_from_hashes(
&self, &self,

View file

@ -39,7 +39,7 @@ pub trait PlatformClient: Send + Sync {
) -> Result<Option<Project>>; ) -> Result<Option<Project>>;
/// Request multiple projects by their hashes (Modrinth) or bytes /// Request multiple projects by their hashes (Modrinth) or bytes
/// (CurseForge). /// (`CurseForge`).
/// ///
/// # Returns /// # Returns
/// ///

View file

@ -73,19 +73,16 @@ fn decompose(str_in: &str) -> VecDeque<SortingType> {
false false
}; };
use SortingType::*; use SortingType::{Lexical, Numerical, SemverPrerelease};
if currently_numeric { if currently_numeric {
if numeric { if numeric {
return None; return None;
} else {
return Some(
current
.parse::<i64>()
.map(|n| Numerical(n, current.to_owned()))
.unwrap_or_else(|_| Lexical(current.to_owned())),
);
} }
return Some(current.parse::<i64>().map_or_else(
|_| Lexical(current.to_owned()),
|n| Numerical(n, current.to_owned()),
));
} }
if !(numeric || c == Some(&'-') || c.is_none()) { if !(numeric || c == Some(&'-') || c.is_none()) {
@ -124,7 +121,7 @@ fn decompose(str_in: &str) -> VecDeque<SortingType> {
out out
} }
/// Compare two version strings using FlexVer rules. /// Compare two version strings using `FlexVer` rules.
/// ///
/// Returns: /// Returns:
/// - `Ordering::Less` if `a` < `b` /// - `Ordering::Less` if `a` < `b`
@ -141,7 +138,7 @@ pub fn compare(left: &str, right: &str) -> Ordering {
}; };
for next in iter { for next in iter {
use SortingType::*; use SortingType::{Numerical, SemverPrerelease};
let current = match next { let current = match next {
// Left ran out first // Left ran out first
@ -198,7 +195,7 @@ impl Iterator for VersionComparisonIterator {
} }
} }
/// FlexVer type for use with standard library traits /// `FlexVer` type for use with standard library traits
#[derive(Debug, Copy, Clone)] #[derive(Debug, Copy, Clone)]
pub struct FlexVer<'a>(pub &'a str); pub struct FlexVer<'a>(pub &'a str);

View file

@ -10,6 +10,16 @@ use sha2::{Sha256, Sha512};
use crate::error::{PakkerError, Result}; use crate::error::{PakkerError, Result};
pub fn hash_to_hex(hash: impl AsRef<[u8]>) -> String {
use std::fmt::Write;
let bytes = hash.as_ref();
let mut hex = String::with_capacity(bytes.len() * 2);
for byte in bytes {
write!(hex, "{byte:02x}").unwrap();
}
hex
}
/// Compute SHA1 hash of a file /// Compute SHA1 hash of a file
pub fn compute_sha1<P: AsRef<Path>>(path: P) -> Result<String> { pub fn compute_sha1<P: AsRef<Path>>(path: P) -> Result<String> {
let file = File::open(path)?; let file = File::open(path)?;
@ -25,7 +35,7 @@ pub fn compute_sha1<P: AsRef<Path>>(path: P) -> Result<String> {
hasher.update(&buffer[..n]); hasher.update(&buffer[..n]);
} }
Ok(format!("{:x}", hasher.finalize())) Ok(hash_to_hex(hasher.finalize().as_slice()))
} }
/// Compute SHA256 hash of a file /// Compute SHA256 hash of a file
@ -43,14 +53,14 @@ pub fn compute_sha256<P: AsRef<Path>>(path: P) -> Result<String> {
hasher.update(&buffer[..n]); hasher.update(&buffer[..n]);
} }
Ok(format!("{:x}", hasher.finalize())) Ok(hash_to_hex(hasher.finalize().as_slice()))
} }
/// Compute SHA256 hash of byte data /// Compute SHA256 hash of byte data
pub fn compute_sha256_bytes(data: &[u8]) -> String { pub fn compute_sha256_bytes(data: &[u8]) -> String {
let mut hasher = Sha256::new(); let mut hasher = Sha256::new();
hasher.update(data); hasher.update(data);
format!("{:x}", hasher.finalize()) hash_to_hex(hasher.finalize().as_slice())
} }
/// Compute SHA512 hash of a file /// Compute SHA512 hash of a file
@ -68,7 +78,7 @@ pub fn compute_sha512<P: AsRef<Path>>(path: P) -> Result<String> {
hasher.update(&buffer[..n]); hasher.update(&buffer[..n]);
} }
Ok(format!("{:x}", hasher.finalize())) Ok(hash_to_hex(hasher.finalize().as_slice()))
} }
/// Compute MD5 hash of a file /// Compute MD5 hash of a file
@ -86,7 +96,12 @@ pub fn compute_md5<P: AsRef<Path>>(path: P) -> Result<String> {
hasher.update(&buffer[..n]); hasher.update(&buffer[..n]);
} }
Ok(format!("{:x}", hasher.finalize())) let hash = hasher.finalize();
let mut hex = String::with_capacity(hash.len() * 2);
for byte in hash {
std::fmt::write(&mut hex, format_args!("{byte:02x}")).unwrap();
}
Ok(hex)
} }
/// Verify a file's hash against expected value /// Verify a file's hash against expected value