diff --git a/.editorconfig b/.editorconfig index 874a0087..9341c7b9 100644 --- a/.editorconfig +++ b/.editorconfig @@ -9,3 +9,6 @@ insert_final_newline = true [*.dm] indent_style = tab + +[*.yml] +indent_size = 2 diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 3d76971a..35100767 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -28,7 +28,7 @@ jobs: - name: Build (release) (default features) run: cargo build --target i686-pc-windows-msvc --locked --release - - uses: actions/upload-artifact@v3 + - uses: actions/upload-artifact@v4 with: name: Windows Build path: | @@ -39,8 +39,8 @@ jobs: build-linux: runs-on: ubuntu-latest env: - BYOND_MAJOR: 514 - BYOND_MINOR: 1585 + BYOND_MAJOR: 515 + BYOND_MINOR: 1636 PKG_CONFIG_ALLOW_CROSS: 1 steps: @@ -72,7 +72,7 @@ jobs: - name: Build (release) (default features) run: cargo build --target i686-unknown-linux-gnu --locked --release - - uses: actions/upload-artifact@v3 + - uses: actions/upload-artifact@v4 with: name: Linux Build path: | diff --git a/Cargo.lock b/Cargo.lock index b64f5c29..06d93fcf 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -25,9 +25,9 @@ checksum = "aae1277d39aeec15cb388266ecc24b11c80469deae6067e17a1a7aa9e5c1f234" [[package]] name = "aes" -version = "0.8.3" +version = "0.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac1f845298e95f983ff1944b728ae08b8cebab80d684f0a832ed0fc74dfa27e2" +checksum = "b169f7a6d4742236a0a00c541b845991d0ac43e546831af1249753ab4c3aa3a0" dependencies = [ "cfg-if", "cipher", @@ -36,35 +36,42 @@ dependencies = [ [[package]] name = "ahash" -version = "0.7.7" +version = "0.7.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a824f2aa7e75a0c98c5a504fceb80649e9c35265d44525b5f94de4771a395cd" +checksum = "891477e0c6a8957309ee5c45a6368af3ae14bb510732d2684ffa19af310920f9" dependencies = [ - "getrandom 0.2.11", + "getrandom", "once_cell", "version_check", ] [[package]] name = "ahash" -version = "0.8.3" +version = "0.8.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2c99f64d1e06488f620f932677e24bc6e2897582980441ae90a671415bd7ec2f" +checksum = "e89da841a80418a9b391ebaea17f5c112ffaaa96f621d2c285b5174da76b9011" dependencies = [ "cfg-if", "once_cell", "version_check", + "zerocopy", ] [[package]] name = "aho-corasick" -version = "1.1.2" +version = "1.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2969dcb958b36655471fc61f7e416fa76033bdd4bfed0678d8fee1e2d07a1f0" +checksum = "8e60d3430d3a69478ad0993f19238d2df97c507009a52b3c10addcd7f6bcb916" dependencies = [ "memchr", ] +[[package]] +name = "allocator-api2" +version = "0.2.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c6cb57a04249c6480766f7f7cef5467412af1490f8d1e243141daddada3264f" + [[package]] name = "ammonia" version = "4.0.0" @@ -93,11 +100,20 @@ dependencies = [ "libc", ] +[[package]] +name = "arbitrary" +version = "1.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7d5a26814d8dcb93b0e5a0ff3c6d80a8843bafb21b39e8e18a6f05471870e110" +dependencies = [ + "derive_arbitrary", +] + [[package]] name = "arc-swap" -version = "1.6.0" +version = "1.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bddcadddf5e9015d310179a59bb28c4d4b9920ad0f11e8e14dbadf654890c9a6" +checksum = "69f7f8c3906b62b754cd5326047894316021dcfe5a194c8ea52bdd94934a3457" [[package]] name = "arrayvec" @@ -107,15 +123,15 @@ checksum = "96d30a06541fbafbc7f82ed10c06164cfbd2c401138f6addd8404629c4b16711" [[package]] name = "autocfg" -version = "1.1.0" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" +checksum = "f1fdabc7756949593fe60f30ec81974b613357de856987752631dea1e3394c80" [[package]] name = "backtrace" -version = "0.3.69" +version = "0.3.71" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2089b7e3f35b9dd2d0ed921ead4f6d318c27680d4a5bd167b3ee120edb105837" +checksum = "26b05800d2e817c8b3b4b54abd461726265fa9789ae34330622f2db9ee696f9d" dependencies = [ "addr2line", "cc", @@ -128,22 +144,24 @@ dependencies = [ [[package]] name = "base64" -version = "0.21.5" +version = "0.21.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "35636a1494ede3b646cc98f74f8e62c773a38a659ebc777a2cf26b9b74171df9" +checksum = "9d297deb1925b89f2ccc13d7635fa0714f12c87adce1c75356b39ca9b7178567" [[package]] -name = "base64ct" -version = "1.6.0" +name = "base64" +version = "0.22.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c3c1a368f70d6cf7302d78f8f7093da241fb8e8807c05cc9e51a125895a6d5b" +checksum = "9475866fec1451be56a3c2400fd081ff546538961565ccb5b7142cbd22bc7a51" [[package]] name = "bigdecimal" -version = "0.3.1" +version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a6773ddc0eafc0e509fb60e48dff7f450f8e674a0686ae8605e8d9901bd5eefa" +checksum = "9324c8014cd04590682b34f1e9448d38f0674d0f7b2dc553331016ef0e4e9ebc" dependencies = [ + "autocfg", + "libm", "num-bigint", "num-integer", "num-traits", @@ -151,22 +169,22 @@ dependencies = [ [[package]] name = "bindgen" -version = "0.68.1" +version = "0.69.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "726e4313eb6ec35d2730258ad4e15b547ee75d6afaa1361a922e78e59b7d8078" +checksum = "a00dc851838a2120612785d195287475a3ac45514741da670b735818822129a0" dependencies = [ - "bitflags 2.4.1", + "bitflags 2.5.0", "cexpr", "clang-sys", + "itertools", "lazy_static", "lazycell", - "peeking_take_while", "proc-macro2", "quote", "regex", "rustc-hash", "shlex", - "syn 2.0.42", + "syn 2.0.60", ] [[package]] @@ -177,9 +195,9 @@ checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" [[package]] name = "bitflags" -version = "2.4.1" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "327762f6e5a765692301e5bb513e0d9fef63be86bbc14528052b1cd3e6f03e07" +checksum = "cf4b9d6a944f767f8e5e0db018570623c85f3d925ac718db4e06d0187adb21c1" [[package]] name = "bitvec" @@ -204,57 +222,36 @@ dependencies = [ [[package]] name = "borsh" -version = "0.10.3" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4114279215a005bc675e386011e594e1d9b800918cea18fcadadcce864a2046b" +checksum = "0901fc8eb0aca4c83be0106d6f2db17d86a08dfc2c25f0e84464bf381158add6" dependencies = [ "borsh-derive", - "hashbrown 0.13.2", + "cfg_aliases", ] [[package]] name = "borsh-derive" -version = "0.10.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0754613691538d51f329cce9af41d7b7ca150bc973056f1156611489475f54f7" -dependencies = [ - "borsh-derive-internal", - "borsh-schema-derive-internal", - "proc-macro-crate 0.1.5", - "proc-macro2", - "syn 1.0.109", -] - -[[package]] -name = "borsh-derive-internal" -version = "0.10.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "afb438156919598d2c7bad7e1c0adf3d26ed3840dbc010db1a882a65583ca2fb" -dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", -] - -[[package]] -name = "borsh-schema-derive-internal" -version = "0.10.3" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "634205cc43f74a1b9046ef87c4540ebda95696ec0f315024860cad7c5b0f5ccd" +checksum = "51670c3aa053938b0ee3bd67c3817e471e626151131b934038e83c5bf8de48f5" dependencies = [ + "once_cell", + "proc-macro-crate", "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.60", + "syn_derive", ] [[package]] name = "bstr" -version = "1.8.0" +version = "1.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "542f33a8835a0884b006a0c3df3dadd99c0c3f296ed26c2fdc8028e01ad6230c" +checksum = "05efc5cfd9110c8416e471df0e96702d58690178e206e61b7173706673c93706" dependencies = [ "memchr", - "regex-automata 0.4.3", + "regex-automata", "serde", ] @@ -275,15 +272,15 @@ checksum = "40e38929add23cdf8a366df9b0e088953150724bcbe5fc330b0d8eb3b328eec8" [[package]] name = "bumpalo" -version = "3.14.0" +version = "3.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f30e7476521f6f8af1a1c4c0b8cc94f0bee37d91763d0ca2665f299b6cd8aec" +checksum = "79296716171880943b8470b5f8d03aa55eb2e645a4874bdbb28adb49162e012c" [[package]] name = "bytecheck" -version = "0.6.11" +version = "0.6.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b6372023ac861f6e6dc89c8344a8f398fb42aaba2b5dbc649ca0c0e9dbcb627" +checksum = "23cdc57ce23ac53c931e88a43d06d070a6fd142f2617be5855eb75efc9beb1c2" dependencies = [ "bytecheck_derive", "ptr_meta", @@ -292,9 +289,9 @@ dependencies = [ [[package]] name = "bytecheck_derive" -version = "0.6.11" +version = "0.6.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a7ec4c6f261935ad534c0c22dbef2201b45918860eb1c574b972bd213a76af61" +checksum = "3db406d29fbcd95542e92559bed4d8ad92636d1ca8b3b72ede10b4bcc010e659" dependencies = [ "proc-macro2", "quote", @@ -303,9 +300,9 @@ dependencies = [ [[package]] name = "bytemuck" -version = "1.14.0" +version = "1.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "374d28ec25809ee0e23827c2ab573d729e293f281dfe393500e7ad618baa61c6" +checksum = "5d6d68c57235a3a081186990eca2867354726650f42f7516ca50c28d6281fd15" [[package]] name = "byteorder" @@ -315,9 +312,9 @@ checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" [[package]] name = "bytes" -version = "1.5.0" +version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a2bd12c1caf447e69cd4528f47f94d203fd2582878ecb9e9465484c4148a8223" +checksum = "514de17de45fdb8dc022b1a7975556c53c86f9f0aa5f534b98977b171857c2c9" [[package]] name = "bzip2" @@ -342,12 +339,13 @@ dependencies = [ [[package]] name = "cc" -version = "1.0.83" +version = "1.0.95" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1174fb0b6ec23863f8b971027804a42614e347eafb0a95bf0b12cdae21fc4d0" +checksum = "d32a725bc159af97c3e629873bb9f88fb8cf8a4867175f76dc987815ea07c83b" dependencies = [ "jobserver", "libc", + "once_cell", ] [[package]] @@ -365,18 +363,24 @@ version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" +[[package]] +name = "cfg_aliases" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fd16c4719339c4530435d38e511904438d07cce7950afa3718a84ac36c10e89e" + [[package]] name = "chrono" -version = "0.4.31" +version = "0.4.38" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f2c685bad3eb3d45a01354cedb7d5faa66194d1d58ba6e267a8de788f79db38" +checksum = "a21f936df1771bf62b77f047b726c4625ff2e8aa607c01ec06e5a05bd8463401" dependencies = [ "android-tzdata", "iana-time-zone", "js-sys", "num-traits", "wasm-bindgen", - "windows-targets 0.48.5", + "windows-targets 0.52.5", ] [[package]] @@ -391,9 +395,9 @@ dependencies = [ [[package]] name = "clang-sys" -version = "1.6.1" +version = "1.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c688fc74432808e3eb684cae8830a86be1d66a2bd58e1f248ed0960a590baf6f" +checksum = "67523a3b4be3ce1989d607a828d036249522dd9c1c8de7f4dd2dae43a37369d1" dependencies = [ "glob", "libc", @@ -415,17 +419,11 @@ dependencies = [ "cc", ] -[[package]] -name = "color_quant" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d7b894f5411737b7867f4827955924d7c254fc9f4d91a6aad6b097804b1018b" - [[package]] name = "combine" -version = "4.6.6" +version = "4.6.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "35ed6e9d84f0b51a7f52daf1c7d71dd136fd7a3f41a8462b8cdb8c78d920fad4" +checksum = "ba5a308b75df32fe02788e748662718f03fde005016435c444eea572398219fd" dependencies = [ "bytes", "memchr", @@ -433,9 +431,9 @@ dependencies = [ [[package]] name = "const-random" -version = "0.1.17" +version = "0.1.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5aaf16c9c2c612020bcfd042e170f6e32de9b9d75adb5277cdbbd2e2c8c8299a" +checksum = "87e00182fe74b066627d63b85fd550ac2998d4b0bd86bfed477a0ae4c7c71359" dependencies = [ "const-random-macro", ] @@ -446,22 +444,22 @@ version = "0.1.16" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f9d839f2a20b0aee515dc581a6172f2321f96cab76c1a38a4c584a194955390e" dependencies = [ - "getrandom 0.2.11", + "getrandom", "once_cell", "tiny-keccak", ] [[package]] name = "constant_time_eq" -version = "0.1.5" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "245097e9a4535ee1e3e3931fcfcd55a796a44c643e8596ff6566d68f09b87bbc" +checksum = "f7144d30dcf0fafbce74250a3963025d8d52177934239851c917d29f1df280c2" [[package]] name = "core-foundation" -version = "0.9.3" +version = "0.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "194a7a9e6de53fa55116934067c844d9d749312f75c6f6d0980e8c252f8c2146" +checksum = "91e195e091a93c46f7102ec7818a2aa394e1e1771c3ab4825963fa03e45afb8f" dependencies = [ "core-foundation-sys", "libc", @@ -475,29 +473,43 @@ checksum = "06ea2b9bc92be3c2baa9334a323ebca2d6f074ff852cd1d7b11064035cd3868f" [[package]] name = "cpufeatures" -version = "0.2.11" +version = "0.2.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce420fe07aecd3e67c5f910618fe65e94158f6dcc0adf44e00d69ce2bdfe0fd0" +checksum = "53fe5e26ff1b7aef8bca9c6080520cfb8d9333c7568e1829cef191a9723e5504" dependencies = [ "libc", ] +[[package]] +name = "crc" +version = "3.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "69e6e4d7b33a94f0991c26729976b10ebde1d34c3ee82408fb536164fa10d636" +dependencies = [ + "crc-catalog", +] + +[[package]] +name = "crc-catalog" +version = "2.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "19d374276b40fb8bbdee95aef7c7fa6b5316ec764510eb64b8dd0e2ed0d7e7f5" + [[package]] name = "crc32fast" -version = "1.3.2" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b540bd8bc810d3885c6ea91e2018302f68baba2129ab3e88f32389ee9370880d" +checksum = "b3855a8a784b474f333699ef2bbca9db2c4a1f6d9088a90a2d25b1eb53111eaa" dependencies = [ "cfg-if", ] [[package]] name = "crossbeam" -version = "0.8.2" +version = "0.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2801af0d36612ae591caa9568261fddce32ce6e08a7275ea334a06a4ad021a2c" +checksum = "1137cd7e7fc0fb5d3c5a8678be38ec56e819125d8d7907411fe24ccb943faca8" dependencies = [ - "cfg-if", "crossbeam-channel", "crossbeam-deque", "crossbeam-epoch", @@ -507,55 +519,46 @@ dependencies = [ [[package]] name = "crossbeam-channel" -version = "0.5.9" +version = "0.5.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "14c3242926edf34aec4ac3a77108ad4854bffaa2e4ddc1824124ce59231302d5" +checksum = "ab3db02a9c5b5121e1e42fbdb1aeb65f5e02624cc58c43f2884c6ccac0b82f95" dependencies = [ - "cfg-if", "crossbeam-utils", ] [[package]] name = "crossbeam-deque" -version = "0.8.4" +version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fca89a0e215bab21874660c67903c5f143333cab1da83d041c7ded6053774751" +checksum = "613f8cc01fe9cf1a3eb3d7f488fd2fa8388403e97039e2f73692932e291a770d" dependencies = [ - "cfg-if", "crossbeam-epoch", "crossbeam-utils", ] [[package]] name = "crossbeam-epoch" -version = "0.9.16" +version = "0.9.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d2fe95351b870527a5d09bf563ed3c97c0cffb87cf1c78a591bf48bb218d9aa" +checksum = "5b82ac4a3c2ca9c3460964f020e1402edd5753411d7737aa39c3714ad1b5420e" dependencies = [ - "autocfg", - "cfg-if", "crossbeam-utils", - "memoffset", ] [[package]] name = "crossbeam-queue" -version = "0.3.9" +version = "0.3.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9bcf5bdbfdd6030fb4a1c497b5d5fc5921aa2f60d359a17e249c0e6df3de153" +checksum = "df0346b5d5e76ac2fe4e327c5fd1118d6be7c51dfb18f9b7922923f287471e35" dependencies = [ - "cfg-if", "crossbeam-utils", ] [[package]] name = "crossbeam-utils" -version = "0.8.17" +version = "0.8.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c06d96137f14f244c37f989d9fff8f95e6c18b918e71f36638f8c49112e4c78f" -dependencies = [ - "cfg-if", -] +checksum = "248e3bacc7dc6baa3b21e405ee045c3047101a49145e7e9eca583ab4c2ca5345" [[package]] name = "crunchy" @@ -575,9 +578,9 @@ dependencies = [ [[package]] name = "darling" -version = "0.20.3" +version = "0.20.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0209d94da627ab5605dcccf08bb18afa5009cfbef48d8a8b7d7bdbc79be25c5e" +checksum = "54e36fcd13ed84ffdfda6f5be89b31287cbb80c439841fe69e04841435464391" dependencies = [ "darling_core", "darling_macro", @@ -585,27 +588,27 @@ dependencies = [ [[package]] name = "darling_core" -version = "0.20.3" +version = "0.20.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "177e3443818124b357d8e76f53be906d60937f0d3a90773a664fa63fa253e621" +checksum = "9c2cf1c23a687a1feeb728783b993c4e1ad83d99f351801977dd809b48d0a70f" dependencies = [ "fnv", "ident_case", "proc-macro2", "quote", "strsim", - "syn 2.0.42", + "syn 2.0.60", ] [[package]] name = "darling_macro" -version = "0.20.3" +version = "0.20.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "836a9bbc7ad63342d6d6e7b815ccab164bc77a2d95d84bc3117a8c0d5c98e2d5" +checksum = "a668eda54683121533a393014d8692171709ff57a7d61f187b6e782719f8933f" dependencies = [ "darling_core", "quote", - "syn 2.0.42", + "syn 2.0.60", ] [[package]] @@ -619,6 +622,8 @@ dependencies = [ "lock_api", "once_cell", "parking_lot_core", + "rayon", + "serde", ] [[package]] @@ -628,7 +633,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b2a92e2d3660e5513454071018433d22bbdfc8a79b9bcf1b6399aa72e96b8586" dependencies = [ "lerp", - "rand 0.8.5", + "rand", "rand_pcg", "rand_seeder", "rayon", @@ -643,6 +648,12 @@ dependencies = [ "adler32", ] +[[package]] +name = "deflate64" +version = "0.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "83ace6c86376be0b6cdcf3fb41882e81d94b31587573d1cfa9d01cd06bba210d" + [[package]] name = "deprecate-until" version = "0.1.1" @@ -652,27 +663,38 @@ dependencies = [ "proc-macro2", "quote", "semver", - "syn 2.0.42", + "syn 2.0.60", ] [[package]] name = "deranged" -version = "0.3.10" +version = "0.3.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8eb30d70a07a3b04884d2677f06bec33509dc67ca60d92949e5535352d3191dc" +checksum = "b42b6fa04a440b495c8b04d0e71b707c585f83cb9cb28cf8cd0d976c315e31b4" dependencies = [ "powerfmt", ] +[[package]] +name = "derive_arbitrary" +version = "1.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "67e77553c4162a157adbf834ebae5b415acbecbeafc7a74b0e886657506a7611" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.60", +] + [[package]] name = "derive_utils" -version = "0.13.2" +version = "0.14.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9abcad25e9720609ccb3dcdb795d845e37d8ce34183330a9f48b03a1a71c8e21" +checksum = "61bb5a1014ce6dfc2a378578509abe775a5aa06bff584a547555d9efdb81b926" dependencies = [ "proc-macro2", "quote", - "syn 2.0.42", + "syn 2.0.60", ] [[package]] @@ -688,10 +710,11 @@ dependencies = [ [[package]] name = "dmi" -version = "0.3.1" +version = "0.3.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d6c191706391473812b2c9f11befada49b65e094a19d3d422985f0d1e2daf900" +checksum = "75e7db200016e5059f8de3bfb7fb256195893ca1383682d401f07df0892306da" dependencies = [ + "bitflags 2.5.0", "deflate", "image", "inflate", @@ -706,18 +729,9 @@ checksum = "56ce8c6da7551ec6c462cbaf3bfbc75131ebbfa1c944aeaa9dab51ca1c5f0c3b" [[package]] name = "either" -version = "1.9.0" +version = "1.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a26ae43d7bcc3b814de94796a5e736d4029efb0ee900c12e2d54c993ad1a1e07" - -[[package]] -name = "encoding_rs" -version = "0.8.33" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7268b386296a025e474d5140678f75d6de9493ae55a5d709eeb9dd08149945e1" -dependencies = [ - "cfg-if", -] +checksum = "a47c1c47d2f5964e29c61246e81db715514cd532db6b5116a25ea3c03d6780a2" [[package]] name = "equivalent" @@ -740,21 +754,18 @@ name = "faster-hex" version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a2a2b11eda1d40935b26cf18f6833c526845ae8c41e58d09af6adeb6f0269183" -dependencies = [ - "serde", -] [[package]] name = "fastrand" -version = "2.0.1" +version = "2.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "25cbce373ec4653f1a01a31e8a5e5ec0c622dc27ff9c4e6606eefef5cbbed4a5" +checksum = "658bd65b1cf4c852a3cc96f18a8ce7b5640f6b703f905c7d74532294c2a63984" [[package]] name = "fdeflate" -version = "0.3.1" +version = "0.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "64d6dafc854908ff5da46ff3f8f473c6984119a2876a383a860246dd7841a868" +checksum = "4f9bfee30e4dedf0ab8b422f03af778d9612b63f502710fc500a334ebe2de645" dependencies = [ "simd-adler32", ] @@ -784,6 +795,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "46303f565772937ffe1d394a4fac6f411c6013172fadde9dcdb1e147a086940e" dependencies = [ "crc32fast", + "libz-ng-sys", "libz-sys", "miniz_oxide", ] @@ -797,7 +809,7 @@ dependencies = [ "futures-core", "futures-sink", "nanorand", - "spin 0.9.8", + "spin", ] [[package]] @@ -855,7 +867,7 @@ checksum = "b0fa992f1656e1707946bbba340ad244f0814009ef8c0118eb7b658395f19a2e" dependencies = [ "frunk_proc_macro_helpers", "quote", - "syn 2.0.42", + "syn 2.0.60", ] [[package]] @@ -867,7 +879,7 @@ dependencies = [ "frunk_core", "proc-macro2", "quote", - "syn 2.0.42", + "syn 2.0.60", ] [[package]] @@ -879,7 +891,7 @@ dependencies = [ "frunk_core", "frunk_proc_macro_helpers", "quote", - "syn 2.0.42", + "syn 2.0.60", ] [[package]] @@ -900,57 +912,47 @@ dependencies = [ [[package]] name = "futures-channel" -version = "0.3.28" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "955518d47e09b25bbebc7a18df10b81f0c766eaf4c4f1cccef2fca5f2a4fb5f2" +checksum = "eac8f7d7865dcb88bd4373ab671c8cf4508703796caa2b1985a9ca867b3fcb78" dependencies = [ "futures-core", + "futures-sink", ] [[package]] name = "futures-core" -version = "0.3.29" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eb1d22c66e66d9d72e1758f0bd7d4fd0bee04cad842ee34587d68c07e45d088c" +checksum = "dfc6580bb841c5a68e9ef15c77ccc837b40a7504914d52e47b8b0e9bbda25a1d" [[package]] name = "futures-io" -version = "0.3.28" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4fff74096e71ed47f8e023204cfd0aa1289cd54ae5430a9523be060cdb849964" - -[[package]] -name = "futures-macro" -version = "0.3.28" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89ca545a94061b6365f2c7355b4b32bd20df3ff95f02da9329b34ccc3bd6ee72" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.42", -] +checksum = "a44623e20b9681a318efdd71c299b6b222ed6f231972bfe2f224ebad6311f0c1" [[package]] name = "futures-sink" -version = "0.3.29" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e36d3378ee38c2a36ad710c5d30c2911d752cb941c00c72dbabfb786a7970817" +checksum = "9fb8e00e87438d937621c1c6269e53f536c14d3fbd6a042bb24879e57d474fb5" [[package]] name = "futures-task" -version = "0.3.28" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76d3d132be6c0e6aa1534069c705a74a5997a356c0dc2f86a47765e5617c5b65" +checksum = "38d84fa142264698cdce1a9f9172cf383a0c82de1bddcf3092901442c4097004" [[package]] name = "futures-util" -version = "0.3.28" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26b01e40b772d54cf6c6d721c1d1abd0647a0106a12ecaa1c186273392a69533" +checksum = "3d6401deb83407ab3da39eba7e33987a73c3df0c82b4bb5813ee871c19c41d48" dependencies = [ "futures-core", "futures-io", - "futures-macro", + "futures-sink", "futures-task", "memchr", "pin-project-lite", @@ -970,39 +972,28 @@ dependencies = [ [[package]] name = "getrandom" -version = "0.1.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8fc3cb4d91f53b50155bdcfd23f6a4c39ae1969c2ae85982b135750cccaf5fce" -dependencies = [ - "cfg-if", - "libc", - "wasi 0.9.0+wasi-snapshot-preview1", -] - -[[package]] -name = "getrandom" -version = "0.2.11" +version = "0.2.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fe9006bed769170c11f845cf00c7c1e9092aeb3f268e007c3e760ac68008070f" +checksum = "94b22e06ecb0110981051723910cbf0b5f5e09a2062dd7663334ee79a9d1286c" dependencies = [ "cfg-if", "js-sys", "libc", - "wasi 0.11.0+wasi-snapshot-preview1", + "wasi", "wasm-bindgen", ] [[package]] name = "gimli" -version = "0.28.0" +version = "0.28.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6fb8d784f27acf97159b40fc4db5ecd8aa23b9ad5ef69cdd136d3bc80665f0c0" +checksum = "4271d37baee1b8c7e4b708028c57d816cf9d2434acb33a549475f78c181f6253" [[package]] name = "gix" -version = "0.56.0" +version = "0.62.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b0dcdc9c60d66535897fa40a7ea2a635e72f99456b1d9ae86b7e170e80618cb" +checksum = "5631c64fb4cd48eee767bf98a3cbc5c9318ef3bb71074d4c099a2371510282b6" dependencies = [ "gix-actor", "gix-commitgraph", @@ -1037,46 +1028,45 @@ dependencies = [ "parking_lot", "smallvec", "thiserror", - "unicode-normalization", ] [[package]] name = "gix-actor" -version = "0.28.1" +version = "0.31.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2eadca029ef716b4378f7afb19f7ee101fde9e58ba1f1445971315ac866db417" +checksum = "45c3a3bde455ad2ee8ba8a195745241ce0b770a8a26faae59fcf409d01b28c46" dependencies = [ "bstr", - "btoi", "gix-date", + "gix-utils", "itoa", "thiserror", - "winnow", + "winnow 0.6.6", ] [[package]] name = "gix-bitmap" -version = "0.2.8" +version = "0.2.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d49e1a13a30d3f88be4bceae184dd13a2d3fb9ffa7515f7ed7ae771b857f4916" +checksum = "a371db66cbd4e13f0ed9dc4c0fea712d7276805fccc877f77e96374d317e87ae" dependencies = [ "thiserror", ] [[package]] name = "gix-chunk" -version = "0.4.5" +version = "0.4.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d411ecd9b558b0c20b3252b7e409eec48eabc41d18324954fe526bac6e2db55f" +checksum = "45c8751169961ba7640b513c3b24af61aa962c967aaf04116734975cd5af0c52" dependencies = [ "thiserror", ] [[package]] name = "gix-commitgraph" -version = "0.22.1" +version = "0.24.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85a7007ba021f059803afaf6f8a48872422abc20550ac12ede6ddea2936cec36" +checksum = "f7b102311085da4af18823413b5176d7c500fb2272eaf391cfa8635d8bcb12c4" dependencies = [ "bstr", "gix-chunk", @@ -1088,9 +1078,9 @@ dependencies = [ [[package]] name = "gix-config" -version = "0.32.1" +version = "0.36.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0341471d55d8676e98b88e121d7065dfa4c9c5acea4b6d6ecdd2846e85cce0c3" +checksum = "7580e05996e893347ad04e1eaceb92e1c0e6a3ffe517171af99bf6b6df0ca6e5" dependencies = [ "bstr", "gix-config-value", @@ -1104,16 +1094,16 @@ dependencies = [ "smallvec", "thiserror", "unicode-bom", - "winnow", + "winnow 0.6.6", ] [[package]] name = "gix-config-value" -version = "0.14.1" +version = "0.14.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6419db582ea84dfb58c7e7b0af7fd62c808aa14954af2936a33f89b0f4ed018e" +checksum = "fbd06203b1a9b33a78c88252a625031b094d9e1b647260070c25b09910c0a804" dependencies = [ - "bitflags 2.4.1", + "bitflags 2.5.0", "bstr", "gix-path", "libc", @@ -1122,9 +1112,9 @@ dependencies = [ [[package]] name = "gix-date" -version = "0.8.1" +version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "468dfbe411f335f01525a1352271727f8e7772075a93fa747260f502086b30be" +checksum = "180b130a4a41870edfbd36ce4169c7090bca70e195da783dea088dd973daa59c" dependencies = [ "bstr", "itoa", @@ -1134,9 +1124,9 @@ dependencies = [ [[package]] name = "gix-diff" -version = "0.38.0" +version = "0.43.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8119a985887cfe68f4bdf92e51bd64bc758a73882d82fcfc03ebcb164441c85d" +checksum = "a5fbc24115b957346cd23fb0f47d830eb799c46c89cdcf2f5acc9bf2938c2d01" dependencies = [ "bstr", "gix-hash", @@ -1146,12 +1136,13 @@ dependencies = [ [[package]] name = "gix-discover" -version = "0.27.0" +version = "0.31.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6fad89416ebe0b3b7df78464124e2a02417b6cd3743d48ad93df86f4d2929c07" +checksum = "64bab49087ed3710caf77e473dc0efc54ca33d8ccc6441359725f121211482b1" dependencies = [ "bstr", "dunce", + "gix-fs", "gix-hash", "gix-path", "gix-ref", @@ -1161,15 +1152,16 @@ dependencies = [ [[package]] name = "gix-features" -version = "0.36.1" +version = "0.38.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d46a4a5c6bb5bebec9c0d18b65ada20e6517dbd7cf855b87dd4bbdce3a771b2" +checksum = "db4254037d20a247a0367aa79333750146a369719f0c6617fec4f5752cc62b37" dependencies = [ "crc32fast", "crossbeam-channel", "flate2", "gix-hash", "gix-trace", + "gix-utils", "jwalk", "libc", "once_cell", @@ -1182,20 +1174,21 @@ dependencies = [ [[package]] name = "gix-fs" -version = "0.8.1" +version = "0.10.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "20e86eb040f5776a5ade092282e51cdcad398adb77d948b88d17583c2ae4e107" +checksum = "e2184c40e7910529677831c8b481acf788ffd92427ed21fad65b6aa637e631b8" dependencies = [ "gix-features", + "gix-utils", ] [[package]] name = "gix-glob" -version = "0.14.1" +version = "0.16.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5db19298c5eeea2961e5b3bf190767a2d1f09b8802aeb5f258e42276350aff19" +checksum = "682bdc43cb3c00dbedfcc366de2a849b582efd8d886215dbad2ea662ec156bb5" dependencies = [ - "bitflags 2.4.1", + "bitflags 2.5.0", "bstr", "gix-features", "gix-path", @@ -1203,9 +1196,9 @@ dependencies = [ [[package]] name = "gix-hash" -version = "0.13.3" +version = "0.14.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f8cf8c2266f63e582b7eb206799b63aa5fa68ee510ad349f637dfe2d0653de0" +checksum = "f93d7df7366121b5018f947a04d37f034717e113dcf9ccd85c34b58e57a74d5e" dependencies = [ "faster-hex", "thiserror", @@ -1213,9 +1206,9 @@ dependencies = [ [[package]] name = "gix-hashtable" -version = "0.4.1" +version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "feb61880816d7ec4f0b20606b498147d480860ddd9133ba542628df2f548d3ca" +checksum = "7ddf80e16f3c19ac06ce415a38b8591993d3f73aede049cb561becb5b3a8e242" dependencies = [ "gix-hash", "hashbrown 0.14.3", @@ -1224,14 +1217,14 @@ dependencies = [ [[package]] name = "gix-index" -version = "0.27.1" +version = "0.32.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f3f308f5cd2992e96a274b0d1931e9a0e44fdcba87695ead3f6df30d8a697e9c" +checksum = "881ab3b1fa57f497601a5add8289e72a7ae09471fc0b9bbe483b628ae8e418a1" dependencies = [ - "bitflags 2.4.1", + "bitflags 2.5.0", "bstr", - "btoi", "filetime", + "fnv", "gix-bitmap", "gix-features", "gix-fs", @@ -1239,6 +1232,8 @@ dependencies = [ "gix-lock", "gix-object", "gix-traverse", + "gix-utils", + "hashbrown 0.14.3", "itoa", "libc", "memmap2", @@ -1249,9 +1244,9 @@ dependencies = [ [[package]] name = "gix-lock" -version = "11.0.1" +version = "13.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e5c65e6a29830a435664891ced3f3c1af010f14900226019590ee0971a22f37" +checksum = "e7c359f81f01b8352063319bcb39789b7ea0887b406406381106e38c4a34d049" dependencies = [ "gix-tempfile", "gix-utils", @@ -1260,43 +1255,44 @@ dependencies = [ [[package]] name = "gix-macros" -version = "0.1.1" +version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "02a5bcaf6704d9354a3071cede7e77d366a5980c7352e102e2c2f9b645b1d3ae" +checksum = "1dff438f14e67e7713ab9332f5fd18c8f20eb7eb249494f6c2bf170522224032" dependencies = [ "proc-macro2", "quote", - "syn 2.0.42", + "syn 2.0.60", ] [[package]] name = "gix-object" -version = "0.39.0" +version = "0.42.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "febf79c5825720c1c63fe974c7bbe695d0cb54aabad73f45671c60ce0e501e33" +checksum = "3d4f8efae72030df1c4a81d02dbe2348e748d9b9a11e108ed6efbd846326e051" dependencies = [ "bstr", - "btoi", "gix-actor", "gix-date", "gix-features", "gix-hash", + "gix-utils", "gix-validate", "itoa", "smallvec", "thiserror", - "winnow", + "winnow 0.6.6", ] [[package]] name = "gix-odb" -version = "0.55.0" +version = "0.60.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1fae5f971540c99c6ecc8d4368ecc9d18a9dc8b9391025c68c4399747dc93bac" +checksum = "e8bbb43d2fefdc4701ffdf9224844d05b136ae1b9a73c2f90710c8dd27a93503" dependencies = [ "arc-swap", "gix-date", "gix-features", + "gix-fs", "gix-hash", "gix-object", "gix-pack", @@ -1309,9 +1305,9 @@ dependencies = [ [[package]] name = "gix-pack" -version = "0.45.0" +version = "0.50.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4569491c92446fddf373456ff360aff9a9effd627b40a70f2d7914dcd75a3205" +checksum = "b58bad27c7677fa6b587aab3a1aca0b6c97373bd371a0a4290677c838c9bcaf1" dependencies = [ "clru", "gix-chunk", @@ -1330,9 +1326,9 @@ dependencies = [ [[package]] name = "gix-path" -version = "0.10.1" +version = "0.10.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d86d6fac2fabe07b67b7835f46d07571f68b11aa1aaecae94fe722ea4ef305e1" +checksum = "23623cf0f475691a6d943f898c4d0b89f5c1a2a64d0f92bce0e0322ee6528783" dependencies = [ "bstr", "gix-trace", @@ -1343,20 +1339,20 @@ dependencies = [ [[package]] name = "gix-quote" -version = "0.4.8" +version = "0.4.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4f84845efa535468bc79c5a87b9d29219f1da0313c8ecf0365a5daa7e72786f2" +checksum = "cbff4f9b9ea3fa7a25a70ee62f545143abef624ac6aa5884344e70c8b0a1d9ff" dependencies = [ "bstr", - "btoi", + "gix-utils", "thiserror", ] [[package]] name = "gix-ref" -version = "0.39.1" +version = "0.43.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b2069adc212cf7f3317ef55f6444abd06c50f28479dbbac5a86acf3b05cbbfe" +checksum = "fd4aba68b925101cb45d6df328979af0681364579db889098a0de75b36c77b65" dependencies = [ "gix-actor", "gix-date", @@ -1367,17 +1363,18 @@ dependencies = [ "gix-object", "gix-path", "gix-tempfile", + "gix-utils", "gix-validate", "memmap2", "thiserror", - "winnow", + "winnow 0.6.6", ] [[package]] name = "gix-refspec" -version = "0.20.0" +version = "0.23.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76d9d3b82e1ee78fc0dc1c37ea5ea76c2dbc73f407db155f0dfcea285e583bee" +checksum = "dde848865834a54fe4d9b4573f15d0e9a68eaf3d061b42d3ed52b4b8acf880b2" dependencies = [ "bstr", "gix-hash", @@ -1389,9 +1386,9 @@ dependencies = [ [[package]] name = "gix-revision" -version = "0.24.0" +version = "0.27.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fe5dd51710ce5434bc315ea30394fab483c5377276494edd79222b321a5a9544" +checksum = "9e34196e1969bd5d36e2fbc4467d893999132219d503e23474a8ad2b221cb1e8" dependencies = [ "bstr", "gix-date", @@ -1405,9 +1402,9 @@ dependencies = [ [[package]] name = "gix-revwalk" -version = "0.10.0" +version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "69d4ed2493ca94a475fdf147138e1ef8bab3b6ebb56abf3d9bda1c05372ec1dd" +checksum = "e0a7d393ae814eeaae41a333c0ff684b243121cc61ccdc5bbe9897094588047d" dependencies = [ "gix-commitgraph", "gix-date", @@ -1420,21 +1417,21 @@ dependencies = [ [[package]] name = "gix-sec" -version = "0.10.1" +version = "0.10.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a36ea2c5907d64a9b4b5d3cc9f430e6c30f0509646b5e38eb275ca57c5bf29e2" +checksum = "fddc27984a643b20dd03e97790555804f98cf07404e0e552c0ad8133266a79a1" dependencies = [ - "bitflags 2.4.1", + "bitflags 2.5.0", "gix-path", "libc", - "windows", + "windows-sys 0.52.0", ] [[package]] name = "gix-tempfile" -version = "11.0.1" +version = "13.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "388dd29114a86ec69b28d1e26d6d63a662300ecf61ab3f4cc578f7d7dc9e7e23" +checksum = "a761d76594f4443b675e85928e4902dec333273836bd386906f01e7e346a0d11" dependencies = [ "gix-fs", "libc", @@ -1445,16 +1442,17 @@ dependencies = [ [[package]] name = "gix-trace" -version = "0.1.4" +version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b686a35799b53a9825575ca3f06481d0a053a409c4d97ffcf5ddd67a8760b497" +checksum = "f924267408915fddcd558e3f37295cc7d6a3e50f8bd8b606cee0808c3915157e" [[package]] name = "gix-traverse" -version = "0.35.0" +version = "0.39.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df2112088122a0206592c84fbd42020db63b2ccaed66a0293779f2e5fbf80474" +checksum = "f4029ec209b0cc480d209da3837a42c63801dd8548f09c1f4502c60accb62aeb" dependencies = [ + "bitflags 2.5.0", "gix-commitgraph", "gix-date", "gix-hash", @@ -1467,9 +1465,9 @@ dependencies = [ [[package]] name = "gix-url" -version = "0.25.2" +version = "0.27.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c427a1a11ccfa53a4a2da47d9442c2241deee63a154bc15cc14b8312fbc4005" +checksum = "0db829ebdca6180fbe32be7aed393591df6db4a72dbbc0b8369162390954d1cf" dependencies = [ "bstr", "gix-features", @@ -1481,18 +1479,19 @@ dependencies = [ [[package]] name = "gix-utils" -version = "0.1.6" +version = "0.1.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f82c41937f00e15a1f6cb0b55307f0ca1f77f4407ff2bf440be35aa688c6a3e" +checksum = "35192df7fd0fa112263bad8021e2df7167df4cc2a6e6d15892e1e55621d3d4dc" dependencies = [ "fastrand", + "unicode-normalization", ] [[package]] name = "gix-validate" -version = "0.8.1" +version = "0.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75b7d8e4274be69f284bbc7e6bb2ccf7065dbcdeba22d8c549f2451ae426883f" +checksum = "e39fc6e06044985eac19dd34d474909e517307582e462b2eb4c8fa51b6241545" dependencies = [ "bstr", "thiserror", @@ -1504,41 +1503,13 @@ version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b" -[[package]] -name = "h2" -version = "0.3.21" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91fc23aa11be92976ef4729127f1a74adf36d8436f7816b185d18df956790833" -dependencies = [ - "bytes", - "fnv", - "futures-core", - "futures-sink", - "futures-util", - "http", - "indexmap 1.9.3", - "slab", - "tokio", - "tokio-util", - "tracing", -] - [[package]] name = "hashbrown" version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" dependencies = [ - "ahash 0.7.7", -] - -[[package]] -name = "hashbrown" -version = "0.13.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43a3c133739dddd0d2990f9a4bdf8eb4b21ef50e4851ca85ab661199821d510e" -dependencies = [ - "ahash 0.8.3", + "ahash 0.7.8", ] [[package]] @@ -1546,6 +1517,10 @@ name = "hashbrown" version = "0.14.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "290f1a1d9242c78d09ce40a5e87e7554ee637af1351968159f4952f028f75604" +dependencies = [ + "ahash 0.8.11", + "allocator-api2", +] [[package]] name = "heck" @@ -1555,9 +1530,9 @@ checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" [[package]] name = "hermit-abi" -version = "0.3.3" +version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d77f7ec81a6d05a3abb01ab6eb7590f6083d08449fe5a1c8b1e620283546ccb7" +checksum = "d231dfb89cfffdbc30e7fc41579ed6066ad03abda9e567ccafae602b97ec5024" [[package]] name = "hex" @@ -1594,14 +1569,14 @@ dependencies = [ "markup5ever", "proc-macro2", "quote", - "syn 2.0.42", + "syn 2.0.60", ] [[package]] name = "http" -version = "0.2.9" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd6effc99afb63425aff9b05836f029929e345a6148a14b7ecd5ab67af944482" +checksum = "21b9ddb458710bc376481b842f5da65cdf31522de232c1ca8146abce2a358258" dependencies = [ "bytes", "fnv", @@ -1610,12 +1585,24 @@ dependencies = [ [[package]] name = "http-body" -version = "0.4.5" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1cac85db508abc24a2e48553ba12a996e87244a0395ce011e62b37158745d643" +dependencies = [ + "bytes", + "http", +] + +[[package]] +name = "http-body-util" +version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d5f38f16d184e36f2408a55281cd658ecbd3ca05cce6d6510a176eca393e26d1" +checksum = "0475f8b2ac86659c21b64320d5d653f9efe42acd2a4e560073ec61a155a34f1d" dependencies = [ "bytes", + "futures-core", "http", + "http-body", "pin-project-lite", ] @@ -1625,55 +1612,67 @@ version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d897f394bad6a705d5f4104762e116a75639e470d80901eed05a860a95cb1904" -[[package]] -name = "httpdate" -version = "1.0.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9" - [[package]] name = "hyper" -version = "0.14.27" +version = "1.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ffb1cfd654a8219eaef89881fdb3bb3b1cdc5fa75ded05d6933b2b382e395468" +checksum = "fe575dd17d0862a9a33781c8c4696a55c320909004a67a00fb286ba8b1bc496d" dependencies = [ "bytes", "futures-channel", - "futures-core", "futures-util", - "h2", "http", "http-body", "httparse", - "httpdate", "itoa", "pin-project-lite", - "socket2 0.4.10", + "smallvec", "tokio", - "tower-service", - "tracing", "want", ] [[package]] name = "hyper-rustls" -version = "0.24.1" +version = "0.26.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8d78e1e73ec14cf7375674f74d7dde185c8206fd9dea6fb6295e8a98098aaa97" +checksum = "a0bea761b46ae2b24eb4aef630d8d1c398157b6fc29e6350ecf090a0b70c952c" dependencies = [ "futures-util", "http", "hyper", - "rustls", + "hyper-util", + "rustls 0.22.4", + "rustls-pki-types", "tokio", "tokio-rustls", + "tower-service", +] + +[[package]] +name = "hyper-util" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ca38ef113da30126bbff9cd1705f9273e15d45498615d138b0c20279ac7a76aa" +dependencies = [ + "bytes", + "futures-channel", + "futures-util", + "http", + "http-body", + "hyper", + "pin-project-lite", + "socket2", + "tokio", + "tower", + "tower-service", + "tracing", ] [[package]] name = "iana-time-zone" -version = "0.1.58" +version = "0.1.60" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8326b86b6cff230b97d0d312a6c40a60726df3332e721f72a1b035f451663b20" +checksum = "e7ffbb5a1b541ea2561f8c41c087286cc091e21e556a4f09a8f6cbf17b69b141" dependencies = [ "android_system_properties", "core-foundation-sys", @@ -1710,33 +1709,21 @@ dependencies = [ [[package]] name = "image" -version = "0.24.7" +version = "0.25.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f3dfdbdd72063086ff443e297b61695500514b1e41095b6fb9a5ab48a70a711" +checksum = "fd54d660e773627692c524beaad361aca785a4f9f5730ce91f42aabe5bce3d11" dependencies = [ "bytemuck", "byteorder", - "color_quant", - "num-rational", "num-traits", "png", ] [[package]] name = "indexmap" -version = "1.9.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd070e393353796e801d209ad339e89596eb4c8d430d18ede6a1cced8fafbd99" -dependencies = [ - "autocfg", - "hashbrown 0.12.3", -] - -[[package]] -name = "indexmap" -version = "2.1.0" +version = "2.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d530e1a18b1cb4c484e6e34556a0d948706958449fca0cab753d649f2bce3d1f" +checksum = "168fb715dda47215e360912c096649d23d58bf392ac62f73919e831745e40f26" dependencies = [ "equivalent", "hashbrown 0.14.3", @@ -1771,40 +1758,48 @@ dependencies = [ [[package]] name = "io-enum" -version = "1.1.1" +version = "1.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5305557fa27b460072ae15ce07617e999f5879f14d376c8449f0bfb9f9d8e91e" +checksum = "53b53d712d99a73eec59ee5e4fe6057f8052142d38eeafbbffcb06b36d738a6e" dependencies = [ "derive_utils", - "syn 2.0.42", ] [[package]] name = "ipnet" -version = "2.8.0" +version = "2.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "28b29a3cd74f0f4598934efe3aeba42bae0eb4680554128851ebbecb02af14e6" +checksum = "8f518f335dce6725a761382244631d86cf0ccb2863413590b31338feb467f9c3" [[package]] -name = "itoa" -version = "1.0.10" +name = "itertools" +version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1a46d1a171d865aa5f83f92695765caa047a9b4cbae2cbf37dbd613a793fd4c" - +checksum = "ba291022dbbd398a455acf126c1e341954079855bc60dfdda641363bd6922569" +dependencies = [ + "either", +] + +[[package]] +name = "itoa" +version = "1.0.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "49f1f14873335454500d59611f1cf4a4b0f786f9ac11f4312a78e4cf2566695b" + [[package]] name = "jobserver" -version = "0.1.27" +version = "0.1.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c37f63953c4c63420ed5fd3d6d398c719489b9f872b9fa683262f8edd363c7d" +checksum = "685a7d121ee3f65ae4fddd72b25a04bb36b6af81bc0828f7d5434c0fe60fa3a2" dependencies = [ "libc", ] [[package]] name = "js-sys" -version = "0.3.66" +version = "0.3.69" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cee9c64da59eae3b50095c18d3e74f8b73c0b86d2792824ff01bbce68ba229ca" +checksum = "29c15563dc2726973df627357ce0c9ddddbea194836909d655df6a75d2cf296d" dependencies = [ "wasm-bindgen", ] @@ -1841,99 +1836,42 @@ dependencies = [ ] [[package]] -name = "lexical" -version = "6.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c7aefb36fd43fef7003334742cbf77b243fcd36418a1d1bdd480d613a67968f6" -dependencies = [ - "lexical-core", -] - -[[package]] -name = "lexical-core" -version = "0.8.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2cde5de06e8d4c2faabc400238f9ae1c74d5412d03a7bd067645ccbc47070e46" -dependencies = [ - "lexical-parse-float", - "lexical-parse-integer", - "lexical-util", - "lexical-write-float", - "lexical-write-integer", -] - -[[package]] -name = "lexical-parse-float" -version = "0.8.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "683b3a5ebd0130b8fb52ba0bdc718cc56815b6a097e28ae5a6997d0ad17dc05f" -dependencies = [ - "lexical-parse-integer", - "lexical-util", - "static_assertions", -] - -[[package]] -name = "lexical-parse-integer" -version = "0.8.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d0994485ed0c312f6d965766754ea177d07f9c00c9b82a5ee62ed5b47945ee9" -dependencies = [ - "lexical-util", - "static_assertions", -] - -[[package]] -name = "lexical-util" -version = "0.8.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5255b9ff16ff898710eb9eb63cb39248ea8a5bb036bea8085b1a767ff6c4e3fc" -dependencies = [ - "static_assertions", -] - -[[package]] -name = "lexical-write-float" -version = "0.8.5" +name = "libc" +version = "0.2.153" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "accabaa1c4581f05a3923d1b4cfd124c329352288b7b9da09e766b0668116862" -dependencies = [ - "lexical-util", - "lexical-write-integer", - "static_assertions", -] +checksum = "9c198f91728a82281a64e1f4f9eeb25d82cb32a5de251c6bd1b5154d63a8e7bd" [[package]] -name = "lexical-write-integer" -version = "0.8.5" +name = "libloading" +version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e1b6f3d1f4422866b68192d62f77bc5c700bee84f3069f2469d7bc8c77852446" +checksum = "0c2a198fb6b0eada2a8df47933734e6d35d350665a33a3593d7164fa52c75c19" dependencies = [ - "lexical-util", - "static_assertions", + "cfg-if", + "windows-targets 0.52.5", ] [[package]] -name = "libc" -version = "0.2.151" +name = "libm" +version = "0.2.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "302d7ab3130588088d277783b1e2d2e10c9e9e4a16dd9050e6ec93fb3e7048f4" +checksum = "4ec2a862134d2a7d32d7983ddcdd1c4923530833c9f2ea1a44fc5fa473989058" [[package]] -name = "libloading" -version = "0.7.4" +name = "libz-ng-sys" +version = "1.1.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b67380fd3b2fbe7527a606e18729d21c6f3951633d0500574c4dc22d2d638b9f" +checksum = "c6409efc61b12687963e602df8ecf70e8ddacf95bc6576bcf16e3ac6328083c5" dependencies = [ - "cfg-if", - "winapi", + "cmake", + "libc", ] [[package]] name = "libz-sys" -version = "1.1.12" +version = "1.1.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d97137b25e321a73eef1418d1d5d2eda4d77e12813f8e6dead84bc52c5870a7b" +checksum = "5e143b5e666b2695d28f6bca6497720813f699c9602dd7f5cac91008b8ada7f9" dependencies = [ "cc", "pkg-config", @@ -1942,9 +1880,9 @@ dependencies = [ [[package]] name = "linux-raw-sys" -version = "0.4.12" +version = "0.4.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4cd1a83af159aa67994778be9070f0ae1bd732942279cabb14f86f986a21456" +checksum = "01cda141df6706de531b6c46c3a33ecca755538219bd484262fa09410c13539c" [[package]] name = "lock_api" @@ -1958,17 +1896,27 @@ dependencies = [ [[package]] name = "log" -version = "0.4.20" +version = "0.4.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5e6163cb8c49088c2c36f57875e58ccd8c87c7427f7fbd50ea6710b2f3f2e8f" +checksum = "90ed8c1e510134f979dbc4f070f87d4313098b704861a105fe34231c70a3901c" [[package]] name = "lru" -version = "0.10.1" +version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "718e8fae447df0c7e1ba7f5189829e63fd536945c8988d61444c19039f16b670" +checksum = "d3262e75e648fce39813cb56ac41f3c3e3f65217ebf3844d818d1f9398cfb0dc" dependencies = [ - "hashbrown 0.13.2", + "hashbrown 0.14.3", +] + +[[package]] +name = "lzma-rs" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "297e814c836ae64db86b36cf2a557ba54368d03f6afcd7d947c266692f71115e" +dependencies = [ + "byteorder", + "crc", ] [[package]] @@ -2009,28 +1957,19 @@ dependencies = [ [[package]] name = "memchr" -version = "2.6.4" +version = "2.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f665ee40bc4a3c5590afb1e9677db74a508659dfd71e126420da8274909a0167" +checksum = "6c8640c5d730cb13ebd907d8d04b52f55ac9a2eec55b440c8892f40d56c76c1d" [[package]] name = "memmap2" -version = "0.9.3" +version = "0.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "45fd3a57831bf88bc63f8cebc0cf956116276e97fef3966103e96416209f7c92" +checksum = "fe751422e4a8caa417e13c3ea66452215d7d63e19e604f4980461212f3ae1322" dependencies = [ "libc", ] -[[package]] -name = "memoffset" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a634b1c61a95585bd15607c6ab0c4e5b226e695ff2800ba0cdccddf208c406c" -dependencies = [ - "autocfg", -] - [[package]] name = "mime" version = "0.3.17" @@ -2045,9 +1984,9 @@ checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" [[package]] name = "miniz_oxide" -version = "0.7.1" +version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7810e0be55b428ada41041c41f32c9f1a42817901b4ccf45fa3d4b6561e74c7" +checksum = "9d811f3e15f28568be3407c8e7fdb6514c1cda3cb30683f15b6a1a1dc4ea14a7" dependencies = [ "adler", "simd-adler32", @@ -2055,20 +1994,19 @@ dependencies = [ [[package]] name = "mio" -version = "0.8.8" +version = "0.8.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "927a765cd3fc26206e66b296465fa9d3e5ab003e651c1b3c060e7956d96b19d2" +checksum = "a4a650543ca06a924e8b371db273b2756685faae30f8487da1b56505a8f78b0c" dependencies = [ "libc", - "wasi 0.11.0+wasi-snapshot-preview1", + "wasi", "windows-sys 0.48.0", ] [[package]] name = "mysql" -version = "24.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cfe2babc5f5b354eab9c0a0e40da3e69c4d77421c8b9b6ee03f97acc75bd7955" +version = "25.0.0" +source = "git+https://github.com/ZeWaka/rust-mysql-simple.git?tag=v25.0.0#826af9f85fa5f65d697a503e5b2e4b0f29b86828" dependencies = [ "bufstream", "bytes", @@ -2083,46 +2021,47 @@ dependencies = [ "once_cell", "pem", "percent-encoding", - "rustls", + "rustls 0.23.5", "rustls-pemfile", "serde", "serde_json", - "socket2 0.5.4", + "socket2", "twox-hash", "url", "webpki", - "webpki-roots 0.23.1", + "webpki-roots", ] [[package]] name = "mysql-common-derive" -version = "0.30.2" +version = "0.31.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56b0d8a0db9bf6d2213e11f2c701cb91387b0614361625ab7b9743b41aa4938f" +checksum = "afe0450cc9344afff34915f8328600ab5ae19260802a334d0f72d2d5bdda3bfe" dependencies = [ "darling", "heck", "num-bigint", - "proc-macro-crate 1.3.1", + "proc-macro-crate", "proc-macro-error", "proc-macro2", "quote", - "syn 2.0.42", + "syn 2.0.60", "termcolor", "thiserror", ] [[package]] name = "mysql_common" -version = "0.30.6" +version = "0.32.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57349d5a326b437989b6ee4dc8f2f34b0cc131202748414712a8e7d98952fc8c" +checksum = "0ccdc1fe2bb3ef97e07ba4397327ed45509a1e2e499e2f8265243879cbc7313c" dependencies = [ - "base64", + "base64 0.21.7", "bigdecimal", "bindgen", - "bitflags 2.4.1", + "bitflags 2.5.0", "bitvec", + "btoi", "byteorder", "bytes", "cc", @@ -2131,11 +2070,10 @@ dependencies = [ "flate2", "frunk", "lazy_static", - "lexical", "mysql-common-derive", "num-bigint", "num-traits", - "rand 0.8.5", + "rand", "regex", "rust_decimal", "saturating", @@ -2148,6 +2086,7 @@ dependencies = [ "thiserror", "time", "uuid", + "zstd", ] [[package]] @@ -2165,7 +2104,7 @@ version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6a51313c5820b0b02bd422f4b44776fbf47961755c74ce64afc73bfad10226c3" dependencies = [ - "getrandom 0.2.11", + "getrandom", ] [[package]] @@ -2194,12 +2133,12 @@ checksum = "650eef8c711430f1a879fdd01d4745a7deea475becfb90269c06775983bbf086" [[package]] name = "noise" -version = "0.8.2" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ba869e17168793186c10ca82c7079a4ffdeac4f1a7d9e755b9491c028180e40" +checksum = "6da45c8333f2e152fc665d78a380be060eb84fad8ca4c9f7ac8ca29216cff0cc" dependencies = [ "num-traits", - "rand 0.7.3", + "rand", "rand_xorshift", ] @@ -2225,31 +2164,25 @@ dependencies = [ ] [[package]] -name = "num-integer" -version = "0.1.45" +name = "num-conv" +version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "225d3389fb3509a24c93f5c29eb6bde2586b98d9f016636dff58d7c6f7569cd9" -dependencies = [ - "autocfg", - "num-traits", -] +checksum = "51d515d32fb182ee37cda2ccdcb92950d6a3c2893aa280e540671c2cd0f3b1d9" [[package]] -name = "num-rational" -version = "0.4.1" +name = "num-integer" +version = "0.1.46" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0638a1c9d0a3c0914158145bc76cff373a75a627e6ecbfb71cbe6f453a5a19b0" +checksum = "7969661fd2958a5cb096e56c8e1ad0444ac2bbcd0061bd28660485a44879858f" dependencies = [ - "autocfg", - "num-integer", "num-traits", ] [[package]] name = "num-traits" -version = "0.2.17" +version = "0.2.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "39e3200413f237f41ab11ad6d161bc7239c84dcb631773ccd7de3dfe4b5c267c" +checksum = "da0df0e5185db44f69b44f26786fe401b6c293d1907744beaa7fa62b2e5a517a" dependencies = [ "autocfg", ] @@ -2266,18 +2199,18 @@ dependencies = [ [[package]] name = "num_threads" -version = "0.1.6" +version = "0.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2819ce041d2ee131036f4fc9d6ae7ae125a3a40e97ba64d04fe799ad9dabbb44" +checksum = "5c7398b9c8b70908f6371f47ed36737907c87c52af34c268fed0bf0ceb92ead9" dependencies = [ "libc", ] [[package]] name = "object" -version = "0.32.1" +version = "0.32.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9cf5f9dd3933bd50a9e1f149ec995f39ae2c496d31fd772c1fd45ebc27e902b0" +checksum = "a6a622008b6e321afc04970976f62ee297fdbaa6f95318ca343e3eebb9648441" dependencies = [ "memchr", ] @@ -2290,11 +2223,11 @@ checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" [[package]] name = "openssl" -version = "0.10.57" +version = "0.10.64" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bac25ee399abb46215765b1cb35bc0212377e58a061560d8b29b024fd0430e7c" +checksum = "95a0481286a310808298130d22dd1fef0fa571e05a8f44ec801801e84b216b1f" dependencies = [ - "bitflags 2.4.1", + "bitflags 2.5.0", "cfg-if", "foreign-types", "libc", @@ -2311,7 +2244,7 @@ checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.42", + "syn 2.0.60", ] [[package]] @@ -2322,9 +2255,9 @@ checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" [[package]] name = "openssl-sys" -version = "0.9.93" +version = "0.9.102" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db4d56a4c0478783083cfafcc42493dd4a981d41669da64b4572a2a089b51b1d" +checksum = "c597637d56fbc83893a35eb0dd04b2b8e7a50c91e64e9493e398b5df4fb45fa2" dependencies = [ "cc", "libc", @@ -2355,26 +2288,15 @@ dependencies = [ "windows-targets 0.48.5", ] -[[package]] -name = "password-hash" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7676374caaee8a325c9e7a2ae557f216c5563a171d6997b0ef8a65af35147700" -dependencies = [ - "base64ct", - "rand_core 0.6.4", - "subtle", -] - [[package]] name = "pathfinding" -version = "4.8.0" +version = "4.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f6f4a3f5089b981000cb50ec24320faf7a19649a45e8730e4adf49f78f066528" +checksum = "f0a21c30f03223ae4a4c892f077b3189133689b8a659a84372f8422384ce94c9" dependencies = [ "deprecate-until", "fixedbitset", - "indexmap 2.1.0", + "indexmap", "integer-sqrt", "num-traits", "rustc-hash", @@ -2383,29 +2305,21 @@ dependencies = [ [[package]] name = "pbkdf2" -version = "0.11.0" +version = "0.12.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "83a0692ec44e4cf1ef28ca317f14f8f07da2d95ec3fa01f86e4467b725e60917" +checksum = "f8ed6a7761f76e3b9f92dfb0a60a6a6477c61024b775147ff0973a02653abaf2" dependencies = [ "digest", "hmac", - "password-hash", - "sha2", ] -[[package]] -name = "peeking_take_while" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "19b17cddbe7ec3f8bc800887bab5e717348c95ea2ca0b1bf0837fb964dc67099" - [[package]] name = "pem" -version = "2.0.1" +version = "3.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6b13fe415cdf3c8e44518e18a7c95a13431d9bdf6d15367d82b23c377fdd441a" +checksum = "8e459365e590736a54c3fa561947c84837534b8e9af6fc5bf781307e82658fae" dependencies = [ - "base64", + "base64 0.22.0", "serde", ] @@ -2441,7 +2355,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5d5285893bb5eb82e6aaf5d59ee909a06a16737a8970984dd7746ba9283498d6" dependencies = [ "phf_shared 0.10.0", - "rand 0.8.5", + "rand", ] [[package]] @@ -2451,7 +2365,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "48e4cc64c2ad9ebe670cb8fd69dd50ae301650392e81c05f9bfcb2d5bdbc24b0" dependencies = [ "phf_shared 0.11.2", - "rand 0.8.5", + "rand", ] [[package]] @@ -2472,11 +2386,31 @@ dependencies = [ "siphasher", ] +[[package]] +name = "pin-project" +version = "1.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6bf43b791c5b9e34c3d182969b4abb522f9343702850a2e57f460d00d09b4b3" +dependencies = [ + "pin-project-internal", +] + +[[package]] +name = "pin-project-internal" +version = "1.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2f38a4412a78282e09a2cf38d195ea5420d15ba0602cb375210efbc877243965" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.60", +] + [[package]] name = "pin-project-lite" -version = "0.2.13" +version = "0.2.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8afb450f006bf6385ca15ef45d71d2288452bc3683ce2e2cacc0d18e4be60b58" +checksum = "bda66fc9667c18cb2758a2ac84d1167245054bcf85d5d1aaa6923f45801bdd02" [[package]] name = "pin-utils" @@ -2486,15 +2420,15 @@ checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" [[package]] name = "pkg-config" -version = "0.3.28" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "69d3587f8a9e599cc7ec2c00e331f71c4e69a5f9a4b8a6efd5b07466b9736f9a" +checksum = "d231b230927b5e4ad203db57bbcbee2802f6bce620b1e4a9024a07d94e2907ec" [[package]] name = "png" -version = "0.17.10" +version = "0.17.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd75bf2d8dd3702b9707cdbc56a5b9ef42cec752eb8b3bafc01234558442aa64" +checksum = "06e4b0d3d1312775e782c86c91a111aa1f910cbb65e1337f9975b5f9a554b5e1" dependencies = [ "bitflags 1.3.2", "crc32fast", @@ -2523,21 +2457,11 @@ checksum = "925383efa346730478fb4838dbe9137d2a47675ad789c546d150a6e1dd4ab31c" [[package]] name = "proc-macro-crate" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d6ea3c4595b96363c13943497db34af4460fb474a95c43f4446ad341b8c9785" -dependencies = [ - "toml 0.5.11", -] - -[[package]] -name = "proc-macro-crate" -version = "1.3.1" +version = "3.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f4c021e1093a56626774e81216a4ce732a735e5bad4868a03f3ed65ca0c3919" +checksum = "6d37c51ca738a55da99dc0c4a34860fd675453b8b36209178c2249bb13651284" dependencies = [ - "once_cell", - "toml_edit 0.19.15", + "toml_edit 0.21.1", ] [[package]] @@ -2566,18 +2490,18 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.71" +version = "1.0.81" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75cb1540fadbd5b8fbccc4dddad2734eba435053f725621c070711a14bb5f4b8" +checksum = "3d1597b0c024618f09a9c3b8655b7e430397a36d23fdafec26d6965e9eec3eba" dependencies = [ "unicode-ident", ] [[package]] name = "prodash" -version = "26.2.2" +version = "28.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "794b5bf8e2d19b53dcdcec3e4bba628e20f5b6062503ba89281fa7037dd7bbcf" +checksum = "744a264d26b88a6a7e37cbad97953fa233b94d585236310bcbc88474b4092d79" [[package]] name = "ptr_meta" @@ -2601,9 +2525,9 @@ dependencies = [ [[package]] name = "quote" -version = "1.0.33" +version = "1.0.36" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5267fca4496028628a95160fc423a33e8b2e6af8a5302579e322e4b520293cae" +checksum = "0fa76aaf39101c457836aec0ce2316dbdc3ab723cdda1c6bd4e6ad4208acaca7" dependencies = [ "proc-macro2", ] @@ -2614,19 +2538,6 @@ version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dc33ff2d4973d518d823d61aa239014831e521c75da58e3df4840d3f47749d09" -[[package]] -name = "rand" -version = "0.7.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a6b1679d49b24bbfe0c803429aa1874472f50d9b363131f0e89fc356b544d03" -dependencies = [ - "getrandom 0.1.16", - "libc", - "rand_chacha 0.2.2", - "rand_core 0.5.1", - "rand_hc", -] - [[package]] name = "rand" version = "0.8.5" @@ -2634,18 +2545,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" dependencies = [ "libc", - "rand_chacha 0.3.1", - "rand_core 0.6.4", -] - -[[package]] -name = "rand_chacha" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f4c8ed856279c9737206bf725bf36935d8666ead7aa69b52be55af369d193402" -dependencies = [ - "ppv-lite86", - "rand_core 0.5.1", + "rand_chacha", + "rand_core", ] [[package]] @@ -2655,16 +2556,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" dependencies = [ "ppv-lite86", - "rand_core 0.6.4", -] - -[[package]] -name = "rand_core" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90bde5296fc891b0cef12a6d03ddccc162ce7b2aff54160af9338f8d40df6d19" -dependencies = [ - "getrandom 0.1.16", + "rand_core", ] [[package]] @@ -2673,16 +2565,7 @@ version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" dependencies = [ - "getrandom 0.2.11", -] - -[[package]] -name = "rand_hc" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca3129af7b92a17112d59ad498c6f81eaf463253766b90396d39ea7a39d6613c" -dependencies = [ - "rand_core 0.5.1", + "getrandom", ] [[package]] @@ -2691,7 +2574,7 @@ version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "59cad018caf63deb318e5a4586d99a24424a364f40f1e5778c29aca23f4fc73e" dependencies = [ - "rand_core 0.6.4", + "rand_core", ] [[package]] @@ -2700,23 +2583,23 @@ version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cf2890aaef0aa82719a50e808de264f9484b74b442e1a3a0e5ee38243ac40bdb" dependencies = [ - "rand_core 0.6.4", + "rand_core", ] [[package]] name = "rand_xorshift" -version = "0.2.0" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77d416b86801d23dde1aa643023b775c3a462efc0ed96443add11546cdf1dca8" +checksum = "d25bf25ec5ae4a3f1b92f929810509a2f53d7dca2f50b794ff57e3face536c8f" dependencies = [ - "rand_core 0.5.1", + "rand_core", ] [[package]] name = "rayon" -version = "1.8.0" +version = "1.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c27db03db7734835b3f53954b534c91069375ce6ccaa2e065441e07d9b6cdb1" +checksum = "b418a60154510ca1a002a752ca9714984e21e4241e804d32555251faf8b78ffa" dependencies = [ "either", "rayon-core", @@ -2724,9 +2607,9 @@ dependencies = [ [[package]] name = "rayon-core" -version = "1.12.0" +version = "1.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ce3fb6ad83f861aac485e76e1985cd109d9a3713802152be56c3b1f0e0658ed" +checksum = "1465873a3dfdaa8ae7cb14b4383657caab0b3e8a0aa9ae8e04b044854c8dfce2" dependencies = [ "crossbeam-deque", "crossbeam-utils", @@ -2734,16 +2617,16 @@ dependencies = [ [[package]] name = "redis" -version = "0.24.0" +version = "0.25.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c580d9cbbe1d1b479e8d67cf9daf6a62c957e6846048408b80b43ac3f6af84cd" +checksum = "6472825949c09872e8f2c50bde59fcefc17748b6be5c90fd67cd8b4daca73bfd" dependencies = [ "combine", "itoa", "percent-encoding", "ryu", "sha1_smol", - "socket2 0.4.10", + "socket2", "url", ] @@ -2758,64 +2641,59 @@ dependencies = [ [[package]] name = "regex" -version = "1.9.5" +version = "1.10.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "697061221ea1b4a94a624f67d0ae2bfe4e22b8a17b6a192afb11046542cc8c47" +checksum = "c117dbdfde9c8308975b6a18d71f3f385c89461f7b3fb054288ecf2a2058ba4c" dependencies = [ "aho-corasick", "memchr", - "regex-automata 0.3.8", + "regex-automata", "regex-syntax", ] [[package]] name = "regex-automata" -version = "0.3.8" +version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c2f401f4955220693b56f8ec66ee9c78abffd8d1c4f23dc41a23839eb88f0795" +checksum = "86b83b8b9847f9bf95ef68afb0b8e6cdb80f498442f5179a29fad448fcc1eaea" dependencies = [ "aho-corasick", "memchr", "regex-syntax", ] -[[package]] -name = "regex-automata" -version = "0.4.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f804c7828047e88b2d32e2d7fe5a105da8ee3264f01902f796c8e067dc2483f" - [[package]] name = "regex-syntax" -version = "0.7.5" +version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dbb5fb1acd8a1a18b3dd5be62d25485eb770e05afb408a9627d14d451bae12da" +checksum = "adad44e29e4c806119491a7f06f03de4d1af22c3a680dd47f1e6e179439d1f56" [[package]] name = "rend" -version = "0.4.1" +version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a2571463863a6bd50c32f94402933f03457a3fbaf697a707c5be741e459f08fd" +checksum = "71fe3824f5629716b1589be05dacd749f6aa084c87e00e016714a8cdfccc997c" dependencies = [ "bytecheck", ] [[package]] name = "reqwest" -version = "0.11.23" +version = "0.12.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "37b1ae8d9ac08420c66222fb9096fc5de435c3c48542bc5336c51892cffafb41" +checksum = "566cafdd92868e0939d3fb961bd0dc25fcfaaed179291093b3d43e6b3150ea10" dependencies = [ - "base64", + "base64 0.22.0", "bytes", - "encoding_rs", + "futures-channel", "futures-core", "futures-util", - "h2", "http", "http-body", + "http-body-util", "hyper", "hyper-rustls", + "hyper-util", "ipnet", "js-sys", "log", @@ -2823,12 +2701,13 @@ dependencies = [ "once_cell", "percent-encoding", "pin-project-lite", - "rustls", + "rustls 0.22.4", "rustls-pemfile", + "rustls-pki-types", "serde", "serde_json", "serde_urlencoded", - "system-configuration", + "sync_wrapper", "tokio", "tokio-rustls", "tower-service", @@ -2836,30 +2715,30 @@ dependencies = [ "wasm-bindgen", "wasm-bindgen-futures", "web-sys", - "webpki-roots 0.25.2", + "webpki-roots", "winreg", ] [[package]] name = "ring" -version = "0.16.20" +version = "0.17.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3053cf52e236a3ed746dfc745aa9cacf1b791d846bdaf412f60a8d7d6e17c8fc" +checksum = "c17fa4cb658e3583423e915b9f3acc01cceaee1860e33d59ebae66adc3a2dc0d" dependencies = [ "cc", + "cfg-if", + "getrandom", "libc", - "once_cell", - "spin 0.5.2", + "spin", "untrusted", - "web-sys", - "winapi", + "windows-sys 0.52.0", ] [[package]] name = "rkyv" -version = "0.7.43" +version = "0.7.44" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "527a97cdfef66f65998b5f3b637c26f5a5ec09cc52a3f9932313ac645f4190f5" +checksum = "5cba464629b3394fc4dbc6f940ff8f5b4ff5c7aef40f29166fd4ad12acbc99c0" dependencies = [ "bitvec", "bytecheck", @@ -2875,9 +2754,9 @@ dependencies = [ [[package]] name = "rkyv_derive" -version = "0.7.43" +version = "0.7.44" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5c462a1328c8e67e4d6dbad1eb0355dd43e8ab432c6e227a43657f16ade5033" +checksum = "a7dddfff8de25e6f62b9d64e6e432bf1c6736c57d20323e15ee10435fbda7c65" dependencies = [ "proc-macro2", "quote", @@ -2886,11 +2765,11 @@ dependencies = [ [[package]] name = "rust-g" -version = "3.1.0" +version = "3.2.0" dependencies = [ "aho-corasick", "ammonia", - "base64", + "base64 0.22.0", "chrono", "const-random", "dashmap", @@ -2910,7 +2789,7 @@ dependencies = [ "pathfinding", "percent-encoding", "png", - "rand 0.8.5", + "rand", "rayon", "redis", "regex", @@ -2920,7 +2799,8 @@ dependencies = [ "sha-1", "sha2", "thiserror", - "toml 0.8.8", + "toml", + "tracy_full", "twox-hash", "url", "zip", @@ -2928,15 +2808,15 @@ dependencies = [ [[package]] name = "rust_decimal" -version = "1.32.0" +version = "1.35.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4c4216490d5a413bc6d10fa4742bd7d4955941d062c0ef873141d6b0e7b30fd" +checksum = "1790d1c4c0ca81211399e0e0af16333276f375209e71a37b67698a373db5b47a" dependencies = [ "arrayvec", "borsh", "bytes", "num-traits", - "rand 0.8.5", + "rand", "rkyv", "serde", "serde_json", @@ -2954,13 +2834,22 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" +[[package]] +name = "rustc_version" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366" +dependencies = [ + "semver", +] + [[package]] name = "rustix" -version = "0.38.28" +version = "0.38.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72e572a5e8ca657d7366229cdde4bd14c4eb5499a9573d4d366fe1b599daa316" +checksum = "65e04861e65f21776e67888bfbea442b3642beaa0138fdb1dd7a84a52dffdb89" dependencies = [ - "bitflags 2.4.1", + "bitflags 2.5.0", "errno", "libc", "linux-raw-sys", @@ -2969,50 +2858,65 @@ dependencies = [ [[package]] name = "rustls" -version = "0.21.7" +version = "0.22.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cd8d6c9f025a446bc4d18ad9632e69aec8f287aa84499ee335599fabd20c3fd8" +checksum = "bf4ef73721ac7bcd79b2b315da7779d8fc09718c6b3d2d1b2d94850eb8c18432" dependencies = [ "log", "ring", - "rustls-webpki 0.101.6", - "sct", + "rustls-pki-types", + "rustls-webpki", + "subtle", + "zeroize", ] [[package]] -name = "rustls-pemfile" -version = "1.0.3" +name = "rustls" +version = "0.23.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d3987094b1d07b653b7dfdc3f70ce9a1da9c51ac18c1b06b662e4f9a0e9f4b2" +checksum = "afabcee0551bd1aa3e18e5adbf2c0544722014b899adb31bd186ec638d3da97e" dependencies = [ - "base64", + "log", + "once_cell", + "ring", + "rustls-pki-types", + "rustls-webpki", + "subtle", + "zeroize", ] [[package]] -name = "rustls-webpki" -version = "0.100.3" +name = "rustls-pemfile" +version = "2.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f6a5fc258f1c1276dfe3016516945546e2d5383911efc0fc4f1cdc5df3a4ae3" +checksum = "29993a25686778eb88d4189742cd713c9bce943bc54251a33509dc63cbacf73d" dependencies = [ - "ring", - "untrusted", + "base64 0.22.0", + "rustls-pki-types", ] +[[package]] +name = "rustls-pki-types" +version = "1.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ecd36cc4259e3e4514335c4a138c6b43171a8d61d8f5c9348f9fc7529416f247" + [[package]] name = "rustls-webpki" -version = "0.101.6" +version = "0.102.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c7d5dece342910d9ba34d259310cae3e0154b873b35408b787b59bce53d34fe" +checksum = "faaa0a62740bedb9b2ef5afa303da42764c012f743917351dc9a237ea1663610" dependencies = [ "ring", + "rustls-pki-types", "untrusted", ] [[package]] name = "ryu" -version = "1.0.16" +version = "1.0.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f98d2aa92eebf49b69786be48e4477826b256916e84a57ff2a4f21923b48eb4c" +checksum = "e86697c916019a8588c99b5fac3cead74ec0b4b819707a682fd4d23fa0ce1ba1" [[package]] name = "same-file" @@ -3031,11 +2935,11 @@ checksum = "ece8e78b2f38ec51c51f5d475df0a7187ba5111b2a28bdc761ee05b075d40a71" [[package]] name = "schannel" -version = "0.1.22" +version = "0.1.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c3733bf4cf7ea0880754e19cb5a462007c4a8c1914bff372ccc95b464f1df88" +checksum = "fbc91545643bcf3a0bbb6569265615222618bdf33ce4ffbbd13c4bbd4c093534" dependencies = [ - "windows-sys 0.48.0", + "windows-sys 0.52.0", ] [[package]] @@ -3044,16 +2948,6 @@ version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" -[[package]] -name = "sct" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d53dcdb7c9f8158937a7981b48accfd39a43af418591a5d008c7b22b5e1b7ca4" -dependencies = [ - "ring", - "untrusted", -] - [[package]] name = "seahash" version = "4.1.0" @@ -3062,9 +2956,9 @@ checksum = "1c107b6f4780854c8b126e228ea8869f4d7b71260f962fefb57b996b8959ba6b" [[package]] name = "security-framework" -version = "2.9.2" +version = "2.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05b64fb303737d99b81884b2c63433e9ae28abebe5eb5045dcdd175dc2ecf4de" +checksum = "770452e37cad93e0a50d5abc3990d2bc351c36d0328f86cefec2f2fb206eaef6" dependencies = [ "bitflags 1.3.2", "core-foundation", @@ -3075,9 +2969,9 @@ dependencies = [ [[package]] name = "security-framework-sys" -version = "2.9.1" +version = "2.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e932934257d3b408ed8f30db49d85ea163bfe74961f017f405b025af298f0c7a" +checksum = "41f3cc463c0ef97e11c3461a9d3787412d30e8e7eb907c79180c4a57bf7c04ef" dependencies = [ "core-foundation-sys", "libc", @@ -3085,35 +2979,35 @@ dependencies = [ [[package]] name = "semver" -version = "1.0.20" +version = "1.0.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "836fa6a3e1e547f9a2c4040802ec865b5d85f4014efe00555d7090a3dcaa1090" +checksum = "92d43fe69e652f3df9bdc2b85b2854a0825b86e4fb76bc44d945137d053639ca" [[package]] name = "serde" -version = "1.0.193" +version = "1.0.198" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "25dd9975e68d0cb5aa1120c288333fc98731bd1dd12f561e468ea4728c042b89" +checksum = "9846a40c979031340571da2545a4e5b7c4163bdae79b301d5f86d03979451fcc" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.193" +version = "1.0.198" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43576ca501357b9b071ac53cdc7da8ef0cbd9493d8df094cd821777ea6e894d3" +checksum = "e88edab869b01783ba905e7d0153f9fc1a6505a96e4ad3018011eedb838566d9" dependencies = [ "proc-macro2", "quote", - "syn 2.0.42", + "syn 2.0.60", ] [[package]] name = "serde_json" -version = "1.0.108" +version = "1.0.116" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d1c7e3eac408d115102c4c24ad393e0821bb3a5df4d506a80f85f7a742a526b" +checksum = "3e17db7126d17feb94eb3fad46bf1a96b034e8aacbc2e775fe81505f8b0b2813" dependencies = [ "itoa", "ryu", @@ -3182,9 +3076,9 @@ dependencies = [ [[package]] name = "shlex" -version = "1.2.0" +version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a7cee0529a6d40f580e7a5e6c495c8fbfe21b7b52795ed4bb5e62cdf92bc6380" +checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" [[package]] name = "simd-adler32" @@ -3215,36 +3109,20 @@ dependencies = [ [[package]] name = "smallvec" -version = "1.11.2" +version = "1.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4dccd0940a2dcdf68d092b8cbab7dc0ad8fa938bf95787e1b916b0e3d0e8e970" +checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67" [[package]] name = "socket2" -version = "0.4.10" +version = "0.5.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f7916fc008ca5542385b89a3d3ce689953c143e9304a9bf8beec1de48994c0d" +checksum = "05ffd9c0a93b7543e062e759284fcf5f5e3b098501104bfbdde4d404db792871" dependencies = [ "libc", - "winapi", -] - -[[package]] -name = "socket2" -version = "0.5.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4031e820eb552adee9295814c0ced9e5cf38ddf1e8b7d566d6de8e2538ea989e" -dependencies = [ - "libc", - "windows-sys 0.48.0", + "windows-sys 0.52.0", ] -[[package]] -name = "spin" -version = "0.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e63cff320ae2c57904679ba7cb63280a3dc4613885beafb148ee7bf9aa9042d" - [[package]] name = "spin" version = "0.9.8" @@ -3321,9 +3199,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.42" +version = "2.0.60" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b7d0a2c048d661a1a59fcd7355baa232f7ed34e0ee4df2eef3c1c1c0d3852d8" +checksum = "909518bc7b1c9b779f1bbf07f2929d35af9f0f37e47c6e9ef7f9dddc1e1821f3" dependencies = [ "proc-macro2", "quote", @@ -3331,25 +3209,22 @@ dependencies = [ ] [[package]] -name = "system-configuration" -version = "0.5.1" +name = "syn_derive" +version = "0.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba3a3adc5c275d719af8cb4272ea1c4a6d668a777f37e115f6d11ddbc1c8e0e7" +checksum = "1329189c02ff984e9736652b1631330da25eaa6bc639089ed4915d25446cbe7b" dependencies = [ - "bitflags 1.3.2", - "core-foundation", - "system-configuration-sys", + "proc-macro-error", + "proc-macro2", + "quote", + "syn 2.0.60", ] [[package]] -name = "system-configuration-sys" -version = "0.5.0" +name = "sync_wrapper" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a75fb188eb626b924683e3b95e3a48e63551fcfb51949de2f06a9d91dbee93c9" -dependencies = [ - "core-foundation-sys", - "libc", -] +checksum = "2047c6ded9c721764247e62cd3b03c09ffc529b2ba5b10ec482ae507a4a70160" [[package]] name = "tap" @@ -3359,15 +3234,14 @@ checksum = "55937e1799185b12863d447f42597ed69d9928686b8d88a1df17376a097d8369" [[package]] name = "tempfile" -version = "3.8.1" +version = "3.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ef1adac450ad7f4b3c28589471ade84f25f731a7a0fe30d71dfa9f60fd808e5" +checksum = "85b77fafb263dd9d05cbeac119526425676db3784113aa9295c88498cbf8bff1" dependencies = [ "cfg-if", "fastrand", - "redox_syscall", "rustix", - "windows-sys 0.48.0", + "windows-sys 0.52.0", ] [[package]] @@ -3383,42 +3257,43 @@ dependencies = [ [[package]] name = "termcolor" -version = "1.3.0" +version = "1.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6093bad37da69aab9d123a8091e4be0aa4a03e4d601ec641c327398315f62b64" +checksum = "06794f8f6c5c898b3275aebefa6b8a1cb24cd2c6c79397ab15774837a0bc5755" dependencies = [ "winapi-util", ] [[package]] name = "thiserror" -version = "1.0.51" +version = "1.0.59" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f11c217e1416d6f036b870f14e0413d480dbf28edbee1f877abaf0206af43bb7" +checksum = "f0126ad08bff79f29fc3ae6a55cc72352056dfff61e3ff8bb7129476d44b23aa" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.51" +version = "1.0.59" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "01742297787513b79cf8e29d1056ede1313e2420b7b3b15d0a768b4921f549df" +checksum = "d1cd413b5d558b4c5bf3680e324a6fa5014e7b7c067a51e69dbdf47eb7148b66" dependencies = [ "proc-macro2", "quote", - "syn 2.0.42", + "syn 2.0.60", ] [[package]] name = "time" -version = "0.3.31" +version = "0.3.36" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f657ba42c3f86e7680e53c8cd3af8abbe56b5491790b46e22e19c0d57463583e" +checksum = "5dfd88e563464686c916c7e46e623e520ddc6d79fa6641390f2e3fa86e83e885" dependencies = [ "deranged", "itoa", "libc", + "num-conv", "num_threads", "powerfmt", "serde", @@ -3434,10 +3309,11 @@ checksum = "ef927ca75afb808a4d64dd374f00a2adf8d0fcff8e7b184af886c3c87ec4a3f3" [[package]] name = "time-macros" -version = "0.2.16" +version = "0.2.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26197e33420244aeb70c3e8c78376ca46571bc4e701e4791c2cd9f57dcb3a43f" +checksum = "3f252a68540fde3a3877aeea552b832b40ab9a69e318efd078774a01ddee1ccf" dependencies = [ + "num-conv", "time-core", ] @@ -3467,9 +3343,9 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.32.0" +version = "1.37.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "17ed6077ed6cd6c74735e21f37eb16dc3935f96878b1fe961074089cc80893f9" +checksum = "1adbebffeca75fcfd058afa480fb6c0b81e165a0323f9c9d39c9697e37c46787" dependencies = [ "backtrace", "bytes", @@ -3477,53 +3353,31 @@ dependencies = [ "mio", "num_cpus", "pin-project-lite", - "socket2 0.5.4", + "socket2", "windows-sys 0.48.0", ] [[package]] name = "tokio-rustls" -version = "0.24.1" +version = "0.25.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c28327cf380ac148141087fbfb9de9d7bd4e84ab5d2c28fbc911d753de8a7081" +checksum = "775e0c0f0adb3a2f22a00c4745d728b479985fc15ee7ca6a2608388c5569860f" dependencies = [ - "rustls", - "tokio", -] - -[[package]] -name = "tokio-util" -version = "0.7.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d68074620f57a0b21594d9735eb2e98ab38b17f80d3fcb189fca266771ca60d" -dependencies = [ - "bytes", - "futures-core", - "futures-sink", - "pin-project-lite", + "rustls 0.22.4", + "rustls-pki-types", "tokio", - "tracing", -] - -[[package]] -name = "toml" -version = "0.5.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f4f7f0dd8d50a853a531c426359045b1998f04219d88799810762cd4ad314234" -dependencies = [ - "serde", ] [[package]] name = "toml" -version = "0.8.8" +version = "0.8.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1a195ec8c9da26928f773888e0742ca3ca1040c6cd859c919c9f59c1954ab35" +checksum = "e9dd1545e8208b4a5af1aa9bbd0b4cf7e9ea08fabc5d0a5c67fcaafa17433aa3" dependencies = [ "serde", "serde_spanned", "toml_datetime", - "toml_edit 0.21.0", + "toml_edit 0.22.12", ] [[package]] @@ -3537,28 +3391,50 @@ dependencies = [ [[package]] name = "toml_edit" -version = "0.19.15" +version = "0.21.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b5bb770da30e5cbfde35a2d7b9b8a2c4b8ef89548a7a6aeab5c9a576e3e7421" +checksum = "6a8534fd7f78b5405e860340ad6575217ce99f38d4d5c8f2442cb5ecb50090e1" dependencies = [ - "indexmap 2.1.0", + "indexmap", "toml_datetime", - "winnow", + "winnow 0.5.40", ] [[package]] name = "toml_edit" -version = "0.21.0" +version = "0.22.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d34d383cd00a163b4a5b85053df514d45bc330f6de7737edfe0a93311d1eaa03" +checksum = "d3328d4f68a705b2a4498da1d580585d39a6510f98318a2cec3018a7ec61ddef" dependencies = [ - "indexmap 2.1.0", + "indexmap", "serde", "serde_spanned", "toml_datetime", - "winnow", + "winnow 0.6.6", ] +[[package]] +name = "tower" +version = "0.4.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b8fa9be0de6cf49e536ce1851f987bd21a43b771b09473c3549a6c853db37c1c" +dependencies = [ + "futures-core", + "futures-util", + "pin-project", + "pin-project-lite", + "tokio", + "tower-layer", + "tower-service", + "tracing", +] + +[[package]] +name = "tower-layer" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c20c8dbed6283a09604c3e69b4b7eeb54e298b8a600d4d5ecb5ad39de609f1d0" + [[package]] name = "tower-service" version = "0.3.2" @@ -3567,29 +3443,49 @@ checksum = "b6bc1c9ce2b5135ac7f93c72918fc37feb872bdc6a5533a8b85eb4b86bfdae52" [[package]] name = "tracing" -version = "0.1.37" +version = "0.1.40" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ce8c33a8d48bd45d624a6e523445fd21ec13d3653cd51f681abf67418f54eb8" +checksum = "c3523ab5a71916ccf420eebdf5521fcef02141234bbc0b8a49f2fdc4544364ef" dependencies = [ - "cfg-if", + "log", "pin-project-lite", "tracing-core", ] [[package]] name = "tracing-core" -version = "0.1.31" +version = "0.1.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0955b8137a1df6f1a2e9a37d8a6656291ff0297c1a97c24e0d8425fe2312f79a" +checksum = "c06d3da6113f116aaee68e4d601191614c9053067f9ab7f6edbcb161237daa54" dependencies = [ "once_cell", ] +[[package]] +name = "tracy-client-sys" +version = "0.22.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9d104d610dfa9dd154535102cc9c6164ae1fa37842bc2d9e83f9ac82b0ae0882" +dependencies = [ + "cc", +] + +[[package]] +name = "tracy_full" +version = "1.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0f168899957a9ace9328f8f5110c13cc73f9156dcefc706407da1690a9d4aa0b" +dependencies = [ + "once_cell", + "rustc_version", + "tracy-client-sys", +] + [[package]] name = "try-lock" -version = "0.2.4" +version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3528ecfd12c466c6f163363caf2d02a71161dd5e1cc6ae7b34207ea2d42d81ed" +checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b" [[package]] name = "twox-hash" @@ -3598,10 +3494,16 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "97fee6b57c6a41524a810daee9286c02d7752c4253064d0b05472833a438f675" dependencies = [ "cfg-if", - "rand 0.8.5", + "rand", "static_assertions", ] +[[package]] +name = "typed-arena" +version = "2.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6af6ae20167a9ece4bcb41af5b80f8a1f1df981f6391189ce00fd257af04126a" + [[package]] name = "typenum" version = "1.17.0" @@ -3610,18 +3512,18 @@ checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825" [[package]] name = "uluru" -version = "3.0.0" +version = "3.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "794a32261a1f5eb6a4462c81b59cec87b5c27d5deea7dd1ac8fc781c41d226db" +checksum = "7c8a2469e56e6e5095c82ccd3afb98dad95f7af7929aab6d8ba8d6e0f73657da" dependencies = [ "arrayvec", ] [[package]] name = "unicode-bidi" -version = "0.3.14" +version = "0.3.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f2528f27a9eb2b21e69c95319b30bd0efd85d09c379741b0f78ea1d86be2416" +checksum = "08f95100a766bf4f8f28f90d77e0a5461bbdb219042e7679bebe79004fed8d75" [[package]] name = "unicode-bom" @@ -3637,18 +3539,18 @@ checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" [[package]] name = "unicode-normalization" -version = "0.1.22" +version = "0.1.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c5713f0fc4b5db668a2ac63cdb7bb4469d8c9fed047b1d0292cc7b0ce2ba921" +checksum = "a56d1686db2308d901306f92a263857ef59ea39678a5458e7cb17f01415101f5" dependencies = [ "tinyvec", ] [[package]] name = "untrusted" -version = "0.7.1" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a156c684c91ea7d62626509bce3cb4e1d9ed5c4d978f7b4352658f96a4c26b4a" +checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" [[package]] name = "url" @@ -3669,9 +3571,9 @@ checksum = "09cc8ee72d2a9becf2f2febe0205bbed8fc6615b7cb429ad062dc7b7ddd036a9" [[package]] name = "uuid" -version = "1.6.1" +version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e395fcf16a7a3d8127ec99782007af141946b4795001f876d54fb0d55978560" +checksum = "a183cf7feeba97b4dd1c0d46788634f6221d87fa961b305bed08c851829efcc0" [[package]] name = "vcpkg" @@ -3687,9 +3589,9 @@ checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" [[package]] name = "walkdir" -version = "2.4.0" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d71d857dc86794ca4c280d616f7da00d2dbfd8cd788846559a6813e6aa4b54ee" +checksum = "29790946404f91d9c5d06f9874efddea1dc06c5efe94541a7d6863108e3a5e4b" dependencies = [ "same-file", "winapi-util", @@ -3704,12 +3606,6 @@ dependencies = [ "try-lock", ] -[[package]] -name = "wasi" -version = "0.9.0+wasi-snapshot-preview1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cccddf32554fecc6acb585f82a32a72e28b48f8c4c1883ddfeeeaa96f7d8e519" - [[package]] name = "wasi" version = "0.11.0+wasi-snapshot-preview1" @@ -3718,9 +3614,9 @@ checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" [[package]] name = "wasm-bindgen" -version = "0.2.89" +version = "0.2.92" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ed0d4f68a3015cc185aff4db9506a015f4b96f95303897bfa23f846db54064e" +checksum = "4be2531df63900aeb2bca0daaaddec08491ee64ceecbee5076636a3b026795a8" dependencies = [ "cfg-if", "wasm-bindgen-macro", @@ -3728,24 +3624,24 @@ dependencies = [ [[package]] name = "wasm-bindgen-backend" -version = "0.2.89" +version = "0.2.92" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b56f625e64f3a1084ded111c4d5f477df9f8c92df113852fa5a374dbda78826" +checksum = "614d787b966d3989fa7bb98a654e369c762374fd3213d212cfc0251257e747da" dependencies = [ "bumpalo", "log", "once_cell", "proc-macro2", "quote", - "syn 2.0.42", + "syn 2.0.60", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-futures" -version = "0.4.37" +version = "0.4.42" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c02dbc21516f9f1f04f187958890d7e6026df8d16540b7ad9492bc34a67cea03" +checksum = "76bc14366121efc8dbb487ab05bcc9d346b3b5ec0eaa76e46594cabbe51762c0" dependencies = [ "cfg-if", "js-sys", @@ -3755,9 +3651,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.89" +version = "0.2.92" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0162dbf37223cd2afce98f3d0785506dcb8d266223983e4b5b525859e6e182b2" +checksum = "a1f8823de937b71b9460c0c34e25f3da88250760bec0ebac694b49997550d726" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -3765,28 +3661,28 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.89" +version = "0.2.92" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0eb82fcb7930ae6219a7ecfd55b217f5f0893484b7a13022ebb2b2bf20b5283" +checksum = "e94f17b526d0a461a191c78ea52bbce64071ed5c04c9ffe424dcb38f74171bb7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.42", + "syn 2.0.60", "wasm-bindgen-backend", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-shared" -version = "0.2.89" +version = "0.2.92" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ab9b36309365056cd639da3134bf87fa8f3d86008abf99e612384a6eecd459f" +checksum = "af190c94f2773fdb3729c55b007a722abb5384da03bc0986df4c289bf5567e96" [[package]] name = "web-sys" -version = "0.3.64" +version = "0.3.69" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b85cbef8c220a6abc02aefd892dfc0fc23afb1c6a426316ec33253a3877249b" +checksum = "77afa9a11836342370f4817622a2f0f418b134426d91a82dfb48f532d2ec13ef" dependencies = [ "js-sys", "wasm-bindgen", @@ -3794,9 +3690,9 @@ dependencies = [ [[package]] name = "webpki" -version = "0.22.1" +version = "0.22.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0e74f82d49d545ad128049b7e88f6576df2da6b02e9ce565c6f533be576957e" +checksum = "ed63aea5ce73d0ff405984102c42de94fc55a6b75765d621c65262469b3c9b53" dependencies = [ "ring", "untrusted", @@ -3804,19 +3700,13 @@ dependencies = [ [[package]] name = "webpki-roots" -version = "0.23.1" +version = "0.26.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b03058f88386e5ff5310d9111d53f48b17d732b401aeb83a8d5190f2ac459338" +checksum = "b3de34ae270483955a94f4b21bdaaeb83d508bb84a01435f393818edb0012009" dependencies = [ - "rustls-webpki 0.100.3", + "rustls-pki-types", ] -[[package]] -name = "webpki-roots" -version = "0.25.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "14247bb57be4f377dfb94c72830b8ce8fc6beac03cf4bf7b9732eadd414123fc" - [[package]] name = "winapi" version = "0.3.9" @@ -3848,22 +3738,13 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" -[[package]] -name = "windows" -version = "0.48.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e686886bc078bc1b0b600cac0147aadb815089b6e4da64016cbd754b6342700f" -dependencies = [ - "windows-targets 0.48.5", -] - [[package]] name = "windows-core" -version = "0.51.1" +version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1f8cf84f35d2db49a46868f947758c7a1138116f7fac3bc844f43ade1292e64" +checksum = "33ab640c8d7e35bf8ba19b884ba838ceb4fba93a4e8c65a9059d08afcfc683d9" dependencies = [ - "windows-targets 0.48.5", + "windows-targets 0.52.5", ] [[package]] @@ -3881,7 +3762,7 @@ version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" dependencies = [ - "windows-targets 0.52.0", + "windows-targets 0.52.5", ] [[package]] @@ -3901,17 +3782,18 @@ dependencies = [ [[package]] name = "windows-targets" -version = "0.52.0" +version = "0.52.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a18201040b24831fbb9e4eb208f8892e1f50a37feb53cc7ff887feb8f50e7cd" +checksum = "6f0713a46559409d202e70e28227288446bf7841d3211583a4b53e3f6d96e7eb" dependencies = [ - "windows_aarch64_gnullvm 0.52.0", - "windows_aarch64_msvc 0.52.0", - "windows_i686_gnu 0.52.0", - "windows_i686_msvc 0.52.0", - "windows_x86_64_gnu 0.52.0", - "windows_x86_64_gnullvm 0.52.0", - "windows_x86_64_msvc 0.52.0", + "windows_aarch64_gnullvm 0.52.5", + "windows_aarch64_msvc 0.52.5", + "windows_i686_gnu 0.52.5", + "windows_i686_gnullvm", + "windows_i686_msvc 0.52.5", + "windows_x86_64_gnu 0.52.5", + "windows_x86_64_gnullvm 0.52.5", + "windows_x86_64_msvc 0.52.5", ] [[package]] @@ -3922,9 +3804,9 @@ checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" [[package]] name = "windows_aarch64_gnullvm" -version = "0.52.0" +version = "0.52.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb7764e35d4db8a7921e09562a0304bf2f93e0a51bfccee0bd0bb0b666b015ea" +checksum = "7088eed71e8b8dda258ecc8bac5fb1153c5cffaf2578fc8ff5d61e23578d3263" [[package]] name = "windows_aarch64_msvc" @@ -3934,9 +3816,9 @@ checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" [[package]] name = "windows_aarch64_msvc" -version = "0.52.0" +version = "0.52.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bbaa0368d4f1d2aaefc55b6fcfee13f41544ddf36801e793edbbfd7d7df075ef" +checksum = "9985fd1504e250c615ca5f281c3f7a6da76213ebd5ccc9561496568a2752afb6" [[package]] name = "windows_i686_gnu" @@ -3946,9 +3828,15 @@ checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" [[package]] name = "windows_i686_gnu" -version = "0.52.0" +version = "0.52.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "88ba073cf16d5372720ec942a8ccbf61626074c6d4dd2e745299726ce8b89670" + +[[package]] +name = "windows_i686_gnullvm" +version = "0.52.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a28637cb1fa3560a16915793afb20081aba2c92ee8af57b4d5f28e4b3e7df313" +checksum = "87f4261229030a858f36b459e748ae97545d6f1ec60e5e0d6a3d32e0dc232ee9" [[package]] name = "windows_i686_msvc" @@ -3958,9 +3846,9 @@ checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" [[package]] name = "windows_i686_msvc" -version = "0.52.0" +version = "0.52.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ffe5e8e31046ce6230cc7215707b816e339ff4d4d67c65dffa206fd0f7aa7b9a" +checksum = "db3c2bf3d13d5b658be73463284eaf12830ac9a26a90c717b7f771dfe97487bf" [[package]] name = "windows_x86_64_gnu" @@ -3970,9 +3858,9 @@ checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" [[package]] name = "windows_x86_64_gnu" -version = "0.52.0" +version = "0.52.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d6fa32db2bc4a2f5abeacf2b69f7992cd09dca97498da74a151a3132c26befd" +checksum = "4e4246f76bdeff09eb48875a0fd3e2af6aada79d409d33011886d3e1581517d9" [[package]] name = "windows_x86_64_gnullvm" @@ -3982,9 +3870,9 @@ checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" [[package]] name = "windows_x86_64_gnullvm" -version = "0.52.0" +version = "0.52.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a657e1e9d3f514745a572a6846d3c7aa7dbe1658c056ed9c3344c4109a6949e" +checksum = "852298e482cd67c356ddd9570386e2862b5673c85bd5f88df9ab6802b334c596" [[package]] name = "windows_x86_64_msvc" @@ -3994,24 +3882,33 @@ checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" [[package]] name = "windows_x86_64_msvc" -version = "0.52.0" +version = "0.52.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dff9641d1cd4be8d1a070daf9e3773c5f67e78b4d9d42263020c057706765c04" +checksum = "bec47e5bfd1bff0eeaf6d8b485cc1074891a197ab4225d504cb7a1ab88b02bf0" [[package]] name = "winnow" -version = "0.5.30" +version = "0.5.40" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b5c3db89721d50d0e2a673f5043fc4722f76dcc352d7b1ab8b8288bed4ed2c5" +checksum = "f593a95398737aeed53e489c785df13f3618e41dbcd6718c6addbf1395aa6876" +dependencies = [ + "memchr", +] + +[[package]] +name = "winnow" +version = "0.6.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0c976aaaa0e1f90dbb21e9587cdaf1d9679a1cde8875c0d6bd83ab96a208352" dependencies = [ "memchr", ] [[package]] name = "winreg" -version = "0.50.0" +version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "524e57b2c537c0f9b1e69f1965311ec12182b4122e45035b1508cd24d2adadb1" +checksum = "a277a57398d4bfa075df44f501a17cfdf8542d224f0d36095a2adc7aee4ef0a5" dependencies = [ "cfg-if", "windows-sys 0.48.0", @@ -4026,50 +3923,91 @@ dependencies = [ "tap", ] +[[package]] +name = "zerocopy" +version = "0.7.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "74d4d3961e53fa4c9a25a8637fc2bfaf2595b3d3ae34875568a5cf64787716be" +dependencies = [ + "zerocopy-derive", +] + +[[package]] +name = "zerocopy-derive" +version = "0.7.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ce1b18ccd8e73a9321186f97e46f9f04b778851177567b1975109d26a08d2a6" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.60", +] + +[[package]] +name = "zeroize" +version = "1.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "525b4ec142c6b68a2d10f01f7bbf6755599ca3f81ea53b8431b7dd348f5fdb2d" + [[package]] name = "zip" -version = "0.6.6" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "760394e246e4c28189f19d488c058bf16f564016aefac5d32bb1f3b51d5e9261" +checksum = "f21968e6da56f847a155a89581ba846507afa14854e041f3053edb6ddd19f807" dependencies = [ "aes", + "arbitrary", "byteorder", "bzip2", "constant_time_eq", "crc32fast", "crossbeam-utils", + "deflate64", "flate2", "hmac", + "lzma-rs", "pbkdf2", "sha1", "time", + "zopfli", "zstd", ] +[[package]] +name = "zopfli" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c1f48f3508a3a3f2faee01629564400bc12260f6214a056d06a3aaaa6ef0736" +dependencies = [ + "crc32fast", + "log", + "simd-adler32", + "typed-arena", +] + [[package]] name = "zstd" -version = "0.11.2+zstd.1.5.2" +version = "0.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "20cc960326ece64f010d2d2107537f26dc589a6573a316bd5b1dba685fa5fde4" +checksum = "2d789b1514203a1120ad2429eae43a7bd32b90976a7bb8a05f7ec02fa88cc23a" dependencies = [ "zstd-safe", ] [[package]] name = "zstd-safe" -version = "5.0.2+zstd.1.5.2" +version = "7.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d2a5585e04f9eea4b2a3d1eca508c4dee9592a89ef6f450c11719da0726f4db" +checksum = "1cd99b45c6bc03a018c8b8a86025678c87e55526064e38f9df301989dce7ec0a" dependencies = [ - "libc", "zstd-sys", ] [[package]] name = "zstd-sys" -version = "2.0.9+zstd.1.5.5" +version = "2.0.10+zstd.1.5.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e16efa8a874a0481a574084d34cc26fdb3b99627480f785888deb6386506656" +checksum = "c253a4914af5bafc8fa8c86ee400827e83cf6ec01195ec1f1ed8441bf00d65aa" dependencies = [ "cc", "pkg-config", diff --git a/Cargo.toml b/Cargo.toml index dc8abcb0..872ad7e7 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "rust-g" edition = "2021" -version = "3.1.0" +version = "3.2.0" authors = [ "Bjorn Neergaard ", "Tad Hardesty ", @@ -25,26 +25,26 @@ debug = true thiserror = "1.0" flume = { version = "0.11", optional = true } chrono = { version = "0.4", optional = true } -base64 = { version = "0.21", optional = true } +base64 = { version = "0.22", optional = true } md-5 = { version = "0.10", optional = true } twox-hash = { version = "1.6", optional = true } -const-random = { version = "0.1.17", optional = true } +const-random = { version = "0.1.18", optional = true } sha-1 = { version = "0.10", optional = true } sha2 = { version = "0.10", optional = true } hex = { version = "0.4", optional = true } percent-encoding = { version = "2.3", optional = true } url-dep = { version = "2.5", package = "url", optional = true } png = { version = "0.17", optional = true } -image = { version = "0.24", optional = true, default-features = false, features = [ +image = { version = "0.25", optional = true, default-features = false, features = [ "png", ] } -gix = { version = "0.56", optional = true, default-features = false, features = [ +gix = { version = "0.62", optional = true, default-features = false, features = [ "revision", "max-performance-safe", ] } -noise = { version = "0.8", optional = true } -redis = { version = "0.24", optional = true } -reqwest = { version = "0.11", optional = true, default-features = false, features = [ +noise = { version = "0.9", optional = true } +redis = { version = "0.25", optional = true } +reqwest = { version = "0.12", optional = true, default-features = false, features = [ "blocking", "rustls-tls", ] } @@ -52,17 +52,18 @@ serde = { version = "1.0", optional = true, features = ["derive"] } serde_json = { version = "1.0", optional = true } lazy_static = { version = "1.4", optional = true } once_cell = { version = "1.19", optional = true } -mysql = { version = "24.0", default_features = false, optional = true } -dashmap = { version = "5.5", optional = true } -zip = { version = "0.6", optional = true } +mysql = { git = "https://github.com/ZeWaka/rust-mysql-simple.git", tag = "v25.0.0", default_features = false, optional = true } +dashmap = { version = "5.5", optional = true, features = ["rayon", "serde"] } +zip = { version = "1.1", optional = true } rand = { version = "0.8", optional = true } -toml-dep = { version = "0.8.8", package = "toml", optional = true } +toml-dep = { version = "0.8.12", package = "toml", optional = true } aho-corasick = { version = "1.1", optional = true } -rayon = { version = "1.8", optional = true } +rayon = { version = "1.10", optional = true } dbpnoise = { version = "0.1.2", optional = true } -pathfinding = { version = "4.4", optional = true } -num-integer = { version = "0.1.45", optional = true } -dmi = { version = "0.3.1", optional = true } +pathfinding = { version = "4.9", optional = true } +num-integer = { version = "0.1.46", optional = true } +dmi = { version = "0.3.5", optional = true } +tracy_full = { version = "1.7.1", optional = true } ammonia = { version = "4.0.0", optional = true } maplit = { version = "1.0.2", optional = true } @@ -92,6 +93,7 @@ all = [ "file", "git", "http", + "iconforge", "json", "log", "noise", @@ -138,6 +140,20 @@ hash = [ "serde", "serde_json", ] +iconforge = [ + "dashmap", + "dep:dmi", + "hash", + "image", + "jobs", + "once_cell", + "png", + "rayon", + "serde", + "serde_json", + "tracy_full", + "twox-hash", +] pathfinder = ["num-integer", "pathfinding", "serde", "serde_json"] redis_pubsub = ["flume", "redis", "serde", "serde_json"] redis_reliablequeue = ["flume", "redis", "serde", "serde_json"] diff --git a/README.md b/README.md index 3490242b..49757e38 100644 --- a/README.md +++ b/README.md @@ -106,6 +106,7 @@ The default features are: Additional features are: * batchnoise: Discrete Batched Perlin-like Noise, fast and multi-threaded - sent over once instead of having to query for every tile. * hash: Faster replacement for `md5`, support for SHA-1, SHA-256, and SHA-512. Requires OpenSSL on Linux. +* iconforge: A much faster replacement for the spritesheet generation system used by [/tg/station]. * pathfinder: An a* pathfinder used for finding the shortest path in a static node map. Not to be used for a non-static map. * redis_pubsub: Library for sending and receiving messages through Redis. * redis_reliablequeue: Library for using a reliable queue pattern through Redis. diff --git a/dmsrc/iconforge.dm b/dmsrc/iconforge.dm new file mode 100644 index 00000000..5f6d9bf0 --- /dev/null +++ b/dmsrc/iconforge.dm @@ -0,0 +1,59 @@ +/// Generates a spritesheet at: [file_path][spritesheet_name]_[size_id].png +/// The resulting spritesheet arranges icons in a random order, with the position being denoted in the "sprites" return value. +/// All icons have the same y coordinate, and their x coordinate is equal to `icon_width * position`. +/// +/// hash_icons is a boolean (0 or 1), and determines if the generator will spend time creating hashes for the output field dmi_hashes. +/// These hashes can be heplful for 'smart' caching (see rustg_iconforge_cache_valid), but require extra computation. +/// +/// Spritesheet will contain all sprites listed within "sprites". +/// "sprites" format: +/// list( +/// "sprite_name" = list( // <--- this list is a [SPRITE_OBJECT] +/// icon_file = 'icons/path_to/an_icon.dmi', +/// icon_state = "some_icon_state", +/// dir = SOUTH, +/// frame = 1, +/// transform = list([TRANSFORM_OBJECT], ...) +/// ), +/// ..., +/// ) +/// TRANSFORM_OBJECT format: +/// list("type" = RUSTG_ICONFORGE_BLEND_COLOR, "color" = "#ff0000", "blend_mode" = ICON_MULTIPLY) +/// list("type" = RUSTG_ICONFORGE_BLEND_ICON, "icon" = [SPRITE_OBJECT], "blend_mode" = ICON_OVERLAY) +/// list("type" = RUSTG_ICONFORGE_SCALE, "width" = 32, "height" = 32) +/// list("type" = RUSTG_ICONFORGE_CROP, "x1" = 1, "y1" = 1, "x2" = 32, "y2" = 32) // (BYOND icons index from 1,1 to the upper bound, inclusive) +/// +/// Returns a SpritesheetResult as JSON, containing fields: +/// list( +/// "sizes" = list("32x32", "64x64", ...), +/// "sprites" = list("sprite_name" = list("size_id" = "32x32", "position" = 0), ...), +/// "dmi_hashes" = list("icons/path_to/an_icon.dmi" = "d6325c5b4304fb03", ...), +/// "sprites_hash" = "a2015e5ff403fb5c", // This is the xxh64 hash of the INPUT field "sprites". +/// "error" = "[A string, empty if there were no errors.]" +/// ) +/// In the case of an unrecoverable panic from within Rust, this function ONLY returns a string containing the error. +#define rustg_iconforge_generate(file_path, spritesheet_name, sprites, hash_icons) RUSTG_CALL(RUST_G, "iconforge_generate")(file_path, spritesheet_name, sprites, "[hash_icons]") +/// Returns a job_id for use with rustg_iconforge_check() +#define rustg_iconforge_generate_async(file_path, spritesheet_name, sprites, hash_icons) RUSTG_CALL(RUST_G, "iconforge_generate_async")(file_path, spritesheet_name, sprites, "[hash_icons]") +/// Returns the status of an async job_id, or its result if it is completed. See RUSTG_JOB DEFINEs. +#define rustg_iconforge_check(job_id) RUSTG_CALL(RUST_G, "iconforge_check")("[job_id]") +/// Clears all cached DMIs and images, freeing up memory. +/// This should be used after spritesheets are done being generated. +#define rustg_iconforge_cleanup RUSTG_CALL(RUST_G, "iconforge_cleanup") +/// Takes in a set of hashes, generate inputs, and DMI filepaths, and compares them to determine cache validity. +/// input_hash: xxh64 hash of "sprites" from the cache. +/// dmi_hashes: xxh64 hashes of the DMIs in a spritesheet, given by `rustg_iconforge_generate` with `hash_icons` enabled. From the cache. +/// sprites: The new input that will be passed to rustg_iconforge_generate(). +/// Returns a CacheResult with the following structure: list( +/// "result": "1" (if cache is valid) or "0" (if cache is invalid) +/// "fail_reason": "" (emtpy string if valid, otherwise a string containing the invalidation reason or an error with ERROR: prefixed.) +/// ) +/// In the case of an unrecoverable panic from within Rust, this function ONLY returns a string containing the error. +#define rustg_iconforge_cache_valid(input_hash, dmi_hashes, sprites) RUSTG_CALL(RUST_G, "iconforge_cache_valid")(input_hash, dmi_hashes, sprites) +/// Returns a job_id for use with rustg_iconforge_check() +#define rustg_iconforge_cache_valid_async(input_hash, dmi_hashes, sprites) RUSTG_CALL(RUST_G, "iconforge_cache_valid_async")(input_hash, dmi_hashes, sprites) + +#define RUSTG_ICONFORGE_BLEND_COLOR "BlendColor" +#define RUSTG_ICONFORGE_BLEND_ICON "BlendIcon" +#define RUSTG_ICONFORGE_CROP "Crop" +#define RUSTG_ICONFORGE_SCALE "Scale" diff --git a/src/byond.rs b/src/byond.rs index 385d5251..8eb777ac 100644 --- a/src/byond.rs +++ b/src/byond.rs @@ -1,11 +1,17 @@ +use crate::error::Error; use std::{ + backtrace::Backtrace, borrow::Cow, cell::RefCell, ffi::{CStr, CString}, + fs::OpenOptions, + io::Write, os::raw::{c_char, c_int}, slice, + sync::Once, }; +static SET_HOOK: Once = Once::new(); static EMPTY_STRING: c_char = 0; thread_local! { static RETURN_STRING: RefCell = RefCell::new(CString::default()); @@ -50,6 +56,7 @@ macro_rules! byond_fn { pub unsafe extern "C" fn $name( _argc: ::std::os::raw::c_int, _argv: *const *const ::std::os::raw::c_char ) -> *const ::std::os::raw::c_char { + $crate::byond::set_panic_hook(); let closure = || ($body); $crate::byond::byond_return(closure().map(From::from)) } @@ -84,3 +91,53 @@ byond_fn!( Some(env!("CARGO_PKG_VERSION")) } ); + +/// Print any panics before exiting. +pub fn set_panic_hook() { + SET_HOOK.call_once(|| { + std::panic::set_hook(Box::new(|panic_info| { + let mut file = OpenOptions::new() + .append(true) + .create(true) + .open("rustg-panic.log") + .unwrap(); + file.write_all( + panic_info + .payload() + .downcast_ref::<&'static str>() + .map(|payload| payload.to_string()) + .or_else(|| panic_info.payload().downcast_ref::().cloned()) + .unwrap() + .as_bytes(), + ) + .expect("Failed to extract error payload"); + file.write_all(Backtrace::capture().to_string().as_bytes()) + .expect("Failed to extract error backtrace"); + })) + }); +} + +#[allow(dead_code)] // Used depending on feature set +/// Utility for BYOND functions to catch panic unwinds safely and return a Result, as expected. +/// Usage: catch_panic(|| internal_safe_function(arguments)) +pub fn catch_panic(f: F) -> Result +where + F: FnOnce() -> Result + std::panic::UnwindSafe, +{ + match std::panic::catch_unwind(f) { + Ok(o) => o, + Err(e) => { + let message: Option = e + .downcast_ref::<&'static str>() + .map(|payload| payload.to_string()) + .or_else(|| e.downcast_ref::().cloned()); + Err(Error::Panic( + message + .unwrap_or(String::from( + "Failed to stringify panic! Check rustg-panic.log!", + )) + .to_owned(), + )) + } + } +} diff --git a/src/error.rs b/src/error.rs index d56cb5c3..6c3dbc5d 100644 --- a/src/error.rs +++ b/src/error.rs @@ -61,6 +61,11 @@ pub enum Error { #[cfg(feature = "hash")] #[error("Unable to decode hex value.")] HexDecode, + #[cfg(feature = "iconforge")] + #[error("IconForge error: {0}")] + IconForge(String), + #[error("Panic during function execution: {0}")] + Panic(String), } impl From for Error { diff --git a/src/hash.rs b/src/hash.rs index bc67e97b..eba83f0f 100644 --- a/src/hash.rs +++ b/src/hash.rs @@ -71,16 +71,21 @@ fn hash_algorithm>(name: &str, bytes: B) -> Result { hasher.write(bytes.as_ref()); Ok(format!("{:x}", hasher.finish())) } + "xxh64_fixed" => { + let mut hasher = XxHash64::with_seed(17479268743136991876); // this seed is just a random number that should stay the same between builds and runs + hasher.write(bytes.as_ref()); + Ok(format!("{:x}", hasher.finish())) + } "base64" => Ok(base64::prelude::BASE64_STANDARD.encode(bytes.as_ref())), _ => Err(Error::InvalidAlgorithm), } } -fn string_hash(algorithm: &str, string: &str) -> Result { +pub fn string_hash(algorithm: &str, string: &str) -> Result { hash_algorithm(algorithm, string) } -fn file_hash(algorithm: &str, path: &str) -> Result { +pub fn file_hash(algorithm: &str, path: &str) -> Result { let mut bytes: Vec = Vec::new(); let mut file = BufReader::new(File::open(path)?); file.read_to_end(&mut bytes)?; diff --git a/src/iconforge.rs b/src/iconforge.rs new file mode 100644 index 00000000..40145dea --- /dev/null +++ b/src/iconforge.rs @@ -0,0 +1,1090 @@ +// DMI spritesheet generator +// Developed by itsmeow +use crate::{ + byond::catch_panic, + error::Error, + hash::{file_hash, string_hash}, + jobs, +}; +use dashmap::DashMap; +use dmi::{ + dirs::Dirs, + icon::{Icon, IconState}, +}; +use image::{Pixel, RgbaImage}; +use once_cell::sync::Lazy; +use rayon::iter::{IntoParallelIterator, IntoParallelRefIterator, ParallelIterator}; +use serde::{Deserialize, Serialize}; +use std::collections::HashSet; +use std::sync::RwLock; +use std::{ + collections::HashMap, + fs::File, + hash::BuildHasherDefault, + io::BufReader, + sync::{Arc, Mutex}, +}; +use tracy_full::{frame, zone}; +use twox_hash::XxHash64; +type SpriteJsonMap = HashMap, BuildHasherDefault>; +/// This is used to save time decoding 'sprites' a second time between the cache step and the generate step. +static SPRITES_TO_JSON: Lazy>> = Lazy::new(|| { + Arc::new(Mutex::new(HashMap::with_hasher(BuildHasherDefault::< + XxHash64, + >::default()))) +}); +/// A cache of DMI filepath -> Icon objects. +static ICON_FILES: Lazy, BuildHasherDefault>> = + Lazy::new(|| DashMap::with_hasher(BuildHasherDefault::::default())); +/// A cache of icon_hash_input to RgbaImage (with transforms applied! This can only contain COMPLETED sprites). +static ICON_STATES: Lazy>> = + Lazy::new(|| DashMap::with_hasher(BuildHasherDefault::::default())); + +byond_fn!(fn iconforge_generate(file_path, spritesheet_name, sprites, hash_icons) { + let file_path = file_path.to_owned(); + let spritesheet_name = spritesheet_name.to_owned(); + let sprites = sprites.to_owned(); + let hash_icons = hash_icons.to_owned(); + let result = Some(match catch_panic(|| generate_spritesheet(&file_path, &spritesheet_name, &sprites, &hash_icons)) { + Ok(o) => o.to_string(), + Err(e) => e.to_string() + }); + frame!(); + result +}); + +byond_fn!(fn iconforge_generate_async(file_path, spritesheet_name, sprites, hash_icons) { + let file_path = file_path.to_owned(); + let spritesheet_name = spritesheet_name.to_owned(); + let sprites = sprites.to_owned(); + let hash_icons = hash_icons.to_owned(); + Some(jobs::start(move || { + let result = match catch_panic(|| generate_spritesheet(&file_path, &spritesheet_name, &sprites, &hash_icons)) { + Ok(o) => o.to_string(), + Err(e) => e.to_string() + }; + frame!(); + result + })) +}); + +byond_fn!(fn iconforge_check(id) { + Some(jobs::check(id)) +}); + +byond_fn!( + fn iconforge_cleanup() { + ICON_FILES.clear(); + ICON_STATES.clear(); + Some("Ok") + } +); + +byond_fn!(fn iconforge_cache_valid(input_hash, dmi_hashes, sprites) { + let input_hash = input_hash.to_owned(); + let dmi_hashes = dmi_hashes.to_owned(); + let sprites = sprites.to_owned(); + let result = Some(match catch_panic(|| cache_valid(&input_hash, &dmi_hashes, &sprites)) { + Ok(o) => o.to_string(), + Err(e) => e.to_string() + }); + frame!(); + result +}); + +byond_fn!(fn iconforge_cache_valid_async(input_hash, dmi_hashes, sprites) { + let input_hash = input_hash.to_owned(); + let dmi_hashes = dmi_hashes.to_owned(); + let sprites = sprites.to_owned(); + let result = Some(jobs::start(move || { + match catch_panic(|| cache_valid(&input_hash, &dmi_hashes, &sprites)) { + Ok(o) => o.to_string(), + Err(e) => e.to_string() + } + })); + frame!(); + result +}); + +#[derive(Serialize)] +struct SpritesheetResult { + sizes: Vec, + sprites: DashMap>, + dmi_hashes: DashMap, + sprites_hash: String, + error: String, +} + +#[derive(Serialize, Clone)] +struct SpritesheetEntry { + size_id: String, + position: u32, +} + +#[derive(Serialize, Clone, Eq, PartialEq, Hash)] +struct IconObject { + icon_file: String, + icon_state: String, + dir: u8, + frame: u32, + transform: Vec, + transform_hash_input: String, + icon_hash_input: String, +} + +#[derive(Serialize, Deserialize, Clone)] +struct IconObjectIO { + icon_file: String, + icon_state: String, + dir: u8, + frame: u32, + transform: Vec, +} + +impl std::fmt::Display for IconObject { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + write!( + f, + "IconObject(icon_file={}, icon_state={}, dir={}, frame={})", + self.icon_file, self.icon_state, self.dir, self.frame + ) + } +} + +impl IconObject { + fn to_base(&self) -> Result { + zone!("to_base"); + // This is a micro-op that ends up saving a lot of time. format!() is quite slow when you get down to microseconds. + let mut str_buf = String::with_capacity(self.icon_file.len() + self.icon_state.len() + 4); + str_buf.push_str(&self.icon_file); + str_buf.push_str(&self.icon_state); + str_buf.push_str(&self.dir.to_string()); + str_buf.push_str(&self.frame.to_string()); + Ok(str_buf) + } + + fn gen_icon_hash_input(&mut self) -> Result<(), Error> { + zone!("gen_icon_hash_input"); + let base = self.to_base()?; + { + zone!("transform_to_json"); + let transform_str = serde_json::to_string(&self.transform)?; + self.transform_hash_input = transform_str; + } + let mut str_buf = String::with_capacity(base.len() + self.transform_hash_input.len()); + str_buf.push_str(&base); + str_buf.push_str(&self.transform_hash_input); + self.icon_hash_input = str_buf; + Ok(()) + } +} + +#[derive(Serialize, Deserialize, Clone)] +#[serde(tag = "type")] +enum TransformIO { + BlendColor { color: String, blend_mode: u8 }, + BlendIcon { icon: IconObjectIO, blend_mode: u8 }, + Scale { width: u32, height: u32 }, + Crop { x1: i32, y1: i32, x2: i32, y2: i32 }, +} + +#[derive(Serialize, Clone, Eq, PartialEq, Hash)] +enum Transform { + BlendColor { color: String, blend_mode: u8 }, + BlendIcon { icon: IconObject, blend_mode: u8 }, + Scale { width: u32, height: u32 }, + Crop { x1: i32, y1: i32, x2: i32, y2: i32 }, +} + +#[derive(Serialize)] +struct CacheResult { + result: String, + fail_reason: String, +} + +fn cache_valid(input_hash: &str, dmi_hashes_in: &str, sprites_in: &str) -> Result { + zone!("cache_valid"); + let sprites_hash = string_hash("xxh64_fixed", sprites_in)?; + if sprites_hash != input_hash { + return Ok(serde_json::to_string::(&CacheResult { + result: String::from("0"), + fail_reason: String::from("Input hash did not match."), + })?); + } + let dmi_hashes: DashMap; + { + zone!("from_json_hashes"); + dmi_hashes = serde_json::from_str::>(dmi_hashes_in)?; + } + let mut sprites_json = SPRITES_TO_JSON.lock().unwrap(); + let sprites = match sprites_json.get(&sprites_hash) { + Some(sprites) => sprites, + None => { + zone!("from_json_sprites"); + { + sprites_json.insert( + sprites_hash.clone(), + serde_json::from_str::>(sprites_in)?, + ); + } + sprites_json.get(&sprites_hash).unwrap() + } + }; + + let dmis: HashSet; + + { + zone!("collect_dmis"); + dmis = sprites + .par_iter() + .flat_map(|(_, icon)| { + icon_to_icons_io(icon) + .into_iter() + .map(|icon| icon.icon_file.clone()) + .collect::>() + }) + .collect(); + } + + drop(sprites_json); + + if dmis.len() > dmi_hashes.len() { + return Ok(serde_json::to_string::(&CacheResult { + result: String::from("0"), + fail_reason: format!("Input hash matched, but more DMIs exist than DMI hashes provided ({} DMIs, {} DMI hashes).", dmis.len(), dmi_hashes.len()), + })?); + } + + let fail_reason: Arc>> = Arc::new(RwLock::new(None)); + { + zone!("check_dmis"); + dmis.into_par_iter().for_each(|dmi_path| { + zone!("check_dmi"); + if fail_reason.read().unwrap().is_some() { + return; + } + match dmi_hashes.get(&dmi_path) { + Some(hash) => { + zone!("hash_dmi"); + match file_hash("xxh64_fixed", &dmi_path) { + Ok(new_hash) => { + zone!("check_match"); + if new_hash != *hash { + if fail_reason.read().unwrap().is_some() { + return; + } + *fail_reason.write().unwrap() = Some(format!("Input hash matched, but dmi_hash was invalid DMI: '{}' (stored hash: {}, new hash: {})", dmi_path, hash.clone(), new_hash)); + } + }, + Err(err) => { + if fail_reason.read().unwrap().is_some() { + return; + } + *fail_reason.write().unwrap() = Some(format!("ERROR: Error while hashing dmi_path '{}': {}", dmi_path, err)); + } + } + } + None => { + if fail_reason.read().unwrap().is_some() { + return; + } + *fail_reason.write().unwrap() = Some(format!("Input hash matched, but no dmi_hash existed for DMI: '{}'", dmi_path)); + } + } + }); + } + if let Some(err) = fail_reason.read().unwrap().clone() { + return Ok(serde_json::to_string::(&CacheResult { + result: String::from("0"), + fail_reason: err, + })?); + } + Ok(serde_json::to_string::(&CacheResult { + result: String::from("1"), + fail_reason: String::from(""), + })?) +} + +fn generate_spritesheet( + file_path: &str, + spritesheet_name: &str, + sprites: &str, + hash_icons: &str, +) -> std::result::Result { + zone!("generate_spritesheet"); + let hash_icons: bool = hash_icons == "1"; + let error = Arc::new(Mutex::new(Vec::::new())); + let dmi_hashes = DashMap::::new(); + + let size_to_icon_objects = Arc::new(Mutex::new(HashMap::>::new())); + let sprites_objects = + DashMap::>::with_hasher( + BuildHasherDefault::::default(), + ); + + let tree_bases = Arc::new(Mutex::new(HashMap::< + String, + Vec<(&String, &IconObject)>, + BuildHasherDefault, + >::with_hasher( + BuildHasherDefault::::default() + ))); + let sprites_hash; + { + zone!("compute_sprites_hash"); + sprites_hash = string_hash("xxh64_fixed", sprites)?; + } + let input = match SPRITES_TO_JSON.lock().unwrap().get(&sprites_hash) { + Some(sprites) => sprites.clone(), + None => { + zone!("from_json_sprites"); // byondapi, save us + serde_json::from_str::>(sprites)? + } + }; + let mut sprites_map = HashMap::::new(); + { + zone!("io_to_mem"); + sprites_map.extend( + input + .into_par_iter() + .map(|(sprite_name, icon)| (sprite_name, icon_from_io(icon))) + .collect::>(), + ); + } + + // Pre-load all the DMIs now. + // This is much faster than doing it as we go (tested!), because sometimes multiple parallel iterators need the DMI. + sprites_map.par_iter().for_each(|(sprite_name, icon)| { + zone!("sprite_to_icons"); + + icon_to_icons(icon) + .into_par_iter() + .for_each(|icon| match icon_to_dmi(icon) { + Ok(_) => { + if hash_icons && !dmi_hashes.contains_key(&icon.icon_file) { + zone!("hash_dmi"); + match file_hash("xxh64_fixed", &icon.icon_file) { + Ok(hash) => { + zone!("insert_dmi_hash"); + dmi_hashes.insert(icon.icon_file.clone(), hash); + } + Err(err) => { + error.lock().unwrap().push(err.to_string()); + } + }; + } + } + Err(err) => error.lock().unwrap().push(err), + }); + + { + zone!("map_to_base"); + let base = match icon.to_base() { + Ok(base) => base, + Err(err) => { + error.lock().unwrap().push(err.to_string()); + return; + } + }; + tree_bases + .lock() + .unwrap() + .entry(base) + .or_default() + .push((sprite_name, icon)); + } + }); + + // cache this here so we don't generate the same string 5000 times + let sprite_name = String::from("N/A, in tree generation stage"); + + // Map duplicate transform sets into a tree. + // This is beneficial in the case where we have the same base image, and the same set of transforms, but change 1 or 2 things at the end. + // We can greatly reduce the amount of RgbaImages created by first finding these. + tree_bases + .lock() + .unwrap() + .par_iter() + .for_each(|(_, icons)| { + zone!("transform_trees"); + let first_icon = match icons.first() { + Some((_, icon)) => icon, + None => { + error + .lock() + .unwrap() + .push(String::from("Somehow found no icon for a tree.")); + return; + } + }; + let (base_image, _) = match icon_to_image(first_icon, &sprite_name, false, false) { + Ok(image) => image, + Err(err) => { + error.lock().unwrap().push(err); + return; + } + }; + let mut no_transforms = Option::<&IconObject>::None; + let unique_icons = DashMap::::new(); + { + zone!("map_unique"); + icons.iter().for_each(|(_, icon)| { + // This will ensure we only map unique transform sets. This also means each IconObject is guaranteed a unique icon_hash + // Since all icons share the same 'base'. + // Also check to see if the icon is already cached. If so, we can ignore this transform chain. + if !ICON_STATES.contains_key(&icon.icon_hash_input) { + unique_icons.insert(icon.icon_hash_input.clone(), icon); + } + if icon.transform.is_empty() { + no_transforms = Some(icon); + } + }); + } + if let Some(entry) = no_transforms { + if let Err(err) = return_image(base_image.clone(), entry) { + error.lock().unwrap().push(err.to_string()); + } + } + { + zone!("transform_all_leaves"); + if let Err(err) = transform_leaves( + &unique_icons.into_iter().map(|(_, v)| v).collect(), + base_image, + 0, + ) { + error.lock().unwrap().push(err); + } + } + }); + + // Pick the specific icon states out of the DMI, also generating their transforms, build the spritesheet metadata. + sprites_map.par_iter().for_each(|sprite_entry| { + zone!("map_sprite"); + let (sprite_name, icon) = sprite_entry; + + // get RgbaImage, it should already be transformed, so it must be cached. + let (image, _) = match icon_to_image(icon, sprite_name, true, true) { + Ok(image) => image, + Err(err) => { + error.lock().unwrap().push(err); + return; + } + }; + + { + zone!("create_game_metadata"); + // Generate the metadata used by the game + let size_id = format!("{}x{}", image.width(), image.height()); + if let Err(err) = return_image(image, icon) { + error.lock().unwrap().push(err.to_string()); + } + let icon_position; + { + zone!("insert_into_size_map"); + // This scope releases the lock on size_to_icon_objects + let mut size_map = size_to_icon_objects.lock().unwrap(); + let vec = (*size_map).entry(size_id.to_owned()).or_default(); + icon_position = vec.len() as u32; + vec.push(icon); + } + + { + zone!("insert_into_sprite_objects"); + sprites_objects.insert( + sprite_name.to_owned(), + SpritesheetEntry { + size_id: size_id.to_owned(), + position: icon_position, + }, + ); + } + } + }); + + // all images have been returned now, so continue... + + // cache this here so we don't generate the same string 5000 times + let sprite_name = String::from("N/A, in final generation stage"); + + // Get all the sprites and spew them onto a spritesheet. + size_to_icon_objects + .lock() + .unwrap() + .par_iter() + .for_each(|(size_id, icon_objects)| { + zone!("join_sprites"); + let file_path = format!("{}{}_{}.png", file_path, spritesheet_name, size_id); + let size_data: Vec<&str> = size_id.split('x').collect(); + let base_width = size_data + .first() + .unwrap() + .to_string() + .parse::() + .unwrap(); + let base_height = size_data + .last() + .unwrap() + .to_string() + .parse::() + .unwrap(); + + let mut final_image = + RgbaImage::new(base_width * icon_objects.len() as u32, base_height); + + for (idx, icon) in icon_objects.iter().enumerate() { + zone!("join_sprite"); + let image = match icon_to_image(icon, &sprite_name, true, true) { + Ok((image, _)) => image, + Err(err) => { + error.lock().unwrap().push(err); + return; + } + }; + let base_x: u32 = base_width * idx as u32; + for x in 0..image.width() { + for y in 0..image.height() { + final_image.put_pixel(base_x + x, y, *image.get_pixel(x, y)) + } + } + if let Err(err) = return_image(image, icon) { + error.lock().unwrap().push(err.to_string()); + } + } + { + zone!("write_spritesheet"); + final_image.save(file_path).err(); + } + }); + + let sizes: Vec = size_to_icon_objects + .lock() + .unwrap() + .iter() + .map(|(k, _v)| k) + .cloned() + .collect(); + + // Collect the game metadata and any errors. + let returned = SpritesheetResult { + sizes, + sprites: sprites_objects, + dmi_hashes, + sprites_hash, + error: error.lock().unwrap().join("\n"), + }; + Ok(serde_json::to_string::(&returned)?) +} + +/// Given an array of 'transform arrays' onto from a shared IconObject base, +/// recursively applies transforms in a tree structure. Maximum transform depth is 128. +fn transform_leaves(icons: &Vec<&IconObject>, image: RgbaImage, depth: u8) -> Result<(), String> { + zone!("transform_leaf"); + if depth > 128 { + return Err(String::from( + "Transform depth exceeded 128. https://www.youtube.com/watch?v=CUjrySBwi5Q", + )); + } + let next_transforms = DashMap::>::new(); + let errors = Mutex::new(Vec::::new()); + + { + zone!("get_next_transforms"); + icons.par_iter().for_each(|icon| { + zone!("collect_icon_transforms"); + if let Some(transform) = icon.transform.get(depth as usize) { + next_transforms + .entry(transform.clone()) + .or_default() + .push(icon); + } + }); + } + + { + zone!("do_next_transforms"); + next_transforms + .into_par_iter() + .for_each(|(transform, mut associated_icons)| { + let mut altered_image; + { + zone!("clone_image"); + altered_image = image.clone(); + } + if let Err(err) = transform_image(&mut altered_image, &transform) { + errors.lock().unwrap().push(err); + } + { + zone!("filter_associated_icons"); + associated_icons + .clone() + .into_iter() + .enumerate() + .for_each(|(idx, icon)| { + if icon.transform.len() as u8 == depth + 1 + && *icon.transform.last().unwrap() == transform + { + associated_icons.swap_remove(idx); + if let Err(err) = return_image(altered_image.clone(), icon) { + errors.lock().unwrap().push(err.to_string()); + } + } + }); + } + if let Err(err) = transform_leaves(&associated_icons, altered_image, depth + 1) { + errors.lock().unwrap().push(err); + } + }); + } + + if !errors.lock().unwrap().is_empty() { + return Err(errors.lock().unwrap().join("\n")); + } + Ok(()) +} + +/// Converts an IO icon to one with icon_hash_input +fn icon_from_io(icon_in: IconObjectIO) -> IconObject { + zone!("icon_from_io"); + // TODO: can probably convert this function to just lazily attaching icostring to a RefCell<> or something + // This alternative type system is too verbose and wasteful of processing time. + // https://doc.rust-lang.org/reference/interior-mutability.html + let mut result = IconObject { + icon_file: icon_in.icon_file, + icon_state: icon_in.icon_state, + dir: icon_in.dir, + frame: icon_in.frame, + transform: icon_in + .transform + .into_iter() + .map(|transform_in| match transform_in { + TransformIO::BlendColor { color, blend_mode } => { + Transform::BlendColor { color, blend_mode } + } + TransformIO::BlendIcon { icon, blend_mode } => Transform::BlendIcon { + icon: icon_from_io(icon), + blend_mode, + }, + TransformIO::Crop { x1, y1, x2, y2 } => Transform::Crop { x1, y1, x2, y2 }, + TransformIO::Scale { width, height } => Transform::Scale { width, height }, + }) + .collect(), + transform_hash_input: String::new(), + icon_hash_input: String::new(), + }; + // This line can panic, but I consider that acceptable considering how annoying "proper" error handling would be + // especially when this failing basically breaks the entire program. The panic will be caught and written to logs anyway. + result.gen_icon_hash_input().unwrap(); + result +} + +/// Takes in an icon and gives a list of nested icons. Also returns a reference to the provided icon in the list. +fn icon_to_icons(icon_in: &IconObject) -> Vec<&IconObject> { + zone!("icon_to_icons"); + let mut icons: Vec<&IconObject> = Vec::new(); + icons.push(icon_in); + for transform in &icon_in.transform { + if let Transform::BlendIcon { icon, .. } = transform { + let nested = icon_to_icons(icon); + for icon in nested { + icons.push(icon) + } + } + } + icons +} + +/// icon_to_icons but for IO icons. +fn icon_to_icons_io(icon_in: &IconObjectIO) -> Vec<&IconObjectIO> { + zone!("icon_to_icons_io"); + let mut icons: Vec<&IconObjectIO> = Vec::new(); + icons.push(icon_in); + for transform in &icon_in.transform { + if let TransformIO::BlendIcon { icon, .. } = transform { + let nested = icon_to_icons_io(icon); + for icon in nested { + icons.push(icon) + } + } + } + icons +} + +/// Given an IconObject, returns a DMI Icon structure and caches it. +fn icon_to_dmi(icon: &IconObject) -> Result, String> { + zone!("icon_to_dmi"); + let icon_path = &icon.icon_file; + { + zone!("check_dmi_exists"); + if let Some(found) = ICON_FILES.get(icon_path) { + return Ok(found.clone()); + } + } + let icon_file = match File::open(icon_path) { + Ok(icon_file) => icon_file, + Err(err) => { + return Err(format!("Failed to open DMI '{}' - {}", icon_path, err)); + } + }; + let reader = BufReader::new(icon_file); + let dmi: Icon; + { + zone!("parse_dmi"); + dmi = match Icon::load(reader) { + Ok(dmi) => dmi, + Err(err) => { + return Err(format!("DMI '{}' failed to parse - {}", icon_path, err)); + } + }; + } + { + zone!("insert_dmi"); + let dmi_arc = Arc::new(dmi); + let other_arc = dmi_arc.clone(); + // Cache it for later, saving future DMI parsing operations, which are very slow. + ICON_FILES.insert(icon_path.to_owned(), dmi_arc); + Ok(other_arc) + } +} + +/// Takes an IconObject, gets its DMI, then picks out a RgbaImage for the IconState. +/// Returns with True if the RgbaImage is pre-cached (and shouldn't have new transforms applied) +/// Gives ownership over the image. Please return when you are done <3 (via return_image) +fn icon_to_image( + icon: &IconObject, + sprite_name: &String, + cached: bool, + must_be_cached: bool, +) -> Result<(RgbaImage, bool), String> { + zone!("icon_to_image"); + if cached { + zone!("check_rgba_image_exists"); + if icon.icon_hash_input.is_empty() { + return Err(format!( + "No icon_hash generated for {} {}", + icon, sprite_name + )); + } + if let Some(entry) = ICON_STATES.get(&icon.icon_hash_input) { + return Ok((entry.value().clone(), true)); + } + if must_be_cached { + return Err(String::from("Image not found in cache!")); + } + } + let dmi = icon_to_dmi(icon)?; + let mut matched_state: Option<&IconState> = None; + { + zone!("match_icon_state"); + for icon_state in &dmi.states { + if icon_state.name == icon.icon_state { + matched_state = Some(icon_state); + break; + } + } + } + let state = match matched_state { + Some(state) => state, + None => { + return Err(format!( + "Could not find associated icon state {} for {}", + icon.icon_state, sprite_name + )); + } + }; + + let dir = match Dirs::from_bits(icon.dir) { + Some(dir) => dir, + None => { + return Err(format!( + "Invalid dir number {} for {}", + icon.dir, sprite_name + )); + } + }; + Ok(match state.get_image(&dir, icon.frame) { + Ok(image) => (image.to_rgba8(), false), + Err(err) => { + return Err(format!("Error getting image for {}: {}", sprite_name, err)); + } + }) +} + +/// Gives an image back to the cache, after it is done being used. +fn return_image(image: RgbaImage, icon: &IconObject) -> Result<(), Error> { + zone!("insert_rgba_image"); + if icon.icon_hash_input.is_empty() { + return Err(Error::IconForge(format!( + "No icon_hash_input generated for {}", + icon + ))); + } + ICON_STATES.insert(icon.icon_hash_input.to_owned(), image); + Ok(()) +} + +fn apply_all_transforms(image: &mut RgbaImage, transforms: &Vec) -> Result<(), String> { + let mut errors = Vec::::new(); + for transform in transforms { + if let Err(error) = transform_image(image, transform) { + errors.push(error); + } + } + if !errors.is_empty() { + return Err(errors.join("\n")); + } + Ok(()) +} + +/// Applies transforms to a RgbaImage. +fn transform_image(image: &mut RgbaImage, transform: &Transform) -> Result<(), String> { + zone!("transform_image"); + match transform { + Transform::BlendColor { color, blend_mode } => { + zone!("blend_color"); + let mut color2: [u8; 4] = [0, 0, 0, 255]; + { + zone!("from_hex"); + let mut hex: String = color.to_owned(); + if hex.starts_with('#') { + hex = hex[1..].to_string(); + } + if hex.len() == 6 { + hex += "ff"; + } + + if let Err(err) = hex::decode_to_slice(hex, &mut color2) { + return Err(format!("Decoding hex color {} failed: {}", color, err)); + } + } + for x in 0..image.width() { + for y in 0..image.height() { + let px = image.get_pixel_mut(x, y); + let pixel = px.channels(); + let blended = Rgba::blend_u8(pixel, &color2, *blend_mode); + + *px = image::Rgba::(blended); + } + } + } + Transform::BlendIcon { icon, blend_mode } => { + zone!("blend_icon"); + let (mut other_image, cached) = + icon_to_image(icon, &format!("Transform blend_icon {}", icon), true, false)?; + + if !cached { + apply_all_transforms(&mut other_image, &icon.transform)?; + }; + for x in 0..std::cmp::min(image.width(), other_image.width()) { + for y in 0..std::cmp::min(image.width(), other_image.width()) { + let px1 = image.get_pixel_mut(x, y); + let px2 = other_image.get_pixel(x, y); + let pixel_1 = px1.channels(); + let pixel_2 = px2.channels(); + + let blended = Rgba::blend_u8(pixel_1, pixel_2, *blend_mode); + + *px1 = image::Rgba::(blended); + } + } + if let Err(err) = return_image(other_image, icon) { + return Err(err.to_string()); + } + } + Transform::Scale { width, height } => { + zone!("scale"); + let old_width = image.width() as usize; + let old_height = image.height() as usize; + let x_ratio = old_width as f32 / *width as f32; + let y_ratio = old_height as f32 / *height as f32; + let mut new_image = RgbaImage::new(*width, *height); + for x in 0..(*width) { + for y in 0..(*height) { + let old_x = (x as f32 * x_ratio).floor() as u32; + let old_y = (y as f32 * y_ratio).floor() as u32; + new_image.put_pixel(x, y, *image.get_pixel(old_x, old_y)); + } + } + *image = new_image; + } + Transform::Crop { x1, y1, x2, y2 } => { + zone!("crop"); + + let i_width = image.width(); + let i_height = image.height(); + let mut x1 = *x1; + let mut y1 = *y1; + let mut x2 = *x2; + let mut y2 = *y2; + // BYOND indexes from 1,1! how silly of them. We'll just fix this here. + // Crop(1,1,1,1) is a valid statement. Save us. + y1 -= 1; + x1 -= 1; + if x2 <= x1 || y2 <= y1 { + return Err(format!( + "Invalid bounds {} {} to {} {} in crop transform", + x1, y1, x2, y2 + )); + } + + // Convert from BYOND (0,0 is bottom left) to Rust (0,0 is top left) + // BYOND also includes the upper bound + let y2_old = y2; + y2 = i_height as i32 - y1; + y1 = i_height as i32 - y2_old; + + // Check for silly expansion crops and add transparency in the gaps. + if x1 < 0 || x2 > i_width as i32 || y1 < 0 || y2 > i_height as i32 { + // The amount the blank icon's size should increase by. + let mut width_inc: u32 = (x2 - i_width as i32).max(0) as u32; + let mut height_inc: u32 = (y2 - i_height as i32).max(0) as u32; + // Where to position the icon within our blank space. + let mut x_offset: u32 = 0; + let mut y_offset: u32 = 0; + // Make room to place the image further in, and change our bounds to match. + if x1 < 0 { + x2 += x1.abs(); + x_offset += x1.unsigned_abs(); + width_inc += x1.unsigned_abs(); + x1 = 0; + } + if y1 < 0 { + y2 += y1.abs(); + y_offset += y1.unsigned_abs(); + height_inc += y1.unsigned_abs(); + y1 = 0; + } + let mut blank_img: image::ImageBuffer, Vec> = + RgbaImage::from_fn(i_width + width_inc, i_height + height_inc, |_x, _y| { + image::Rgba([0, 0, 0, 0]) + }); + + image::imageops::replace(&mut blank_img, image, x_offset as i64, y_offset as i64); + *image = image::imageops::crop_imm( + &blank_img, + x1 as u32, + y1 as u32, + (x2 - x1) as u32, + (y2 - y1) as u32, + ) + .to_image(); + } else { + // Normal bounds crop. Hooray! + *image = image::imageops::crop_imm( + image, + x1 as u32, + y1 as u32, + (x2 - x1) as u32, + (y2 - y1) as u32, + ) + .to_image(); + } + } + } + Ok(()) +} + +#[derive(Clone)] +struct Rgba { + r: f32, + g: f32, + b: f32, + a: f32, +} + +impl Rgba { + fn into_array(self) -> [u8; 4] { + [ + self.r.round() as u8, + self.g.round() as u8, + self.b.round() as u8, + self.a.round() as u8, + ] + } + + fn from_array(rgba: &[u8]) -> Rgba { + Self { + r: rgba[0] as f32, + g: rgba[1] as f32, + b: rgba[2] as f32, + a: rgba[3] as f32, + } + } + + fn map_each(color: &Rgba, color2: &Rgba, rgb_fn: F, a_fn: T) -> Rgba + where + F: Fn(f32, f32) -> f32, + T: Fn(f32, f32) -> f32, + { + Rgba { + r: rgb_fn(color.r, color2.r), + g: rgb_fn(color.g, color2.g), + b: rgb_fn(color.b, color2.b), + a: a_fn(color.a, color2.a), + } + } + + fn map_each_a(color: &Rgba, color2: &Rgba, rgb_fn: F, a_fn: T) -> Rgba + where + F: Fn(f32, f32, f32, f32) -> f32, + T: Fn(f32, f32) -> f32, + { + Rgba { + r: rgb_fn(color.r, color2.r, color.a, color2.a), + g: rgb_fn(color.g, color2.g, color.a, color2.a), + b: rgb_fn(color.b, color2.b, color.a, color2.a), + a: a_fn(color.a, color2.a), + } + } + + /// Takes two [u8; 4]s, converts them to Rgba structs, then blends them according to blend_mode by calling blend(). + fn blend_u8(color: &[u8], other_color: &[u8], blend_mode: u8) -> [u8; 4] { + Rgba::from_array(color) + .blend(&Rgba::from_array(other_color), blend_mode) + .into_array() + } + + /// Blends two colors according to blend_mode. The numbers correspond to BYOND blend modes. + fn blend(&self, other_color: &Rgba, blend_mode: u8) -> Rgba { + match blend_mode { + 0 => Rgba::map_each(self, other_color, |c1, c2| c1 + c2, f32::min), + 1 => Rgba::map_each(self, other_color, |c1, c2| c1 - c2, f32::min), + 2 => Rgba::map_each( + self, + other_color, + |c1, c2| c1 * c2 / 255.0, + |a1: f32, a2: f32| a1 * a2 / 255.0, + ), + 3 => Rgba::map_each_a( + self, + other_color, + |c1, c2, c1_a, c2_a| { + if c1_a == 0.0 { + return c2; + } + c1 + (c2 - c1) * c2_a / 255.0 + }, + |a1, a2| { + let high = f32::max(a1, a2); + let low = f32::min(a1, a2); + high + (high * low / 255.0) + }, + ), + 6 => Rgba::map_each_a( + other_color, + self, + |c1, c2, c1_a, c2_a| { + if c1_a == 0.0 { + return c2; + } + c1 + (c2 - c1) * c2_a / 255.0 + }, + |a1, a2| { + let high = f32::max(a1, a2); + let low = f32::min(a1, a2); + high + (high * low / 255.0) + }, + ), + _ => self.clone(), + } + } +} diff --git a/src/lib.rs b/src/lib.rs index 50f6ded6..6ca077f9 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1,4 +1,4 @@ -#![forbid(unsafe_op_in_unsafe_fn)] +// #![forbid(unsafe_op_in_unsafe_fn)] - see github.com/rust-lang/rust/issues/121483 #[macro_use] mod byond; @@ -24,6 +24,8 @@ pub mod git; pub mod hash; #[cfg(feature = "http")] pub mod http; +#[cfg(feature = "iconforge")] +pub mod iconforge; #[cfg(feature = "json")] pub mod json; #[cfg(feature = "log")] diff --git a/src/pathfinder.rs b/src/pathfinder.rs index 50f993ce..477207a8 100644 --- a/src/pathfinder.rs +++ b/src/pathfinder.rs @@ -8,7 +8,7 @@ use std::rc::Rc; use thiserror::Error; thread_local! { -static NODES: RefCell>>> = RefCell::new(Vec::new()); +static NODES: RefCell>>> = const { RefCell::new(Vec::new()) }; } fn get_nodes_len() -> usize { diff --git a/src/redis_pubsub.rs b/src/redis_pubsub.rs index 97d3d0da..8b41886e 100644 --- a/src/redis_pubsub.rs +++ b/src/redis_pubsub.rs @@ -7,8 +7,8 @@ use std::time::Duration; const ERROR_CHANNEL: &str = "RUSTG_REDIS_ERROR_CHANNEL"; thread_local! { - static REQUEST_SENDER: RefCell>> = RefCell::new(None); - static RESPONSE_RECEIVER: RefCell>> = RefCell::new(None); + static REQUEST_SENDER: RefCell>> = const { RefCell::new(None) }; + static RESPONSE_RECEIVER: RefCell>> = const { RefCell::new(None) }; } enum PubSubRequest { diff --git a/src/redis_reliablequeue.rs b/src/redis_reliablequeue.rs index cc2cca70..9e4217aa 100644 --- a/src/redis_reliablequeue.rs +++ b/src/redis_reliablequeue.rs @@ -4,7 +4,7 @@ use std::num::NonZeroUsize; use std::time::Duration; thread_local! { - static REDIS_CLIENT: RefCell> = RefCell::new(None); + static REDIS_CLIENT: RefCell> = const { RefCell::new(None) }; } fn connect(addr: &str) -> Result<(), RedisError> { @@ -138,24 +138,28 @@ fn lpop(key: &str, count: Option) -> serde_json::Value { } byond_fn!(fn redis_connect_rq(addr) { - connect(addr).err().map(|e| e.to_string()) + match connect(addr) { + Ok(_) => Some(serde_json::json!({"success": true, "content": ""}).to_string()), + Err(e) => Some(serde_json::json!({ + "success": false, "content": format!("Failed to connect to {addr}: {e}") + }).to_string()), + } }); byond_fn!( fn redis_disconnect_rq() { disconnect(); - Some("") + Some(serde_json::json!({"success": true, "content": ""}).to_string()) } ); byond_fn!(fn redis_lpush(key, elements) { - #[allow(clippy::needless_return)] - return match serde_json::from_str(elements) { + match serde_json::from_str(elements) { Ok(elem) => Some(lpush(key, elem).to_string()), Err(e) => Some(serde_json::json!({ "success": false, "content": format!("Failed to deserialize JSON: {e}") }).to_string()), - }; + } }); byond_fn!(fn redis_lrange(key, start, stop) { diff --git a/src/unzip.rs b/src/unzip.rs index 16b5009a..d549f60e 100644 --- a/src/unzip.rs +++ b/src/unzip.rs @@ -48,6 +48,7 @@ fn do_unzip_download(prep: UnzipPrep) -> Result { let file = fs::OpenOptions::new() .write(true) .create(true) + .truncate(true) .open(&file_path)?; let mut writer = std::io::BufWriter::new(file);