diff --git a/Cargo.lock b/Cargo.lock index dd8d81d50..e840ed110 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -8,7 +8,7 @@ version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5f7b0a21988c1bf877cf4759ef5ddaac04c1c9fe808c9142ecb78ba97d97a28a" dependencies = [ - "bitflags 2.9.0", + "bitflags 2.9.1", "bytes", "futures-core", "futures-sink", @@ -44,7 +44,7 @@ dependencies = [ "actix-service", "actix-utils", "actix-web", - "bitflags 2.9.0", + "bitflags 2.9.1", "bytes", "derive_more 0.99.20", "futures-core", @@ -59,17 +59,17 @@ dependencies = [ [[package]] name = "actix-http" -version = "3.10.0" +version = "3.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fa882656b67966045e4152c634051e70346939fced7117d5f0b52146a7c74c9" +checksum = "44dfe5c9e0004c623edc65391dfd51daa201e7e30ebd9c9bedf873048ec32bc2" dependencies = [ "actix-codec", "actix-rt", "actix-service", "actix-utils", "base64 0.22.1", - "bitflags 2.9.0", - "brotli", + "bitflags 2.9.1", + "brotli 8.0.1", "bytes", "bytestring", "derive_more 2.0.1", @@ -172,9 +172,9 @@ dependencies = [ [[package]] name = "actix-server" -version = "2.5.1" +version = "2.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6398974fd4284f4768af07965701efbbb5fdc0616bff20cade1bb14b77675e24" +checksum = "a65064ea4a457eaf07f2fba30b4c695bf43b721790e9530d26cb6f9019ff7502" dependencies = [ "actix-rt", "actix-service", @@ -209,9 +209,9 @@ dependencies = [ [[package]] name = "actix-web" -version = "4.10.2" +version = "4.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f2e3b15b3dc6c6ed996e4032389e9849d4ab002b1e92fbfe85b5f307d1479b4d" +checksum = "a597b77b5c6d6a1e1097fddde329a83665e25c5437c696a3a9a4aa514a614dea" dependencies = [ "actix-codec", "actix-http", @@ -264,9 +264,9 @@ dependencies = [ [[package]] name = "actix-web-prom" -version = "0.9.0" +version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56a34f1825c3ae06567a9d632466809bbf34963c86002e8921b64f32d48d289d" +checksum = "a7eb266b4c692a4a7e68429fcbe4eb3bd55c053f6d84c0522dc83df22395edf6" dependencies = [ "actix-web", "futures-core", @@ -306,17 +306,6 @@ version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "512761e0bb2578dd7380c6baaa0f4ce03e84f95e960231d1dec8bf4d7d6e2627" -[[package]] -name = "aes" -version = "0.8.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b169f7a6d4742236a0a00c541b845991d0ac43e546831af1249753ab4c3aa3a0" -dependencies = [ - "cfg-if", - "cipher", - "cpufeatures", -] - [[package]] name = "ahash" version = "0.7.8" @@ -330,15 +319,15 @@ dependencies = [ [[package]] name = "ahash" -version = "0.8.11" +version = "0.8.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e89da841a80418a9b391ebaea17f5c112ffaaa96f621d2c285b5174da76b9011" +checksum = "5a15f179cd60c4584b8a8c596927aadc462e27f2ca70c04e0071964a73ba7a75" dependencies = [ "cfg-if", - "getrandom 0.2.16", + "getrandom 0.3.3", "once_cell", "version_check", - "zerocopy 0.7.35", + "zerocopy", ] [[package]] @@ -492,7 +481,6 @@ version = "0.1.0" dependencies = [ "chrono", "either", - "lazy_static", "rand 0.8.5", "serde", "serde_bytes", @@ -569,11 +557,11 @@ dependencies = [ [[package]] name = "async-compression" -version = "0.4.19" +version = "0.4.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "06575e6a9673580f52661c92107baabffbf41e2141373441cbcdc47cb733003c" +checksum = "b37fc50485c4f3f736a4fb14199f6d5f5ba008d7f28fe710306c92780f004c07" dependencies = [ - "brotli", + "brotli 8.0.1", "bzip2", "deflate64", "flate2", @@ -582,7 +570,6 @@ dependencies = [ "memchr", "pin-project-lite", "tokio", - "xz2", "zstd", "zstd-safe", ] @@ -734,7 +721,6 @@ dependencies = [ "smol_str", "thiserror 1.0.69", "tokio", - "uuid 0.8.2", ] [[package]] @@ -1036,9 +1022,9 @@ checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" [[package]] name = "bitflags" -version = "2.9.0" +version = "2.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c8214115b7bf84099f1309324e63141d4c5d7cc26862f97a0a857dbefe165bd" +checksum = "1b8e56985ec62d17e9c1001dc89c88ecd7dc08e47eba5ec7c29c7b5eeecde967" dependencies = [ "serde", ] @@ -1141,7 +1127,18 @@ checksum = "cc97b8f16f944bba54f0433f07e30be199b6dc2bd25937444bbad560bcea29bd" dependencies = [ "alloc-no-stdlib", "alloc-stdlib", - "brotli-decompressor", + "brotli-decompressor 4.0.3", +] + +[[package]] +name = "brotli" +version = "8.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9991eea70ea4f293524138648e41ee89b0b2b12ddef3b255effa43c8056e0e0d" +dependencies = [ + "alloc-no-stdlib", + "alloc-stdlib", + "brotli-decompressor 5.0.0", ] [[package]] @@ -1154,6 +1151,16 @@ dependencies = [ "alloc-stdlib", ] +[[package]] +name = "brotli-decompressor" +version = "5.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "874bb8112abecc98cbd6d81ea4fa7e94fb9449648c93cc89aa40c81c24d7de03" +dependencies = [ + "alloc-no-stdlib", + "alloc-stdlib", +] + [[package]] name = "bstr" version = "1.12.0" @@ -1161,8 +1168,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "234113d19d0d7d613b40e86fb654acf958910802bcceab913a4f9e7cda03b1a4" dependencies = [ "memchr", - "regex-automata 0.4.9", - "serde", ] [[package]] @@ -1260,7 +1265,7 @@ version = "0.18.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8ca26ef0159422fb77631dc9d17b102f253b876fe1586b03b803e63a309b4ee2" dependencies = [ - "bitflags 2.9.0", + "bitflags 2.9.1", "cairo-sys-rs", "glib", "libc", @@ -1323,9 +1328,9 @@ dependencies = [ [[package]] name = "cc" -version = "1.2.21" +version = "1.2.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8691782945451c1c383942c4874dbe63814f61cb57ef773cda2972682b7bb3c0" +checksum = "32db95edf998450acc7881c932f94cd9b05c87b4b2599e8bab064753da4acfd1" dependencies = [ "jobserver", "libc", @@ -1405,16 +1410,6 @@ dependencies = [ "stacker", ] -[[package]] -name = "cipher" -version = "0.4.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "773f3b9af64447d2ce9850330c473515014aa235e6a783b02db81ff39e4a3dad" -dependencies = [ - "crypto-common", - "inout", -] - [[package]] name = "cityhash-rs" version = "1.0.1" @@ -1423,9 +1418,9 @@ checksum = "93a719913643003b84bd13022b4b7e703c09342cd03b679c4641c7d2e50dc34d" [[package]] name = "clap" -version = "4.5.37" +version = "4.5.38" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eccb054f56cbd38340b380d4a8e69ef1f02f1af43db2f0cc817a4774d80ae071" +checksum = "ed93b9805f8ba930df42c2590f05453d5ec36cbb85d018868a5b24d31f6ac000" dependencies = [ "clap_builder", "clap_derive", @@ -1433,9 +1428,9 @@ dependencies = [ [[package]] name = "clap_builder" -version = "4.5.37" +version = "4.5.38" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "efd9466fac8543255d3b1fcad4762c5e116ffe808c8a3043d4263cd4fd4862a2" +checksum = "379026ff283facf611b0ea629334361c4211d1b12ee01024eec1591133b04120" dependencies = [ "anstream", "anstyle", @@ -1696,7 +1691,7 @@ version = "0.24.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fa95a34622365fa5bbf40b20b75dba8dfa8c94c734aea8ac9a5ca38af14316f1" dependencies = [ - "bitflags 2.9.0", + "bitflags 2.9.1", "core-foundation 0.10.0", "core-graphics-types", "foreign-types 0.5.0", @@ -1709,7 +1704,7 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3d44a101f213f6c4cdc1853d4b78aef6db6bdfa3468798cc1d9912f4735013eb" dependencies = [ - "bitflags 2.9.0", + "bitflags 2.9.1", "core-foundation 0.10.0", "libc", ] @@ -1905,7 +1900,6 @@ dependencies = [ "futures", "indexmap 2.9.0", "itertools 0.14.0", - "lazy_static", "reqwest", "rust-s3", "serde", @@ -1975,17 +1969,6 @@ version = "2.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2a2330da5de22e8a3cb63252ce2abb30116bf5265e89c0e01bc17015ce30a476" -[[package]] -name = "dbus" -version = "0.9.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1bb21987b9fb1613058ba3843121dd18b163b254d8a6e797e144cbac14d96d1b" -dependencies = [ - "libc", - "libdbus-sys", - "winapi", -] - [[package]] name = "deadpool" version = "0.12.2" @@ -2053,17 +2036,6 @@ dependencies = [ "serde", ] -[[package]] -name = "derive-new" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2cdc8d50f426189eef89dac62fabfa0abb27d5cc008f25bf4156a0203325becc" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.101", -] - [[package]] name = "derive_arbitrary" version = "1.4.1" @@ -2219,7 +2191,7 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1a0d569e003ff27784e0e14e4a594048698e0c0f0b66cabcb51511be55a7caa0" dependencies = [ - "bitflags 2.9.0", + "bitflags 2.9.1", "block2 0.6.1", "libc", "objc2 0.6.1", @@ -2231,7 +2203,7 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "89a09f22a6c6069a18470eb92d2298acf25463f14256d24778e1230d789a2aec" dependencies = [ - "bitflags 2.9.0", + "bitflags 2.9.1", "block2 0.6.1", "libc", "objc2 0.6.1", @@ -2673,6 +2645,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7ced92e76e966ca2fd84c8f7aa01a4aea65b0eb6648d72f7c8f3e2764a67fece" dependencies = [ "crc32fast", + "libz-rs-sys", "miniz_oxide", ] @@ -3016,15 +2989,16 @@ dependencies = [ [[package]] name = "generator" -version = "0.8.4" +version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cc6bd114ceda131d3b1d665eba35788690ad37f5916457286b32ab6fd3c438dd" +checksum = "d18470a76cb7f8ff746cf1f7470914f900252ec36bbc40b569d74b1258446827" dependencies = [ + "cc", "cfg-if", "libc", "log", "rustversion", - "windows 0.58.0", + "windows 0.61.1", ] [[package]] @@ -3074,9 +3048,9 @@ dependencies = [ [[package]] name = "getrandom" -version = "0.3.2" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "73fea8450eea4bac3940448fb7ae50d91f034f941199fcd9d909a5a07aa455f0" +checksum = "26145e563e54f2cadc477553f1ec5ee650b00862f0a58bcd12cbdc5f0ea2d2f4" dependencies = [ "cfg-if", "js-sys", @@ -3140,7 +3114,7 @@ version = "0.18.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "233daaf6e83ae6a12a52055f568f9d7cf4671dabb78ff9560ab6da230ce00ee5" dependencies = [ - "bitflags 2.9.0", + "bitflags 2.9.1", "futures-channel", "futures-core", "futures-executor", @@ -3330,7 +3304,7 @@ version = "0.14.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1" dependencies = [ - "ahash 0.8.11", + "ahash 0.8.12", "allocator-api2", ] @@ -3767,21 +3741,22 @@ dependencies = [ [[package]] name = "icu_collections" -version = "1.5.0" +version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db2fa452206ebee18c4b5c2274dbf1de17008e874b4dc4f0aea9d01ca79e4526" +checksum = "200072f5d0e3614556f94a9930d5dc3e0662a652823904c3a75dc3b0af7fee47" dependencies = [ "displaydoc", + "potential_utf", "yoke", "zerofrom", "zerovec", ] [[package]] -name = "icu_locid" -version = "1.5.0" +name = "icu_locale_core" +version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "13acbb8371917fc971be86fc8057c41a64b521c184808a698c02acc242dbf637" +checksum = "0cde2700ccaed3872079a65fb1a78f6c0a36c91570f28755dda67bc8f7d9f00a" dependencies = [ "displaydoc", "litemap", @@ -3790,31 +3765,11 @@ dependencies = [ "zerovec", ] -[[package]] -name = "icu_locid_transform" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "01d11ac35de8e40fdeda00d9e1e9d92525f3f9d887cdd7aa81d727596788b54e" -dependencies = [ - "displaydoc", - "icu_locid", - "icu_locid_transform_data", - "icu_provider", - "tinystr", - "zerovec", -] - -[[package]] -name = "icu_locid_transform_data" -version = "1.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7515e6d781098bf9f7205ab3fc7e9709d34554ae0b21ddbcb5febfa4bc7df11d" - [[package]] name = "icu_normalizer" -version = "1.5.0" +version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "19ce3e0da2ec68599d193c93d088142efd7f9c5d6fc9b803774855747dc6a84f" +checksum = "436880e8e18df4d7bbc06d58432329d6458cc84531f7ac5f024e93deadb37979" dependencies = [ "displaydoc", "icu_collections", @@ -3822,67 +3777,54 @@ dependencies = [ "icu_properties", "icu_provider", "smallvec", - "utf16_iter", - "utf8_iter", - "write16", "zerovec", ] [[package]] name = "icu_normalizer_data" -version = "1.5.1" +version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c5e8338228bdc8ab83303f16b797e177953730f601a96c25d10cb3ab0daa0cb7" +checksum = "00210d6893afc98edb752b664b8890f0ef174c8adbb8d0be9710fa66fbbf72d3" [[package]] name = "icu_properties" -version = "1.5.1" +version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "93d6020766cfc6302c15dbbc9c8778c37e62c14427cb7f6e601d849e092aeef5" +checksum = "2549ca8c7241c82f59c80ba2a6f415d931c5b58d24fb8412caa1a1f02c49139a" dependencies = [ "displaydoc", "icu_collections", - "icu_locid_transform", + "icu_locale_core", "icu_properties_data", "icu_provider", - "tinystr", + "potential_utf", + "zerotrie", "zerovec", ] [[package]] name = "icu_properties_data" -version = "1.5.1" +version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85fb8799753b75aee8d2a21d7c14d9f38921b54b3dbda10f5a3c7a7b82dba5e2" +checksum = "8197e866e47b68f8f7d95249e172903bec06004b18b2937f1095d40a0c57de04" [[package]] name = "icu_provider" -version = "1.5.0" +version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ed421c8a8ef78d3e2dbc98a973be2f3770cb42b606e3ab18d6237c4dfde68d9" +checksum = "03c80da27b5f4187909049ee2d72f276f0d9f99a42c306bd0131ecfe04d8e5af" dependencies = [ "displaydoc", - "icu_locid", - "icu_provider_macros", + "icu_locale_core", "stable_deref_trait", "tinystr", "writeable", "yoke", "zerofrom", + "zerotrie", "zerovec", ] -[[package]] -name = "icu_provider_macros" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ec89e9337638ecdc08744df490b221a7399bf8d164eb52a665454e60e075ad6" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.101", -] - [[package]] name = "ident_case" version = "1.0.1" @@ -3902,9 +3844,9 @@ dependencies = [ [[package]] name = "idna_adapter" -version = "1.2.0" +version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "daca1df1c957320b2cf139ac61e7bd64fed304c5040df000a745aa1de3b4ef71" +checksum = "3acae9609540aa318d1bc588455225fb2085b9ed0c4f6bd0d9d5bcd86f1a0344" dependencies = [ "icu_normalizer", "icu_properties", @@ -4011,7 +3953,7 @@ version = "0.12.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2094aecddc672e902cd773bad7071542f63641e01e9187c3bba4b43005e837e9" dependencies = [ - "ahash 0.8.11", + "ahash 0.8.12", "clap", "crossbeam-channel", "crossbeam-utils", @@ -4033,7 +3975,7 @@ version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f37dccff2791ab604f9babef0ba14fbe0be30bd368dc541e2b08d07c8aa908f3" dependencies = [ - "bitflags 2.9.0", + "bitflags 2.9.1", "inotify-sys", "libc", ] @@ -4047,15 +3989,6 @@ dependencies = [ "libc", ] -[[package]] -name = "inout" -version = "0.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "879f10e63c20629ecabbb64a8010319738c66a5cd0c29b02d63d272b03751d01" -dependencies = [ - "generic-array", -] - [[package]] name = "instant" version = "0.1.13" @@ -4252,7 +4185,7 @@ version = "0.1.33" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "38f262f097c174adebe41eb73d66ae9c06b2844fb0da69969647bbddd9b0538a" dependencies = [ - "getrandom 0.3.2", + "getrandom 0.3.3", "libc", ] @@ -4335,7 +4268,7 @@ version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b750dcadc39a09dbadd74e118f6dd6598df77fa01df0cfcdc52c28dece74528a" dependencies = [ - "bitflags 2.9.0", + "bitflags 2.9.1", "serde", "unicode-segmentation", ] @@ -4390,7 +4323,7 @@ dependencies = [ "async-stripe", "async-trait", "base64 0.22.1", - "bitflags 2.9.0", + "bitflags 2.9.1", "bytes", "censor", "chrono", @@ -4400,7 +4333,6 @@ dependencies = [ "console-subscriber", "dashmap", "deadpool-redis", - "derive-new", "dotenv-build", "dotenvy", "either", @@ -4409,7 +4341,6 @@ dependencies = [ "futures-util", "hex", "hmac", - "hyper 1.6.0", "hyper-tls", "hyper-util", "iana-time-zone", @@ -4417,7 +4348,6 @@ dependencies = [ "itertools 0.14.0", "jemalloc_pprof", "json-patch 4.0.0", - "lazy_static", "lettre", "maxminddb", "meilisearch-sdk", @@ -4457,7 +4387,6 @@ dependencies = [ "webp", "woothee", "yaserde", - "yaserde_derive", "zip", "zxcvbn", ] @@ -4485,9 +4414,9 @@ checksum = "03087c2bad5e1034e8cace5926dec053fb3790248370865f5117a7d0213354c8" [[package]] name = "lettre" -version = "0.11.15" +version = "0.11.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "759bc2b8eabb6a30b235d6f716f7f36479f4b38cbe65b8747aefee51f89e8437" +checksum = "87ffd14fa289730e3ad68edefdc31f603d56fe716ec38f2076bb7410e09147c2" dependencies = [ "base64 0.22.1", "chumsky", @@ -4499,10 +4428,11 @@ dependencies = [ "httpdate", "idna", "mime", - "native-tls", "nom 8.0.0", "percent-encoding", "quoted_printable", + "rustls 0.23.27", + "rustls-native-certs 0.8.1", "socket2", "tokio", "url", @@ -4538,16 +4468,6 @@ version = "0.2.172" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d750af042f7ef4f724306de029d18836c26c1765a54a6a3f094cbd23a7267ffa" -[[package]] -name = "libdbus-sys" -version = "0.2.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "06085512b750d640299b79be4bad3d2fa90a9c00b1fd9e1b46364f66f0485c72" -dependencies = [ - "cc", - "pkg-config", -] - [[package]] name = "libfuzzer-sys" version = "0.4.9" @@ -4580,7 +4500,7 @@ version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c0ff37bd590ca25063e35af745c343cb7a0271906fb7b37e4813e8f79f00268d" dependencies = [ - "bitflags 2.9.0", + "bitflags 2.9.1", "libc", "redox_syscall", ] @@ -4606,6 +4526,15 @@ dependencies = [ "glob", ] +[[package]] +name = "libz-rs-sys" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6489ca9bd760fe9642d7644e827b0c9add07df89857b0416ee15c1cc1a3b8c5a" +dependencies = [ + "zlib-rs", +] + [[package]] name = "linux-raw-sys" version = "0.4.15" @@ -4620,9 +4549,9 @@ checksum = "cd945864f07fe9f5371a27ad7b52a172b4b499999f1d97574c9fa68373937e12" [[package]] name = "litemap" -version = "0.7.5" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23fb14cb19457329c82206317a5663005a4d404783dc74f4252769b0d5f42856" +checksum = "241eaef5fd12c88705a01fc1066c48c4b36e0dd4377dcdc7ec3942cea7a69956" [[package]] name = "local-channel" @@ -4679,33 +4608,18 @@ dependencies = [ "imgref", ] +[[package]] +name = "lru-slab" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "112b39cec0b298b6c1999fee3e31427f74f676e4cb9879ed1a121b43661a4154" + [[package]] name = "lz4_flex" version = "0.11.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "75761162ae2b0e580d7e7c390558127e5f01b4194debd6221fd8c207fc80e3f5" -[[package]] -name = "lzma-rs" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "297e814c836ae64db86b36cf2a557ba54368d03f6afcd7d947c266692f71115e" -dependencies = [ - "byteorder", - "crc", -] - -[[package]] -name = "lzma-sys" -version = "0.1.20" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5fda04ab3764e6cde78b9974eec4f779acaba7c4e84b36eca3cf77c581b85d27" -dependencies = [ - "cc", - "libc", - "pkg-config", -] - [[package]] name = "mac" version = "0.1.1" @@ -5023,7 +4937,7 @@ version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c3f42e7bbe13d351b6bead8286a43aac9534b82bd3cc43e47037f012ebfd62d4" dependencies = [ - "bitflags 2.9.0", + "bitflags 2.9.1", "jni-sys", "log", "ndk-sys", @@ -5055,11 +4969,11 @@ checksum = "650eef8c711430f1a879fdd01d4745a7deea475becfb90269c06775983bbf086" [[package]] name = "nix" -version = "0.29.0" +version = "0.30.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "71e2746dc3a24dd78b3cfcb7be93368c6de9963d30f43a6a73998a9cf4b17b46" +checksum = "74523f3a35e05aba87a1d978330aef40f67b0304ac79c1c00b294c9830543db6" dependencies = [ - "bitflags 2.9.0", + "bitflags 2.9.1", "cfg-if", "cfg_aliases", "libc", @@ -5097,22 +5011,13 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0676bb32a98c1a483ce53e500a81ad9c3d5b3f7c920c28c24e9cb0980d0b5bc8" -[[package]] -name = "normpath" -version = "1.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c8911957c4b1549ac0dc74e30db9c8b0e66ddcd6d7acc33098f4c63a64a6d7ed" -dependencies = [ - "windows-sys 0.59.0", -] - [[package]] name = "notify" version = "8.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2fee8403b3d66ac7b26aee6e40a897d85dc5ce26f44da36b8b73e987cc52e943" dependencies = [ - "bitflags 2.9.0", + "bitflags 2.9.1", "filetime", "fsevent-sys", "inotify", @@ -5349,7 +5254,7 @@ version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e6f29f568bec459b0ddff777cec4fe3fd8666d82d5a40ebd0ff7e66134f89bcc" dependencies = [ - "bitflags 2.9.0", + "bitflags 2.9.1", "block2 0.6.1", "libc", "objc2 0.6.1", @@ -5368,7 +5273,7 @@ version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "17614fdcd9b411e6ff1117dfb1d0150f908ba83a7df81b1f118005fe0a8ea15d" dependencies = [ - "bitflags 2.9.0", + "bitflags 2.9.1", "objc2 0.6.1", "objc2-foundation 0.3.1", ] @@ -5379,7 +5284,7 @@ version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "291fbbf7d29287518e8686417cf7239c74700fd4b607623140a7d4a3c834329d" dependencies = [ - "bitflags 2.9.0", + "bitflags 2.9.1", "objc2 0.6.1", "objc2-foundation 0.3.1", ] @@ -5390,7 +5295,7 @@ version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1c10c2894a6fed806ade6027bcd50662746363a9589d3ec9d9bef30a4e4bc166" dependencies = [ - "bitflags 2.9.0", + "bitflags 2.9.1", "block2 0.6.1", "dispatch2 0.3.0", "libc", @@ -5403,7 +5308,7 @@ version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "989c6c68c13021b5c2d6b71456ebb0f9dc78d752e86a98da7c716f4f9470f5a4" dependencies = [ - "bitflags 2.9.0", + "bitflags 2.9.1", "block2 0.6.1", "dispatch2 0.3.0", "libc", @@ -5444,7 +5349,7 @@ version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0ee638a5da3799329310ad4cfa62fbf045d5f56e3ef5ba4149e7452dcf89d5a8" dependencies = [ - "bitflags 2.9.0", + "bitflags 2.9.1", "block2 0.5.1", "libc", "objc2 0.5.2", @@ -5456,7 +5361,7 @@ version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "900831247d2fe1a09a683278e5384cfb8c80c79fe6b166f9d14bfdde0ea1b03c" dependencies = [ - "bitflags 2.9.0", + "bitflags 2.9.1", "block2 0.6.1", "libc", "objc2 0.6.1", @@ -5479,7 +5384,7 @@ version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7282e9ac92529fa3457ce90ebb15f4ecbc383e8338060960760fa2cf75420c3c" dependencies = [ - "bitflags 2.9.0", + "bitflags 2.9.1", "objc2 0.6.1", "objc2-core-foundation", ] @@ -5490,7 +5395,7 @@ version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dd0cba1276f6023976a406a14ffa85e1fdd19df6b0f737b063b95f6c8c7aadd6" dependencies = [ - "bitflags 2.9.0", + "bitflags 2.9.1", "block2 0.5.1", "objc2 0.5.2", "objc2-foundation 0.2.2", @@ -5502,7 +5407,7 @@ version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7f246c183239540aab1782457b35ab2040d4259175bd1d0c58e46ada7b47a874" dependencies = [ - "bitflags 2.9.0", + "bitflags 2.9.1", "objc2 0.6.1", "objc2-foundation 0.3.1", ] @@ -5513,7 +5418,7 @@ version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "26bb88504b5a050dbba515d2414607bf5e57dd56b107bc5f0351197a3e7bdc5d" dependencies = [ - "bitflags 2.9.0", + "bitflags 2.9.1", "objc2 0.6.1", "objc2-app-kit", "objc2-foundation 0.3.1", @@ -5525,7 +5430,7 @@ version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e42bee7bff906b14b167da2bac5efe6b6a07e6f7c0a21a7308d40c960242dc7a" dependencies = [ - "bitflags 2.9.0", + "bitflags 2.9.1", "block2 0.5.1", "objc2 0.5.2", "objc2-foundation 0.2.2", @@ -5538,7 +5443,7 @@ version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "90ffb6a0cd5f182dc964334388560b12a57f7b74b3e2dec5e2722aa2dfb2ccd5" dependencies = [ - "bitflags 2.9.0", + "bitflags 2.9.1", "objc2 0.6.1", "objc2-foundation 0.3.1", ] @@ -5549,7 +5454,7 @@ version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "25b1312ad7bc8a0e92adae17aa10f90aae1fb618832f9b993b022b591027daed" dependencies = [ - "bitflags 2.9.0", + "bitflags 2.9.1", "objc2 0.6.1", "objc2-core-foundation", "objc2-foundation 0.3.1", @@ -5561,7 +5466,7 @@ version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "91672909de8b1ce1c2252e95bbee8c1649c9ad9d14b9248b3d7b4c47903c47ad" dependencies = [ - "bitflags 2.9.0", + "bitflags 2.9.1", "block2 0.6.1", "objc2 0.6.1", "objc2-app-kit", @@ -5600,26 +5505,13 @@ dependencies = [ "pathdiff", ] -[[package]] -name = "opener" -version = "0.7.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d0812e5e4df08da354c851a3376fead46db31c2214f849d3de356d774d057681" -dependencies = [ - "bstr", - "dbus", - "normpath", - "url", - "windows-sys 0.59.0", -] - [[package]] name = "openssl" version = "0.10.72" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fedfea7d58a1f73118430a55da6a286e7b044961736ce96a16a17068ea25e5da" dependencies = [ - "bitflags 2.9.0", + "bitflags 2.9.1", "cfg-if", "foreign-types 0.3.2", "libc", @@ -5645,15 +5537,6 @@ version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d05e27ee213611ffe7d6348b942e8f942b37114c00cc03cec254295a4a17852e" -[[package]] -name = "openssl-src" -version = "300.5.0+3.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e8ce546f549326b0e6052b649198487d91320875da901e7bd11a06d1ee3f9c2f" -dependencies = [ - "cc", -] - [[package]] name = "openssl-sys" version = "0.9.108" @@ -5662,7 +5545,6 @@ checksum = "e145e1651e858e820e4860f7b9c5e169bc1d8ce1c86043be79fa7b7634821847" dependencies = [ "cc", "libc", - "openssl-src", "pkg-config", "vcpkg", ] @@ -5695,9 +5577,9 @@ dependencies = [ [[package]] name = "os_info" -version = "3.10.0" +version = "3.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a604e53c24761286860eba4e2c8b23a0161526476b1de520139d69cdb85a6b5" +checksum = "41fc863e2ca13dc2d5c34fb22ea4a588248ac14db929616ba65c45f21744b1e9" dependencies = [ "log", "serde", @@ -5819,16 +5701,6 @@ version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "df94ce210e5bc13cb6651479fa48d14f601d9858cfe0467f43ae157023b938d3" -[[package]] -name = "pbkdf2" -version = "0.12.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8ed6a7761f76e3b9f92dfb0a60a6a6477c61024b775147ff0973a02653abaf2" -dependencies = [ - "digest", - "hmac", -] - [[package]] name = "pem-rfc7468" version = "0.7.0" @@ -6095,6 +5967,15 @@ version = "1.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "350e9b48cbc6b0e028b0473b114454c6316e57336ee184ceab6e53f72c178b3e" +[[package]] +name = "potential_utf" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e5a7c30837279ca13e7c867e9e40053bc68740f988cb07f7ca6df43cc734b585" +dependencies = [ + "zerovec", +] + [[package]] name = "powerfmt" version = "0.2.0" @@ -6122,7 +6003,7 @@ version = "0.2.21" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "85eae3c4ed2f50dcfe72643da4befc30deadb458a9b590d720cde2f2b1e97da9" dependencies = [ - "zerocopy 0.8.25", + "zerocopy", ] [[package]] @@ -6245,24 +6126,23 @@ dependencies = [ [[package]] name = "procfs" -version = "0.16.0" +version = "0.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "731e0d9356b0c25f16f33b5be79b1c57b562f141ebfcdb0ad8ac2c13a24293b4" +checksum = "cc5b72d8145275d844d4b5f6d4e1eef00c8cd889edb6035c21675d1bb1f45c9f" dependencies = [ - "bitflags 2.9.0", + "bitflags 2.9.1", "hex", - "lazy_static", "procfs-core", "rustix 0.38.44", ] [[package]] name = "procfs-core" -version = "0.16.0" +version = "0.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d3554923a69f4ce04c4a754260c338f505ce22642d3830e049a399fc2059a29" +checksum = "239df02d8349b06fc07398a3a1697b06418223b1c7725085e801e7c0fc6a12ec" dependencies = [ - "bitflags 2.9.0", + "bitflags 2.9.1", "hex", ] @@ -6287,9 +6167,9 @@ dependencies = [ [[package]] name = "prometheus" -version = "0.13.4" +version = "0.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d33c28a30771f7f96db69893f78b857f7450d7e0237e9c8fc6427a81bae7ed1" +checksum = "3ca5326d8d0b950a9acd87e6a3f94745394f62e4dae1b1ee22b2bc0c394af43a" dependencies = [ "cfg-if", "fnv", @@ -6299,7 +6179,7 @@ dependencies = [ "parking_lot", "procfs", "protobuf", - "thiserror 1.0.69", + "thiserror 2.0.12", ] [[package]] @@ -6336,9 +6216,23 @@ dependencies = [ [[package]] name = "protobuf" -version = "2.28.0" +version = "3.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "106dd99e98437432fed6519dedecfade6a06a73bb7b2a1e019fdd2bee5778d94" +checksum = "d65a1d4ddae7d8b5de68153b48f6aa3bba8cb002b243dbdbc55a5afbc98f99f4" +dependencies = [ + "once_cell", + "protobuf-support", + "thiserror 1.0.69", +] + +[[package]] +name = "protobuf-support" +version = "3.7.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3e36c2f31e0a47f9280fb347ef5e461ffcd2c52dd520d8e216b52f93b0b0d7d6" +dependencies = [ + "thiserror 1.0.69", +] [[package]] name = "psm" @@ -6431,9 +6325,9 @@ dependencies = [ [[package]] name = "quinn" -version = "0.11.7" +version = "0.11.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3bd15a6f2967aef83887dcb9fec0014580467e33720d073560cf015a5683012" +checksum = "626214629cda6781b6dc1d316ba307189c85ba657213ce642d9c77670f8202c8" dependencies = [ "bytes", "cfg_aliases", @@ -6451,12 +6345,13 @@ dependencies = [ [[package]] name = "quinn-proto" -version = "0.11.11" +version = "0.11.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bcbafbbdbb0f638fe3f35f3c56739f77a8a1d070cb25603226c83339b391472b" +checksum = "49df843a9161c85bb8aae55f101bc0bac8bcafd637a620d9122fd7e0b2f7422e" dependencies = [ "bytes", - "getrandom 0.3.2", + "getrandom 0.3.3", + "lru-slab", "rand 0.9.1", "ring", "rustc-hash", @@ -6610,7 +6505,7 @@ version = "0.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "99d9a13982dcf210057a8a78572b2217b667c3beacbf3a0d8b454f6f82837d38" dependencies = [ - "getrandom 0.3.2", + "getrandom 0.3.3", ] [[package]] @@ -6713,7 +6608,7 @@ version = "0.29.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1bc42f3a12fd4408ce64d8efef67048a924e543bd35c6591c0447fda9054695f" dependencies = [ - "ahash 0.8.11", + "ahash 0.8.12", "arc-swap", "bytes", "combine", @@ -6737,7 +6632,7 @@ version = "0.5.12" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "928fca9cf2aa042393a8325b9ead81d2f0df4cb12e1e24cef072922ccd99c5af" dependencies = [ - "bitflags 2.9.0", + "bitflags 2.9.1", ] [[package]] @@ -6846,14 +6741,12 @@ dependencies = [ "http-body-util", "hyper 1.6.0", "hyper-rustls 0.27.5", - "hyper-tls", "hyper-util", "ipnet", "js-sys", "log", "mime", "mime_guess", - "native-tls", "once_cell", "percent-encoding", "pin-project-lite", @@ -6868,7 +6761,6 @@ dependencies = [ "sync_wrapper", "system-configuration", "tokio", - "tokio-native-tls", "tokio-rustls 0.26.2", "tokio-util", "tower 0.5.2", @@ -6884,9 +6776,9 @@ dependencies = [ [[package]] name = "resolv-conf" -version = "0.7.3" +version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fc7c8f7f733062b66dc1c63f9db168ac0b97a9210e247fa90fdc9ad08f51b302" +checksum = "95325155c684b1c89f7765e30bc1c42e4a6da51ca513615660cb8a62ef9a88e3" [[package]] name = "result" @@ -7115,7 +7007,7 @@ version = "0.38.44" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fdb5bc1ae2baa591800df16c9ca78619bf65c0488b41b96ccec5d11220d8c154" dependencies = [ - "bitflags 2.9.0", + "bitflags 2.9.1", "errno", "libc", "linux-raw-sys 0.4.15", @@ -7128,7 +7020,7 @@ version = "1.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c71e83d6afe7ff64890ec6b71d6a69bb8a610ab78ce364b3352876bb4c801266" dependencies = [ - "bitflags 2.9.0", + "bitflags 2.9.1", "errno", "libc", "linux-raw-sys 0.9.4", @@ -7157,7 +7049,7 @@ dependencies = [ "once_cell", "ring", "rustls-pki-types", - "rustls-webpki 0.103.2", + "rustls-webpki 0.103.3", "subtle", "zeroize", ] @@ -7226,9 +7118,9 @@ dependencies = [ [[package]] name = "rustls-webpki" -version = "0.103.2" +version = "0.103.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7149975849f1abb3832b246010ef62ccc80d3a76169517ada7188252b9cfb437" +checksum = "e4a72fe2bcf7a6ac6fd7d0b9e5cb68aeb7d4c0a0271730218b3e92d43b4eb435" dependencies = [ "ring", "rustls-pki-types", @@ -7387,7 +7279,7 @@ version = "2.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "897b2245f0b511c87893af39b033e5ca9cce68824c4d7e7630b5a1d339658d02" dependencies = [ - "bitflags 2.9.0", + "bitflags 2.9.1", "core-foundation 0.9.4", "core-foundation-sys", "libc", @@ -7400,7 +7292,7 @@ version = "3.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "271720403f46ca04f7ba6f55d438f8bd878d6b8ca0a1046e8228c4145bcbb316" dependencies = [ - "bitflags 2.9.0", + "bitflags 2.9.1", "core-foundation 0.10.0", "core-foundation-sys", "libc", @@ -7448,9 +7340,9 @@ dependencies = [ [[package]] name = "sentry" -version = "0.37.0" +version = "0.38.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "255914a8e53822abd946e2ce8baa41d4cded6b8e938913b7f7b9da5b7ab44335" +checksum = "a505499b38861edd82b5a688fa06ba4ba5875bb832adeeeba22b7b23fc4bc39a" dependencies = [ "httpdate", "reqwest", @@ -7468,9 +7360,9 @@ dependencies = [ [[package]] name = "sentry-actix" -version = "0.37.0" +version = "0.38.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a927aed43cce0e9240f7477ac81cdfa2ffb048e0e2b17000eb5976e14f063993" +checksum = "39ad8bfdcfbc6e0d0dacaa5728555085ef459fa9226cfc2fe64eefa4b8038b7f" dependencies = [ "actix-http", "actix-web", @@ -7481,21 +7373,20 @@ dependencies = [ [[package]] name = "sentry-backtrace" -version = "0.37.0" +version = "0.38.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "00293cd332a859961f24fd69258f7e92af736feaeb91020cff84dac4188a4302" +checksum = "8dace796060e4ad10e3d1405b122ae184a8b2e71dce05ae450e4f81b7686b0d9" dependencies = [ "backtrace", - "once_cell", "regex", "sentry-core", ] [[package]] name = "sentry-contexts" -version = "0.37.0" +version = "0.38.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "961990f9caa76476c481de130ada05614cd7f5aa70fb57c2142f0e09ad3fb2aa" +checksum = "87bd9e6b51ffe2bc7188ebe36cb67557cb95749c08a3f81f33e8c9b135e0d1bc" dependencies = [ "hostname", "libc", @@ -7507,12 +7398,11 @@ dependencies = [ [[package]] name = "sentry-core" -version = "0.37.0" +version = "0.38.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a6409d845707d82415c800290a5d63be5e3df3c2e417b0997c60531dfbd35ef" +checksum = "7426d4beec270cfdbb50f85f0bb2ce176ea57eed0b11741182a163055a558187" dependencies = [ - "once_cell", - "rand 0.8.5", + "rand 0.9.1", "sentry-types", "serde", "serde_json", @@ -7520,20 +7410,19 @@ dependencies = [ [[package]] name = "sentry-debug-images" -version = "0.37.0" +version = "0.38.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "71ab5df4f3b64760508edfe0ba4290feab5acbbda7566a79d72673065888e5cc" +checksum = "9df15c066c04f34c4dfd496a8e76590106b93283f72ef1a47d8fb24d88493424" dependencies = [ "findshlibs", - "once_cell", "sentry-core", ] [[package]] name = "sentry-panic" -version = "0.37.0" +version = "0.38.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "609b1a12340495ce17baeec9e08ff8ed423c337c1a84dffae36a178c783623f3" +checksum = "c92beed69b776a162b6d269bef1eaa3e614090b6df45a88d9b239c4fdbffdfba" dependencies = [ "sentry-backtrace", "sentry-core", @@ -7541,9 +7430,9 @@ dependencies = [ [[package]] name = "sentry-tracing" -version = "0.37.0" +version = "0.38.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49f4e86402d5c50239dc7d8fd3f6d5e048221d5fcb4e026d8d50ab57fe4644cb" +checksum = "55c323492795de90824f3198562e33dd74ae3bc852fbb13c0cabec54a1cf73cd" dependencies = [ "sentry-backtrace", "sentry-core", @@ -7553,16 +7442,16 @@ dependencies = [ [[package]] name = "sentry-types" -version = "0.37.0" +version = "0.38.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d3f117b8755dbede8260952de2aeb029e20f432e72634e8969af34324591631" +checksum = "04b6c9287202294685cb1f749b944dbbce8160b81a1061ecddc073025fed129f" dependencies = [ "debugid", "hex", - "rand 0.8.5", + "rand 0.9.1", "serde", "serde_json", - "thiserror 1.0.69", + "thiserror 2.0.12", "time", "url", "uuid 1.16.0", @@ -7590,9 +7479,9 @@ dependencies = [ [[package]] name = "serde-xml-rs" -version = "0.6.0" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fb3aa78ecda1ebc9ec9847d5d3aba7d618823446a049ba2491940506da6e2782" +checksum = "176b7ff880ab6ead7a020e773e9c096467fe347615a3e22ac29300cbdef67a5d" dependencies = [ "log", "serde", @@ -8139,7 +8028,7 @@ checksum = "0afdd3aa7a629683c2d750c2df343025545087081ab5942593a5288855b1b7a7" dependencies = [ "atoi", "base64 0.22.1", - "bitflags 2.9.0", + "bitflags 2.9.1", "byteorder", "bytes", "chrono", @@ -8183,7 +8072,7 @@ checksum = "a0bedbe1bbb5e2615ef347a5e9d8cd7680fb63e77d9dafc0f29be15e53f1ebe6" dependencies = [ "atoi", "base64 0.22.1", - "bitflags 2.9.0", + "bitflags 2.9.1", "byteorder", "chrono", "crc", @@ -8400,16 +8289,6 @@ dependencies = [ "syn 2.0.101", ] -[[package]] -name = "sys-info" -version = "0.9.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b3a0d0aba8bf96a0e1ddfdc352fc53b3df7f39318c71854910c3c4b024ae52c" -dependencies = [ - "cc", - "libc", -] - [[package]] name = "sys-locale" version = "0.3.2" @@ -8421,9 +8300,9 @@ dependencies = [ [[package]] name = "sysinfo" -version = "0.35.0" +version = "0.35.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b897c8ea620e181c7955369a31be5f48d9a9121cb59fd33ecef9ff2a34323422" +checksum = "79251336d17c72d9762b8b54be4befe38d2db56fbbc0241396d70f173c39d47a" dependencies = [ "libc", "memchr", @@ -8439,7 +8318,7 @@ version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3c879d448e9d986b661742763247d3693ed13609438cf3d006f51f5368a5ba6b" dependencies = [ - "bitflags 2.9.0", + "bitflags 2.9.1", "core-foundation 0.9.4", "system-configuration-sys", ] @@ -8479,7 +8358,7 @@ version = "0.33.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1e59c1f38e657351a2e822eadf40d6a2ad4627b9c25557bc1180ec1b3295ef82" dependencies = [ - "bitflags 2.9.0", + "bitflags 2.9.1", "core-foundation 0.10.0", "core-graphics", "crossbeam-channel", @@ -8629,7 +8508,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f93f035551bf7b11b3f51ad9bc231ebbe5e085565527991c16cf326aa38cdf47" dependencies = [ "base64 0.22.1", - "brotli", + "brotli 7.0.0", "ico", "json-patch 3.0.1", "plist", @@ -8697,7 +8576,7 @@ dependencies = [ "tracing", "url", "windows-registry 0.5.1", - "windows-result 0.3.2", + "windows-result", ] [[package]] @@ -8825,7 +8704,6 @@ dependencies = [ "tokio", "url", "windows-sys 0.59.0", - "zip", ] [[package]] @@ -8834,7 +8712,7 @@ version = "2.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a27a3fe49de72adbe0d84aee33c89a0b059722cd0b42aaeab29eaaee7f7535cd" dependencies = [ - "bitflags 2.9.0", + "bitflags 2.9.1", "log", "serde", "serde_json", @@ -8899,7 +8777,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b2900399c239a471bcff7f15c4399eb1a8c4fe511ba2853e07c996d771a5e0a4" dependencies = [ "anyhow", - "brotli", + "brotli 7.0.0", "cargo_metadata", "ctor", "dunce", @@ -8943,12 +8821,12 @@ dependencies = [ [[package]] name = "tempfile" -version = "3.19.1" +version = "3.20.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7437ac7763b9b123ccf33c338a5cc1bac6f69b45a136c19bdd8a65e3916435bf" +checksum = "e8a64e3985349f2441a1a9ef0b853f869006c3855f2cda6862a94d26ebb9d6a1" dependencies = [ "fastrand 2.3.0", - "getrandom 0.3.2", + "getrandom 0.3.3", "once_cell", "rustix 1.0.7", "windows-sys 0.59.0", @@ -8987,7 +8865,6 @@ dependencies = [ "async-walkdir", "async_zip", "base64 0.22.1", - "byteorder", "bytes", "chrono", "daedalus", @@ -9002,7 +8879,6 @@ dependencies = [ "futures", "hickory-resolver", "indicatif", - "lazy_static", "notify", "notify-debouncer-mini", "p256", @@ -9018,7 +8894,6 @@ dependencies = [ "sha1_smol", "sha2", "sqlx", - "sys-info", "sysinfo", "tauri", "tempfile", @@ -9045,7 +8920,6 @@ dependencies = [ "either", "enumset", "native-dialog", - "opener", "paste", "serde", "serde_json", @@ -9076,8 +8950,6 @@ dependencies = [ "enumset", "theseus", "tokio", - "tracing", - "webbrowser", ] [[package]] @@ -9220,9 +9092,9 @@ dependencies = [ [[package]] name = "tinystr" -version = "0.7.6" +version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9117f5d4db391c1cf6927e7bea3db74b9a1c1add8f7eda9ffd5364f40f57b82f" +checksum = "5d4f6d1145dcb577acf783d4e601bc1d76a13337bb54e6233add580b07344c8b" dependencies = [ "displaydoc", "zerovec", @@ -9808,12 +9680,6 @@ version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "09cc8ee72d2a9becf2f2febe0205bbed8fc6615b7cb429ad062dc7b7ddd036a9" -[[package]] -name = "utf16_iter" -version = "1.0.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c8232dd3cdaed5356e0f716d285e4b40b932ac434100fe9b7e0e8e935b9e6246" - [[package]] name = "utf8_iter" version = "1.0.4" @@ -9841,7 +9707,7 @@ version = "1.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "458f7a779bf54acc9f347480ac654f68407d3aab21269a6e3c9f922acd9e2da9" dependencies = [ - "getrandom 0.3.2", + "getrandom 0.3.3", "js-sys", "rand 0.9.1", "serde", @@ -10111,23 +9977,6 @@ dependencies = [ "wasm-bindgen", ] -[[package]] -name = "webbrowser" -version = "1.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d5df295f8451142f1856b1bd86a606dfe9587d439bc036e319c827700dbd555e" -dependencies = [ - "core-foundation 0.10.0", - "home", - "jni", - "log", - "ndk-context", - "objc2 0.6.1", - "objc2-foundation 0.3.1", - "url", - "web-sys", -] - [[package]] name = "webkit2gtk" version = "2.0.1" @@ -10178,7 +10027,6 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8f53152f51fb5af0c08484c33d16cca96175881d1f3dec068c23b31a158c2d99" dependencies = [ - "image", "libwebp-sys", ] @@ -10211,7 +10059,7 @@ dependencies = [ "windows 0.61.1", "windows-core 0.61.0", "windows-implement 0.60.0", - "windows-interface 0.59.1", + "windows-interface", ] [[package]] @@ -10327,16 +10175,6 @@ dependencies = [ "windows-version", ] -[[package]] -name = "windows" -version = "0.58.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd04d41d93c4992d421894c18c8b43496aa748dd4c081bac0dc93eb0489272b6" -dependencies = [ - "windows-core 0.58.0", - "windows-targets 0.52.6", -] - [[package]] name = "windows" version = "0.60.0" @@ -10381,19 +10219,6 @@ dependencies = [ "windows-core 0.61.0", ] -[[package]] -name = "windows-core" -version = "0.58.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ba6d44ec8c2591c134257ce647b7ea6b20335bf6379a27dac5f1641fcf59f99" -dependencies = [ - "windows-implement 0.58.0", - "windows-interface 0.58.0", - "windows-result 0.2.0", - "windows-strings 0.1.0", - "windows-targets 0.52.6", -] - [[package]] name = "windows-core" version = "0.60.1" @@ -10401,9 +10226,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ca21a92a9cae9bf4ccae5cf8368dce0837100ddf6e6d57936749e85f152f6247" dependencies = [ "windows-implement 0.59.0", - "windows-interface 0.59.1", + "windows-interface", "windows-link", - "windows-result 0.3.2", + "windows-result", "windows-strings 0.3.1", ] @@ -10414,9 +10239,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4763c1de310c86d75a878046489e2e5ba02c649d185f21c67d4cf8a56d098980" dependencies = [ "windows-implement 0.60.0", - "windows-interface 0.59.1", + "windows-interface", "windows-link", - "windows-result 0.3.2", + "windows-result", "windows-strings 0.4.0", ] @@ -10440,17 +10265,6 @@ dependencies = [ "windows-link", ] -[[package]] -name = "windows-implement" -version = "0.58.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2bbd5b46c938e506ecbce286b6628a02171d56153ba733b6c741fc627ec9579b" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.101", -] - [[package]] name = "windows-implement" version = "0.59.0" @@ -10473,17 +10287,6 @@ dependencies = [ "syn 2.0.101", ] -[[package]] -name = "windows-interface" -version = "0.58.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "053c4c462dc91d3b1504c6fe5a726dd15e216ba718e84a0e46a88fbe5ded3515" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.101", -] - [[package]] name = "windows-interface" version = "0.59.1" @@ -10527,7 +10330,7 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4286ad90ddb45071efd1a66dfa43eb02dd0dfbae1545ad6cc3c51cf34d7e8ba3" dependencies = [ - "windows-result 0.3.2", + "windows-result", "windows-strings 0.3.1", "windows-targets 0.53.0", ] @@ -10539,19 +10342,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ad1da3e436dc7653dfdf3da67332e22bff09bb0e28b0239e1624499c7830842e" dependencies = [ "windows-link", - "windows-result 0.3.2", + "windows-result", "windows-strings 0.4.0", ] -[[package]] -name = "windows-result" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d1043d8214f791817bab27572aaa8af63732e11bf84aa21a45a78d6c317ae0e" -dependencies = [ - "windows-targets 0.52.6", -] - [[package]] name = "windows-result" version = "0.3.2" @@ -10561,16 +10355,6 @@ dependencies = [ "windows-link", ] -[[package]] -name = "windows-strings" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4cd9b125c486025df0eabcb585e62173c6c9eddcec5d117d3b6e8c30e2ee4d10" -dependencies = [ - "windows-result 0.2.0", - "windows-targets 0.52.6", -] - [[package]] name = "windows-strings" version = "0.3.1" @@ -10936,7 +10720,7 @@ version = "0.39.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6f42320e61fe2cfd34354ecb597f86f413484a798ba44a8ca1165c58d42da6c1" dependencies = [ - "bitflags 2.9.0", + "bitflags 2.9.1", ] [[package]] @@ -10949,17 +10733,11 @@ dependencies = [ "regex", ] -[[package]] -name = "write16" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d1890f4022759daae28ed4fe62859b1236caebfc61ede2f63ed4e695f3f6d936" - [[package]] name = "writeable" -version = "0.5.5" +version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e9df38ee2d2c3c5948ea468a8406ff0db0b29ae1ffde1bcf20ef305bcc95c51" +checksum = "ea2f10b9bb0928dfb1b42b65e1f9e36f7f54dbdf08457afefb38afcdec4fa2bb" [[package]] name = "wry" @@ -11048,15 +10826,6 @@ version = "0.8.26" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a62ce76d9b56901b19a74f19431b0d8b3bc7ca4ad685a746dfd78ca8f4fc6bda" -[[package]] -name = "xz2" -version = "0.1.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "388c44dc09d76f1536602ead6d325eb532f5c122f17782bd57fb47baeeb767e2" -dependencies = [ - "lzma-sys", -] - [[package]] name = "yaserde" version = "0.12.0" @@ -11065,6 +10834,7 @@ checksum = "8bfa0d2b420fd005aa9b6f99f9584ebd964e6865d7ca787304cc1a3366c39231" dependencies = [ "log", "xml-rs", + "yaserde_derive", ] [[package]] @@ -11096,9 +10866,9 @@ dependencies = [ [[package]] name = "yoke" -version = "0.7.5" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "120e6aef9aa629e3d4f52dc8cc43a015c7724194c97dfaf45180d2daf2b77f40" +checksum = "5f41bb01b8226ef4bfd589436a297c53d118f65921786300e427be8d487695cc" dependencies = [ "serde", "stable_deref_trait", @@ -11108,9 +10878,9 @@ dependencies = [ [[package]] name = "yoke-derive" -version = "0.7.5" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2380878cad4ac9aac1e2435f3eb4020e8374b5f13c296cb75b4620ff8e229154" +checksum = "38da3c9736e16c5d3c8c597a9aaa5d1fa565d0532ae05e27c24aa62fb32c0ab6" dependencies = [ "proc-macro2", "quote", @@ -11120,9 +10890,9 @@ dependencies = [ [[package]] name = "zbus" -version = "5.6.0" +version = "5.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2522b82023923eecb0b366da727ec883ace092e7887b61d3da5139f26b44da58" +checksum = "88232b74ba057a0c85472ec1bae8a17569960be17da2d5e5ad30d5efe7ea6719" dependencies = [ "async-broadcast", "async-executor", @@ -11154,9 +10924,9 @@ dependencies = [ [[package]] name = "zbus_macros" -version = "5.6.0" +version = "5.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05d2e12843c75108c00c618c2e8ef9675b50b6ec095b36dc965f2e5aed463c15" +checksum = "6969c06899233334676e60da1675740539cf034ee472a6c5b5c54e50a0a554c9" dependencies = [ "proc-macro-crate 3.3.0", "proc-macro2", @@ -11179,33 +10949,13 @@ dependencies = [ "zvariant", ] -[[package]] -name = "zerocopy" -version = "0.7.35" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b9b4fd18abc82b8136838da5d50bae7bdea537c574d8dc1a34ed098d6c166f0" -dependencies = [ - "zerocopy-derive 0.7.35", -] - [[package]] name = "zerocopy" version = "0.8.25" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a1702d9583232ddb9174e01bb7c15a2ab8fb1bc6f227aa1233858c351a3ba0cb" dependencies = [ - "zerocopy-derive 0.8.25", -] - -[[package]] -name = "zerocopy-derive" -version = "0.7.35" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.101", + "zerocopy-derive", ] [[package]] @@ -11245,26 +10995,23 @@ name = "zeroize" version = "1.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ced3678a2879b30306d323f4542626697a464a97c0a07c9aebf7ebca65cd4dde" -dependencies = [ - "zeroize_derive", -] [[package]] -name = "zeroize_derive" -version = "1.4.2" +name = "zerotrie" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" +checksum = "36f0bbd478583f79edad978b407914f61b2972f5af6fa089686016be8f9af595" dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.101", + "displaydoc", + "yoke", + "zerofrom", ] [[package]] name = "zerovec" -version = "0.10.4" +version = "0.11.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aa2b893d79df23bfb12d5461018d408ea19dfafe76c2c7ef6d4eba614f8ff079" +checksum = "4a05eb080e015ba39cc9e23bbe5e7fb04d5fb040350f99f34e338d5fdd294428" dependencies = [ "yoke", "zerofrom", @@ -11273,9 +11020,9 @@ dependencies = [ [[package]] name = "zerovec-derive" -version = "0.10.3" +version = "0.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6eafa6dfb17584ea3e2bd6e76e0cc15ad7af12b09abdd1ca55961bed9b1063c6" +checksum = "5b96237efa0c878c64bd89c436f661be4e46b2f3eff1ebb976f7ef2321d2f58f" dependencies = [ "proc-macro2", "quote", @@ -11284,32 +11031,27 @@ dependencies = [ [[package]] name = "zip" -version = "2.6.1" +version = "3.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1dcb24d0152526ae49b9b96c1dcf71850ca1e0b882e4e28ed898a93c41334744" +checksum = "12598812502ed0105f607f941c386f43d441e00148fce9dec3ca5ffb0bde9308" dependencies = [ - "aes", "arbitrary", "bzip2", - "constant_time_eq", "crc32fast", - "crossbeam-utils", "deflate64", "flate2", - "getrandom 0.3.2", - "hmac", "indexmap 2.9.0", - "lzma-rs", "memchr", - "pbkdf2", - "sha1", - "time", - "xz2", - "zeroize", "zopfli", "zstd", ] +[[package]] +name = "zlib-rs" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "868b928d7949e09af2f6086dfc1e01936064cc7a819253bce650d4e2a2d63ba8" + [[package]] name = "zopfli" version = "0.8.2" @@ -11376,9 +11118,9 @@ dependencies = [ [[package]] name = "zvariant" -version = "5.5.1" +version = "5.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "557e89d54880377a507c94cd5452f20e35d14325faf9d2958ebeadce0966c1b2" +checksum = "9d30786f75e393ee63a21de4f9074d4c038d52c5b1bb4471f955db249f9dffb1" dependencies = [ "endi", "enumflags2", @@ -11391,9 +11133,9 @@ dependencies = [ [[package]] name = "zvariant_derive" -version = "5.5.1" +version = "5.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "757779842a0d242061d24c28be589ce392e45350dfb9186dfd7a042a2e19870c" +checksum = "75fda702cd42d735ccd48117b1630432219c0e9616bf6cb0f8350844ee4d9580" dependencies = [ "proc-macro-crate 3.3.0", "proc-macro2", diff --git a/Cargo.toml b/Cargo.toml index 07e7935d4..10fba76e4 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,25 +1,182 @@ [workspace] -resolver = '2' +resolver = "2" members = [ - './packages/app-lib', - './apps/app-playground', - './apps/app', - './apps/labrinth', - './apps/daedalus_client', - './packages/daedalus', - './packages/ariadne', + "apps/app", + "apps/app-playground", + "apps/daedalus_client", + "apps/labrinth", + "packages/app-lib", + "packages/ariadne", + "packages/daedalus", ] -# Optimize for speed and reduce size on release builds -[profile.release] -panic = "abort" # Strip expensive panic clean-up logic -codegen-units = 1 # Compile crates one after another so the compiler can optimize better -lto = true # Enables link to optimizations -opt-level = "s" # Optimize for binary size -strip = true # Remove debug symbols - -[profile.dev.package.sqlx-macros] -opt-level = 3 +[workspace.dependencies] +actix-cors = "0.7.1" +actix-files = "0.6.6" +actix-http = "3.11.0" +actix-multipart = "0.7.2" +actix-rt = "2.10.0" +actix-web = "4.11.0" +actix-web-prom = "0.10.0" +actix-ws = "0.3.0" +argon2 = { version = "0.5.3", features = ["std"] } +ariadne = { path = "packages/ariadne" } +async-compression = { version = "0.4.23", default-features = false } +async-recursion = "1.1.1" +async-stripe = { version = "0.41.0", default-features = false, features = [ + "runtime-tokio-hyper-rustls", +] } +async-trait = "0.1.88" +async-tungstenite = { version = "0.29.1", default-features = false, features = [ + "futures-03-sink", +] } +async-walkdir = "2.1.0" +async_zip = "0.0.17" +base64 = "0.22.1" +bitflags = "2.9.0" +bytes = "1.10.1" +censor = "0.3.0" +chrono = "0.4.41" +clap = "4.5.38" +clickhouse = "0.13.2" +color-thief = "0.2.2" +console-subscriber = "0.4.1" +daedalus = { path = "packages/daedalus" } +dashmap = "6.1.0" +deadpool-redis = "0.20.0" +dirs = "6.0.0" +discord-rich-presence = "0.2.5" +dotenv-build = "0.1.1" +dotenvy = "0.15.7" +dunce = "1.0.5" +either = "1.15.0" +enumset = "1.1.6" +flate2 = "1.1.1" +fs4 = { version = "0.13.1", default-features = false } +futures = { version = "0.3.31", default-features = false } +futures-util = "0.3.31" +hex = "0.4.3" +hickory-resolver = "0.25.2" +hmac = "0.12.1" +hyper-tls = "0.6.0" +hyper-util = "0.1.11" +iana-time-zone = "0.1.63" +image = { version = "0.25.6", default-features = false, features = ["rayon"] } +indexmap = "2.9.0" +indicatif = "0.17.11" +itertools = "0.14.0" +jemalloc_pprof = "0.7.0" +json-patch = { version = "4.0.0", default-features = false } +lettre = { version = "0.11.16", default-features = false, features = [ + "builder", + "hostname", + "pool", + "ring", + "rustls", + "rustls-native-certs", + "smtp-transport", +] } +maxminddb = "0.26.0" +meilisearch-sdk = { version = "0.28.0", default-features = false } +murmur2 = "0.1.0" +native-dialog = "0.9.0" +notify = { version = "8.0.0", default-features = false } +notify-debouncer-mini = { version = "0.6.0", default-features = false } +p256 = "0.13.2" +paste = "1.0.15" +prometheus = "0.14.0" +quartz_nbt = "0.2.9" +quick-xml = "0.37.5" +rand = "=0.8.5" # Locked on 0.8 until argon2 and p256 update to 0.9 +rand_chacha = "=0.3.1" # Locked on 0.3 until we can update rand to 0.9 +redis = "=0.29.5" # Locked on 0.29 until deadpool-redis updates to 0.30 +regex = "1.11.1" +reqwest = { version = "0.12.15", default-features = false } +rust-s3 = { version = "0.35.1", default-features = false, features = [ + "fail-on-err", + "tags", + "tokio-rustls-tls", +] } +rust_decimal = { version = "1.37.1", features = [ + "serde-with-float", + "serde-with-str", +] } +rust_iso3166 = "0.1.14" +rusty-money = "0.4.1" +sentry = { version = "0.38.1", default-features = false, features = [ + "backtrace", + "contexts", + "debug-images", + "panic", + "reqwest", + "rustls", +] } +sentry-actix = "0.38.1" +serde = "1.0.219" +serde-xml-rs = "0.8.0" # Also an XML (de)serializer, consider dropping yaserde in favor of this +serde_bytes = "0.11.17" +serde_cbor = "0.11.2" +serde_ini = "0.2.0" +serde_json = "1.0.140" +serde_with = "3.12.0" +sha1 = "0.10.6" +sha1_smol = { version = "1.0.1", features = ["std"] } +sha2 = "0.10.9" +spdx = "0.10.8" +sqlx = { version = "0.8.5", default-features = false } +sysinfo = { version = "0.35.1", default-features = false } +tar = "0.4.44" +tauri = "2.5.1" +tauri-build = "2.2.0" +tauri-plugin-deep-link = "2.2.1" +tauri-plugin-dialog = "2.2.1" +tauri-plugin-opener = "2.2.6" +tauri-plugin-os = "2.2.1" +tauri-plugin-single-instance = "2.2.3" +tauri-plugin-updater = { version = "2.7.1", default-features = false, features = [ + "rustls-tls", +] } +tauri-plugin-window-state = "2.2.2" +tempfile = "3.20.0" +theseus = { path = "packages/app-lib" } +thiserror = "2.0.12" +tikv-jemalloc-ctl = "0.6.0" +tikv-jemallocator = "0.6.0" +tokio = "1.45.0" +tokio-stream = "0.1.17" +tokio-util = "0.7.15" +totp-rs = "5.7.0" +tracing = "0.1.41" +tracing-actix-web = "0.7.18" +tracing-error = "0.2.1" +tracing-subscriber = "0.3.19" +url = "2.5.4" +urlencoding = "2.1.3" +uuid = "1.16.0" +validator = "0.20.0" +webp = { version = "0.3.0", default-features = false } +whoami = "1.6.0" +winreg = "0.55.0" +woothee = "0.13.0" +yaserde = "0.12.0" +zip = { version = "3.0.0", default-features = false, features = [ + "bzip2", + "deflate", + "deflate64", + "zstd", +] } +zxcvbn = "3.1.0" [patch.crates-io] wry = { git = "https://github.com/modrinth/wry", rev = "cafdaa9" } + +# Optimize for speed and reduce size on release builds +[profile.release] +opt-level = "s" # Optimize for binary size +strip = true # Remove debug symbols +lto = true # Enables link to optimizations +panic = "abort" # Strip expensive panic clean-up logic +codegen-units = 1 # Compile crates one after another so the compiler can optimize better + +[profile.dev.package.sqlx-macros] +opt-level = 3 diff --git a/apps/app-playground/Cargo.toml b/apps/app-playground/Cargo.toml index 911278606..7f2e4288a 100644 --- a/apps/app-playground/Cargo.toml +++ b/apps/app-playground/Cargo.toml @@ -6,9 +6,6 @@ edition = "2024" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -theseus = { path = "../../packages/app-lib", features = ["cli"] } -tokio = { version = "1", features = ["full"] } -webbrowser = "1.0.4" -enumset = "1.1" - -tracing = "0.1.37" +theseus = { workspace = true, features = ["cli"] } +tokio = { workspace = true, features = ["macros", "rt-multi-thread"] } +enumset.workspace = true diff --git a/apps/app-playground/src/main.rs b/apps/app-playground/src/main.rs index 9afebe299..24019b125 100644 --- a/apps/app-playground/src/main.rs +++ b/apps/app-playground/src/main.rs @@ -15,8 +15,7 @@ pub async fn authenticate_run() -> theseus::Result { println!("A browser window will now open, follow the login flow there."); let login = minecraft_auth::begin_login().await?; - println!("URL {}", login.redirect_uri.as_str()); - webbrowser::open(login.redirect_uri.as_str())?; + println!("Open URL {} in a browser", login.redirect_uri.as_str()); println!("Please enter URL code: "); let mut input = String::new(); diff --git a/apps/app/Cargo.toml b/apps/app/Cargo.toml index 8a8de6d7e..d05c3f308 100644 --- a/apps/app/Cargo.toml +++ b/apps/app/Cargo.toml @@ -8,47 +8,45 @@ edition = "2024" build = "build.rs" [build-dependencies] -tauri-build = { version = "2.2.0", features = ["codegen"] } +tauri-build = { workspace = true, features = ["codegen"] } [dependencies] -theseus = { path = "../../packages/app-lib", features = ["tauri"] } +theseus = { workspace = true, features = ["tauri"] } -serde_json = "1.0" -serde = { version = "1.0", features = ["derive"] } -serde_with = "3.0.0" +serde_json.workspace = true +serde = { workspace = true, features = ["derive"] } +serde_with.workspace = true -tauri = { version = "2.5.1", features = ["devtools", "macos-private-api", "protocol-asset", "unstable"] } -tauri-plugin-window-state = "2.2.0" -tauri-plugin-deep-link = "2.2.0" -tauri-plugin-os = "2.2.0" -tauri-plugin-opener = "2.2.6" -tauri-plugin-dialog = "2.2.0" -tauri-plugin-updater = { version = "2.3.0" } -tauri-plugin-single-instance = { version = "2.2.0" } +tauri = { workspace = true, features = ["devtools", "macos-private-api", "protocol-asset", "unstable"] } +tauri-plugin-window-state.workspace = true +tauri-plugin-deep-link.workspace = true +tauri-plugin-os.workspace = true +tauri-plugin-opener.workspace = true +tauri-plugin-dialog.workspace = true +tauri-plugin-updater.workspace = true +tauri-plugin-single-instance.workspace = true -tokio = { version = "1", features = ["full"] } -thiserror = "2.0.12" -daedalus = { path = "../../packages/daedalus" } -chrono = "0.4.26" -either = "1.15" +tokio = { workspace = true, features = ["time"] } +thiserror.workspace = true +daedalus.workspace = true +chrono.workspace = true +either.workspace = true -url = "2.2" -urlencoding = "2.1" -uuid = { version = "1.1", features = ["serde", "v4"] } +url.workspace = true +urlencoding.workspace = true +uuid = { workspace = true, features = ["serde", "v4"] } -tracing = "0.1.37" -tracing-error = "0.2.0" +tracing.workspace = true +tracing-error.workspace = true -dashmap = "6.1.0" -paste = "1.0.15" -enumset = { version = "1.1", features = ["serde"] } +dashmap.workspace = true +paste.workspace = true +enumset = { workspace = true, features = ["serde"] } -opener = { version = "0.7.2", features = ["reveal", "dbus-vendored"] } - -native-dialog = "0.9.0" +native-dialog.workspace = true [target.'cfg(target_os = "linux")'.dependencies] -tauri-plugin-updater = { version = "2.3.0", optional = true, features = ["native-tls-vendored", "zip"], default-features = false } +tauri-plugin-updater = { workspace = true, optional = true } [features] # by default Tauri runs in production mode diff --git a/apps/app/src/api/utils.rs b/apps/app/src/api/utils.rs index dfb1d9187..554ce9207 100644 --- a/apps/app/src/api/utils.rs +++ b/apps/app/src/api/utils.rs @@ -1,4 +1,6 @@ use serde::{Deserialize, Serialize}; +use tauri::Runtime; +use tauri_plugin_opener::OpenerExt; use theseus::{ handler, prelude::{CommandPayload, DirectoryInfo}, @@ -74,29 +76,29 @@ pub async fn should_disable_mouseover() -> bool { } #[tauri::command] -pub fn highlight_in_folder(path: PathBuf) { - let res = opener::reveal(path); - - if let Err(e) = res { +pub fn highlight_in_folder( + app: tauri::AppHandle, + path: PathBuf, +) { + if let Err(e) = app.opener().reveal_item_in_dir(path) { tracing::error!("Failed to highlight file in folder: {}", e); } } #[tauri::command] -pub fn open_path(path: PathBuf) { - let res = opener::open(path); - - if let Err(e) = res { +pub fn open_path(app: tauri::AppHandle, path: PathBuf) { + if let Err(e) = app.opener().open_path(path.to_string_lossy(), None::<&str>) + { tracing::error!("Failed to open path: {}", e); } } #[tauri::command] -pub fn show_launcher_logs_folder() { +pub fn show_launcher_logs_folder(app: tauri::AppHandle) { let path = DirectoryInfo::launcher_logs_dir().unwrap_or_default(); // failure to get folder just opens filesystem // (ie: if in debug mode only and launcher_logs never created) - open_path(path); + open_path(app, path); } // Get opening command diff --git a/apps/daedalus_client/Cargo.toml b/apps/daedalus_client/Cargo.toml index c448733f2..cb2a646cd 100644 --- a/apps/daedalus_client/Cargo.toml +++ b/apps/daedalus_client/Cargo.toml @@ -7,25 +7,24 @@ edition = "2024" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -daedalus = { path = "../../packages/daedalus" } -tokio = { version = "1", features = ["full"] } -futures = "0.3.25" -dotenvy = "0.15.6" -serde = { version = "1.0", features = ["derive"] } -serde_json = "1.0" -serde-xml-rs = "0.6.0" -lazy_static = "1.4.0" -thiserror = "2.0" -reqwest = { version = "0.12.15", default-features = false, features = ["stream", "json", "rustls-tls-native-roots"] } -async_zip = { version = "0.0.17", features = ["full"] } -chrono = { version = "0.4", features = ["serde"] } -bytes = "1.6.0" -rust-s3 = { version = "0.35.1", default-features = false, features = ["fail-on-err", "tags", "tokio-rustls-tls"] } -dashmap = "6.1.0" -sha1_smol = { version = "1.0.0", features = ["std"] } -indexmap = { version = "2.2.6", features = ["serde"] } -itertools = "0.14.0" -tracing-error = "0.2.0" +daedalus.workspace = true +tokio = { workspace = true, features = ["sync", "macros", "rt-multi-thread"] } +futures.workspace = true +dotenvy.workspace = true +serde = { workspace = true, features = ["derive"] } +serde_json.workspace = true +serde-xml-rs.workspace = true +thiserror.workspace = true +reqwest = { workspace = true, features = ["stream", "json", "rustls-tls-native-roots"] } +async_zip = { workspace = true, features = ["chrono", "tokio-fs", "deflate", "bzip2", "zstd", "deflate64"] } +chrono = { workspace = true, features = ["serde"] } +bytes.workspace = true +rust-s3.workspace = true +dashmap.workspace = true +sha1_smol.workspace = true +indexmap = { workspace = true, features = ["serde"] } +itertools.workspace = true +tracing-error.workspace = true -tracing = "0.1" -tracing-subscriber = { version = "0.3", features = ["env-filter"] } +tracing.workspace = true +tracing-subscriber = { workspace = true, features = ["env-filter"] } diff --git a/apps/daedalus_client/src/util.rs b/apps/daedalus_client/src/util.rs index a85fc3111..3f8f11e53 100644 --- a/apps/daedalus_client/src/util.rs +++ b/apps/daedalus_client/src/util.rs @@ -3,59 +3,57 @@ use bytes::Bytes; use s3::creds::Credentials; use s3::{Bucket, Region}; use serde::de::DeserializeOwned; -use std::sync::Arc; +use std::sync::{Arc, LazyLock}; use tokio::sync::Semaphore; -lazy_static::lazy_static! { - static ref BUCKET: Bucket = { - let region = dotenvy::var("S3_REGION").unwrap(); - let b = Bucket::new( - &dotenvy::var("S3_BUCKET_NAME").unwrap(), - if &*region == "r2" { - Region::R2 { - account_id: dotenvy::var("S3_URL").unwrap(), - } - } else { - Region::Custom { - region: region.clone(), - endpoint: dotenvy::var("S3_URL").unwrap(), - } - }, - Credentials::new( - Some(&*dotenvy::var("S3_ACCESS_TOKEN").unwrap()), - Some(&*dotenvy::var("S3_SECRET").unwrap()), - None, - None, - None, - ).unwrap(), - ).unwrap(); - - if region == "path-style" { - *b.with_path_style() +static BUCKET: LazyLock = LazyLock::new(|| { + let region = dotenvy::var("S3_REGION").unwrap(); + let b = Bucket::new( + &dotenvy::var("S3_BUCKET_NAME").unwrap(), + if &*region == "r2" { + Region::R2 { + account_id: dotenvy::var("S3_URL").unwrap(), + } } else { - *b - } - }; -} + Region::Custom { + region: region.clone(), + endpoint: dotenvy::var("S3_URL").unwrap(), + } + }, + Credentials::new( + Some(&*dotenvy::var("S3_ACCESS_TOKEN").unwrap()), + Some(&*dotenvy::var("S3_SECRET").unwrap()), + None, + None, + None, + ) + .unwrap(), + ) + .unwrap(); -lazy_static::lazy_static! { - pub static ref REQWEST_CLIENT: reqwest::Client = { - let mut headers = reqwest::header::HeaderMap::new(); - if let Ok(header) = reqwest::header::HeaderValue::from_str(&format!( - "modrinth/daedalus/{} (support@modrinth.com)", - env!("CARGO_PKG_VERSION") - )) { - headers.insert(reqwest::header::USER_AGENT, header); - } + if region == "path-style" { + *b.with_path_style() + } else { + *b + } +}); - reqwest::Client::builder() - .tcp_keepalive(Some(std::time::Duration::from_secs(10))) - .timeout(std::time::Duration::from_secs(15)) - .default_headers(headers) - .build() - .unwrap() - }; -} +pub static REQWEST_CLIENT: LazyLock = LazyLock::new(|| { + let mut headers = reqwest::header::HeaderMap::new(); + if let Ok(header) = reqwest::header::HeaderValue::from_str(&format!( + "modrinth/daedalus/{} (support@modrinth.com)", + env!("CARGO_PKG_VERSION") + )) { + headers.insert(reqwest::header::USER_AGENT, header); + } + + reqwest::Client::builder() + .tcp_keepalive(Some(std::time::Duration::from_secs(10))) + .timeout(std::time::Duration::from_secs(15)) + .default_headers(headers) + .build() + .unwrap() +}); #[tracing::instrument(skip(bytes, semaphore))] pub async fn upload_file_to_bucket( diff --git a/apps/labrinth/Cargo.toml b/apps/labrinth/Cargo.toml index b0aef9d31..d18bfeacc 100644 --- a/apps/labrinth/Cargo.toml +++ b/apps/labrinth/Cargo.toml @@ -11,74 +11,72 @@ name = "labrinth" path = "src/main.rs" [dependencies] -actix-web = "4.10.2" -actix-rt = "2.9.0" -actix-multipart = "0.7.2" -actix-cors = "0.7.1" -actix-ws = "0.3.0" -actix-files = "0.6.5" -prometheus = "0.13.4" # Locked on 0.13 until actix updates to 0.14 -actix-web-prom = { version = "0.9.0", features = ["process"] } +actix-web.workspace = true +actix-rt.workspace = true +actix-multipart.workspace = true +actix-cors.workspace = true +actix-ws.workspace = true +actix-files.workspace = true +prometheus.workspace = true +actix-web-prom = { workspace = true, features = ["process"] } -tracing = "0.1.41" -tracing-actix-web = "0.7.18" -console-subscriber = "0.4.1" +tracing.workspace = true +tracing-actix-web.workspace = true +console-subscriber.workspace = true -tokio = { version = "1.35.1", features = ["sync", "rt-multi-thread"] } -tokio-stream = "0.1.14" +tokio = { workspace = true, features = ["sync", "rt-multi-thread"] } +tokio-stream.workspace = true -futures = "0.3.30" -futures-util = "0.3.30" -async-trait = "0.1.70" -dashmap = "6.1.0" -lazy_static = "1.4.0" +futures.workspace = true +futures-util.workspace = true +async-trait.workspace = true +dashmap.workspace = true -meilisearch-sdk = "0.28.0" -rust-s3 = { version = "0.35.1", default-features = false, features = ["fail-on-err", "tags", "tokio-rustls-tls"] } -reqwest = { version = "0.12.15", features = ["json", "multipart"] } -hyper = { version = "1.6", features = ["full"] } -hyper-tls = "0.6.0" -hyper-util = "0.1.11" +meilisearch-sdk = { workspace = true, features = ["reqwest"] } +rust-s3.workspace = true +reqwest = { workspace = true, features = ["http2", "rustls-tls-webpki-roots", "json", "multipart"] } +hyper-tls.workspace = true +hyper-util.workspace = true -serde = { version = "1.0", features = ["derive"] } -serde_json = "1.0" -serde_with = "3.0.0" -chrono = { version = "0.4.26", features = ["serde"] } -yaserde = "0.12.0" -yaserde_derive = "0.12.0" +serde = { workspace = true, features = ["derive"] } +serde_json.workspace = true +serde_with.workspace = true +chrono = { workspace = true, features = ["serde"] } +yaserde = { workspace = true, features = ["derive"] } -rand = "0.8.5" # Locked on 0.8 until argon2 updates to 0.9 -rand_chacha = "0.3.1" # Locked on 0.3 until we can update rand to 0.9 -bytes = "1.4.0" -base64 = "0.22.1" -sha1 = { version = "0.10.6", features = ["std"] } -sha2 = "0.10.9" -hmac = "0.12.1" -argon2 = { version = "0.5.0", features = ["std"] } -murmur2 = "0.1.0" -bitflags = "2.4.0" -hex = "0.4.3" -zxcvbn = "3.1.0" -totp-rs = { version = "5.0.2", features = ["gen_secret"] } +rand.workspace = true +rand_chacha.workspace = true +bytes.workspace = true +base64.workspace = true +sha1.workspace = true +sha2.workspace = true +hmac.workspace = true +argon2.workspace = true +murmur2.workspace = true +bitflags.workspace = true +hex.workspace = true +zxcvbn.workspace = true +totp-rs = { workspace = true, features = ["gen_secret"] } -url = "2.4.0" -urlencoding = "2.1.2" +url.workspace = true +urlencoding.workspace = true -zip = "2.6.1" +zip.workspace = true -itertools = "0.14.0" +itertools.workspace = true -validator = { version = "0.20.0", features = ["derive"] } -regex = "1.10.2" -censor = "0.3.0" -spdx = { version = "0.10.3", features = ["text"] } +validator = { workspace = true, features = ["derive"] } +regex.workspace = true +censor.workspace = true +spdx = { workspace = true, features = ["text"] } -dotenvy = "0.15.7" -thiserror = "2.0.12" -either = "1.13" +dotenvy.workspace = true +thiserror.workspace = true +either.workspace = true -sqlx = { version = "0.8.2", features = [ - "runtime-tokio-rustls", +sqlx = { workspace = true, features = [ + "runtime-tokio", + "tls-rustls-ring", "postgres", "chrono", "macros", @@ -86,51 +84,49 @@ sqlx = { version = "0.8.2", features = [ "rust_decimal", "json", ] } -rust_decimal = { version = "1.33.1", features = [ +rust_decimal = { workspace = true, features = [ "serde-with-float", "serde-with-str", ] } -redis = { version = "0.29.5", features = ["tokio-comp", "ahash", "r2d2"] } # Locked on 0.29 until deadpool-redis updates to 0.30 -deadpool-redis = "0.20.0" -clickhouse = { version = "0.13.2", features = ["uuid", "time"] } -uuid = { version = "1.2.2", features = ["v4", "fast-rng", "serde"] } +redis = { workspace = true, features = ["tokio-comp", "ahash", "r2d2"] } # Locked on 0.29 until deadpool-redis updates to 0.30 +deadpool-redis.workspace = true +clickhouse = { workspace = true, features = ["uuid", "time"] } +uuid = { workspace = true, features = ["v4", "fast-rng", "serde"] } -maxminddb = "0.26.0" -flate2 = "1.0.25" -tar = "0.4.38" +maxminddb.workspace = true +flate2.workspace = true +tar.workspace = true -sentry = { version = "0.37.0", default-features = false, features = ["backtrace", "contexts", "debug-images", "panic", "rustls", "reqwest"] } -sentry-actix = "0.37.0" +sentry.workspace = true +sentry-actix.workspace = true -image = "0.25.6" -color-thief = "0.2.2" -webp = "0.3.0" +image = { workspace = true, features = ["avif", "bmp", "dds", "exr", "ff", "gif", "hdr", "ico", "jpeg", "png", "pnm", "qoi", "tga", "tiff", "webp"] } +color-thief.workspace = true +webp.workspace = true -woothee = "0.13.0" +woothee.workspace = true -lettre = "0.11.3" +lettre.workspace = true -derive-new = "0.7.0" -rust_iso3166 = "0.1.11" +rust_iso3166.workspace = true -async-stripe = { version = "0.41.0", features = ["runtime-tokio-hyper-rustls"] } -rusty-money = "0.4.1" -json-patch = "4.0.0" +async-stripe = { workspace = true, features = ["billing", "checkout", "connect", "webhook-events"] } +rusty-money.workspace = true +json-patch.workspace = true -ariadne = { path = "../../packages/ariadne" } +ariadne.workspace = true -clap = { version = "4.5", features = ["derive"] } -iana-time-zone = "0.1.61" +clap = { workspace = true, features = ["derive"] } [target.'cfg(target_os = "linux")'.dependencies] -tikv-jemallocator = { version = "0.6.0", features = ["profiling", "unprefixed_malloc_on_supported_platforms"] } -tikv-jemalloc-ctl = { version = "0.6.0", features = ["stats"] } -jemalloc_pprof = { version = "0.7.0", features = ["flamegraph"] } +tikv-jemallocator = { workspace = true, features = ["profiling", "unprefixed_malloc_on_supported_platforms"] } +tikv-jemalloc-ctl = { workspace = true, features = ["stats"] } +jemalloc_pprof = { workspace = true, features = ["flamegraph"] } [dev-dependencies] -actix-http = "3.4.0" +actix-http.workspace = true [build-dependencies] -dotenv-build = "0.1.1" -chrono = "0.4.38" -iana-time-zone = "0.1.60" +dotenv-build.workspace = true +chrono.workspace = true +iana-time-zone.workspace = true diff --git a/apps/labrinth/src/auth/oauth/mod.rs b/apps/labrinth/src/auth/oauth/mod.rs index c09e10f2c..b7133a9c4 100644 --- a/apps/labrinth/src/auth/oauth/mod.rs +++ b/apps/labrinth/src/auth/oauth/mod.rs @@ -111,10 +111,10 @@ pub async fn init_oauth( .map_err(|e| { OAuthError::redirect(e, &oauth_info.state, &redirect_uri) })?; - let redirect_uris = OAuthRedirectUris::new( - oauth_info.redirect_uri.clone(), - redirect_uri.clone(), - ); + let redirect_uris = OAuthRedirectUris { + original: oauth_info.redirect_uri.clone(), + validated: redirect_uri.clone(), + }; match existing_authorization { Some(existing_authorization) if existing_authorization.scopes.contains(requested_scopes) => diff --git a/apps/labrinth/src/auth/oauth/uris.rs b/apps/labrinth/src/auth/oauth/uris.rs index edef0c9d4..b902a22b4 100644 --- a/apps/labrinth/src/auth/oauth/uris.rs +++ b/apps/labrinth/src/auth/oauth/uris.rs @@ -3,7 +3,7 @@ use crate::auth::oauth::OAuthErrorType; use crate::database::models::OAuthClientId; use serde::{Deserialize, Serialize}; -#[derive(derive_new::new, Serialize, Deserialize)] +#[derive(Serialize, Deserialize)] pub struct OAuthRedirectUris { pub original: Option, pub validated: ValidatedRedirectUri, diff --git a/apps/labrinth/src/background_task.rs b/apps/labrinth/src/background_task.rs index be3ebd673..35d8531b7 100644 --- a/apps/labrinth/src/background_task.rs +++ b/apps/labrinth/src/background_task.rs @@ -132,6 +132,8 @@ pub async fn payouts( } mod version_updater { + use std::sync::LazyLock; + use crate::database::models::legacy_loader_fields::MinecraftGameVersion; use crate::database::redis::RedisPool; use chrono::{DateTime, Utc}; @@ -197,36 +199,45 @@ mod version_updater { ("3D Shareware v1.34", "3D-Shareware-v1.34"), ]; - lazy_static::lazy_static! { - /// Mojank for some reason has versions released at the same DateTime. This hardcodes them to fix this, - /// as most of our ordering logic is with DateTime - static ref HALL_OF_SHAME_2: [(&'static str, DateTime); 4] = [ - ( - "1.4.5", - chrono::DateTime::parse_from_rfc3339("2012-12-19T22:00:00+00:00") + /// Mojank for some reason has versions released at the same DateTime. This hardcodes them to fix this, + /// as most of our ordering logic is with DateTime + static HALL_OF_SHAME_2: LazyLock<[(&'static str, DateTime); 4]> = + LazyLock::new(|| { + [ + ( + "1.4.5", + chrono::DateTime::parse_from_rfc3339( + "2012-12-19T22:00:00+00:00", + ) .unwrap() .into(), - ), - ( - "1.4.6", - chrono::DateTime::parse_from_rfc3339("2012-12-19T22:00:01+00:00") + ), + ( + "1.4.6", + chrono::DateTime::parse_from_rfc3339( + "2012-12-19T22:00:01+00:00", + ) .unwrap() .into(), - ), - ( - "1.6.3", - chrono::DateTime::parse_from_rfc3339("2013-09-13T10:54:41+00:00") + ), + ( + "1.6.3", + chrono::DateTime::parse_from_rfc3339( + "2013-09-13T10:54:41+00:00", + ) .unwrap() .into(), - ), - ( - "13w37b", - chrono::DateTime::parse_from_rfc3339("2013-09-13T10:54:42+00:00") + ), + ( + "13w37b", + chrono::DateTime::parse_from_rfc3339( + "2013-09-13T10:54:42+00:00", + ) .unwrap() .into(), - ), - ]; - } + ), + ] + }); for version in input.versions.into_iter() { let mut name = version.id; diff --git a/apps/labrinth/src/database/models/project_item.rs b/apps/labrinth/src/database/models/project_item.rs index 81b1d9e70..54c6834b3 100644 --- a/apps/labrinth/src/database/models/project_item.rs +++ b/apps/labrinth/src/database/models/project_item.rs @@ -117,11 +117,10 @@ impl GalleryItem { } } -#[derive(derive_new::new)] pub struct ModCategory { - project_id: ProjectId, - category_id: CategoryId, - is_additional: bool, + pub project_id: ProjectId, + pub category_id: CategoryId, + pub is_additional: bool, } impl ModCategory { @@ -245,12 +244,18 @@ impl ProjectBuilder { let project_id = self.project_id; let mod_categories = categories .into_iter() - .map(|c| ModCategory::new(project_id, c, false)) - .chain( - additional_categories - .into_iter() - .map(|c| ModCategory::new(project_id, c, true)), - ) + .map(|category_id| ModCategory { + project_id, + category_id, + is_additional: false, + }) + .chain(additional_categories.into_iter().map(|category_id| { + ModCategory { + project_id, + category_id, + is_additional: true, + } + })) .collect_vec(); ModCategory::insert_many(mod_categories, &mut *transaction).await?; diff --git a/apps/labrinth/src/database/models/version_item.rs b/apps/labrinth/src/database/models/version_item.rs index c22b3e2d3..c54b63e7a 100644 --- a/apps/labrinth/src/database/models/version_item.rs +++ b/apps/labrinth/src/database/models/version_item.rs @@ -229,7 +229,10 @@ impl VersionBuilder { let loader_versions = loaders .iter() - .map(|l| LoaderVersion::new(*l, version_id)) + .map(|&loader_id| LoaderVersion { + loader_id, + version_id, + }) .collect_vec(); LoaderVersion::insert_many(loader_versions, transaction).await?; @@ -239,7 +242,7 @@ impl VersionBuilder { } } -#[derive(derive_new::new, Serialize, Deserialize)] +#[derive(Serialize, Deserialize)] pub struct LoaderVersion { pub loader_id: LoaderId, pub version_id: VersionId, diff --git a/apps/labrinth/src/main.rs b/apps/labrinth/src/main.rs index d04cc6b2f..25a7b9f3f 100644 --- a/apps/labrinth/src/main.rs +++ b/apps/labrinth/src/main.rs @@ -152,7 +152,7 @@ async fn main() -> std::io::Result<()> { .expect("Failed to register redis metrics"); #[cfg(target_os = "linux")] - labrinth::routes::debug::jemalloc_mmeory_stats(&prometheus.registry) + labrinth::routes::debug::jemalloc_memory_stats(&prometheus.registry) .expect("Failed to register jemalloc metrics"); let labrinth_config = labrinth::app_setup( diff --git a/apps/labrinth/src/routes/debug/mod.rs b/apps/labrinth/src/routes/debug/mod.rs index 380128c5d..66a16bda2 100644 --- a/apps/labrinth/src/routes/debug/mod.rs +++ b/apps/labrinth/src/routes/debug/mod.rs @@ -50,7 +50,7 @@ fn require_profiling_activated( } } -pub fn jemalloc_mmeory_stats( +pub fn jemalloc_memory_stats( registry: &Registry, ) -> Result<(), prometheus::Error> { let allocated_mem = IntGauge::new( diff --git a/apps/labrinth/src/routes/internal/flows.rs b/apps/labrinth/src/routes/internal/flows.rs index ff5018c81..d3a13e088 100644 --- a/apps/labrinth/src/routes/internal/flows.rs +++ b/apps/labrinth/src/routes/internal/flows.rs @@ -13,7 +13,7 @@ use crate::util::captcha::check_hcaptcha; use crate::util::env::parse_strings_from_var; use crate::util::ext::get_image_ext; use crate::util::img::upload_image_optimized; -use crate::util::validate::{RE_URL_SAFE, validation_errors_to_string}; +use crate::util::validate::validation_errors_to_string; use actix_web::web::{Data, Query, ServiceConfig, scope}; use actix_web::{HttpRequest, HttpResponse, delete, get, patch, post, web}; use argon2::password_hash::SaltString; @@ -1318,7 +1318,7 @@ pub async fn sign_up_sendy(email: &str) -> Result<(), AuthenticationError> { #[derive(Deserialize, Validate)] pub struct NewAccount { - #[validate(length(min = 1, max = 39), regex(path = *RE_URL_SAFE))] + #[validate(length(min = 1, max = 39), regex(path = *crate::util::validate::RE_URL_SAFE))] pub username: String, #[validate(length(min = 8, max = 256))] pub password: String, diff --git a/apps/labrinth/src/routes/maven.rs b/apps/labrinth/src/routes/maven.rs index 2bb2e1177..791a2faee 100644 --- a/apps/labrinth/src/routes/maven.rs +++ b/apps/labrinth/src/routes/maven.rs @@ -12,7 +12,7 @@ use crate::{auth::get_user_from_headers, database}; use actix_web::{HttpRequest, HttpResponse, get, route, web}; use sqlx::PgPool; use std::collections::HashSet; -use yaserde_derive::YaSerialize; +use yaserde::YaSerialize; pub fn config(cfg: &mut web::ServiceConfig) { cfg.service(maven_metadata); diff --git a/apps/labrinth/src/routes/v2/users.rs b/apps/labrinth/src/routes/v2/users.rs index e3a793fb5..4f650609a 100644 --- a/apps/labrinth/src/routes/v2/users.rs +++ b/apps/labrinth/src/routes/v2/users.rs @@ -9,8 +9,6 @@ use crate::models::v2::user::LegacyUser; use crate::queue::session::AuthQueue; use crate::routes::{ApiError, v2_reroute, v3}; use actix_web::{HttpRequest, HttpResponse, delete, get, patch, web}; -use lazy_static::lazy_static; -use regex::Regex; use serde::{Deserialize, Serialize}; use sqlx::PgPool; use std::sync::Arc; @@ -135,20 +133,16 @@ pub async fn projects_list( } } -lazy_static! { - static ref RE_URL_SAFE: Regex = Regex::new(r"^[a-zA-Z0-9_-]*$").unwrap(); -} - #[derive(Serialize, Deserialize, Validate)] pub struct EditUser { - #[validate(length(min = 1, max = 39), regex(path = *RE_URL_SAFE))] + #[validate(length(min = 1, max = 39), regex(path = *crate::util::validate::RE_URL_SAFE))] pub username: Option, #[serde( default, skip_serializing_if = "Option::is_none", with = "::serde_with::rust::double_option" )] - #[validate(length(min = 1, max = 64), regex(path = *RE_URL_SAFE))] + #[validate(length(min = 1, max = 64), regex(path = *crate::util::validate::RE_URL_SAFE))] pub name: Option>, #[serde( default, diff --git a/apps/labrinth/src/routes/v3/projects.rs b/apps/labrinth/src/routes/v3/projects.rs index 2a44ed685..d14151826 100644 --- a/apps/labrinth/src/routes/v3/projects.rs +++ b/apps/labrinth/src/routes/v3/projects.rs @@ -906,11 +906,11 @@ pub async fn edit_project_categories( categories: &Vec, perms: &ProjectPermissions, project_id: db_ids::ProjectId, - additional: bool, + is_additional: bool, transaction: &mut sqlx::Transaction<'_, sqlx::Postgres>, ) -> Result<(), ApiError> { if !perms.contains(ProjectPermissions::EDIT_DETAILS) { - let additional_str = if additional { "additional " } else { "" }; + let additional_str = if is_additional { "additional " } else { "" }; return Err(ApiError::CustomAuthentication(format!( "You do not have the permissions to edit the {additional_str}categories of this project!" ))); @@ -928,7 +928,11 @@ pub async fn edit_project_categories( let mcategories = category_ids .values() - .map(|x| ModCategory::new(project_id, *x, additional)) + .map(|&category_id| ModCategory { + project_id, + category_id, + is_additional, + }) .collect::>(); mod_categories.extend(mcategories); } @@ -1081,7 +1085,6 @@ pub async fn dependency_list( } } -#[derive(derive_new::new)] pub struct CategoryChanges<'a> { pub categories: &'a Option>, pub add_categories: &'a Option>, @@ -1241,11 +1244,11 @@ pub async fn projects_edit( &categories, &project.categories, project.inner.id as db_ids::ProjectId, - CategoryChanges::new( - &bulk_edit_project.categories, - &bulk_edit_project.add_categories, - &bulk_edit_project.remove_categories, - ), + CategoryChanges { + categories: &bulk_edit_project.categories, + add_categories: &bulk_edit_project.add_categories, + remove_categories: &bulk_edit_project.remove_categories, + }, 3, false, &mut transaction, @@ -1256,11 +1259,12 @@ pub async fn projects_edit( &categories, &project.additional_categories, project.inner.id as db_ids::ProjectId, - CategoryChanges::new( - &bulk_edit_project.additional_categories, - &bulk_edit_project.add_additional_categories, - &bulk_edit_project.remove_additional_categories, - ), + CategoryChanges { + categories: &bulk_edit_project.additional_categories, + add_categories: &bulk_edit_project.add_additional_categories, + remove_categories: &bulk_edit_project + .remove_additional_categories, + }, 256, true, &mut transaction, @@ -1383,11 +1387,11 @@ pub async fn bulk_edit_project_categories( )) })? .id; - mod_categories.push(ModCategory::new( + mod_categories.push(ModCategory { project_id, category_id, is_additional, - )); + }); } ModCategory::insert_many(mod_categories, &mut *transaction).await?; } diff --git a/apps/labrinth/src/routes/v3/users.rs b/apps/labrinth/src/routes/v3/users.rs index 1e164bc5b..1974d6613 100644 --- a/apps/labrinth/src/routes/v3/users.rs +++ b/apps/labrinth/src/routes/v3/users.rs @@ -1,8 +1,6 @@ use std::{collections::HashMap, sync::Arc}; use actix_web::{HttpRequest, HttpResponse, web}; -use lazy_static::lazy_static; -use regex::Regex; use serde::{Deserialize, Serialize}; use sqlx::PgPool; use validator::Validate; @@ -358,13 +356,9 @@ pub async fn orgs_list( } } -lazy_static! { - static ref RE_URL_SAFE: Regex = Regex::new(r"^[a-zA-Z0-9_-]*$").unwrap(); -} - #[derive(Serialize, Deserialize, Validate)] pub struct EditUser { - #[validate(length(min = 1, max = 39), regex(path = *RE_URL_SAFE))] + #[validate(length(min = 1, max = 39), regex(path = *crate::util::validate::RE_URL_SAFE))] pub username: Option, #[serde( default, diff --git a/apps/labrinth/src/routes/v3/versions.rs b/apps/labrinth/src/routes/v3/versions.rs index dd2faa23d..bc9f62ea0 100644 --- a/apps/labrinth/src/routes/v3/versions.rs +++ b/apps/labrinth/src/routes/v3/versions.rs @@ -287,10 +287,10 @@ pub async fn version_edit_helper( ApiError::Validation(validation_errors_to_string(err, None)) })?; - let version_id = info.0; - let id = version_id.into(); + let version_id = info.0.into(); - let result = database::models::Version::get(id, &**pool, &redis).await?; + let result = + database::models::Version::get(version_id, &**pool, &redis).await?; if let Some(version_item) = result { let team_member = @@ -345,7 +345,7 @@ pub async fn version_edit_helper( WHERE (id = $2) ", name.trim(), - id as database::models::ids::VersionId, + version_id as database::models::ids::VersionId, ) .execute(&mut *transaction) .await?; @@ -359,7 +359,7 @@ pub async fn version_edit_helper( WHERE (id = $2) ", number, - id as database::models::ids::VersionId, + version_id as database::models::ids::VersionId, ) .execute(&mut *transaction) .await?; @@ -373,7 +373,7 @@ pub async fn version_edit_helper( WHERE (id = $2) ", version_type.as_str(), - id as database::models::ids::VersionId, + version_id as database::models::ids::VersionId, ) .execute(&mut *transaction) .await?; @@ -384,7 +384,7 @@ pub async fn version_edit_helper( " DELETE FROM dependencies WHERE dependent_id = $1 ", - id as database::models::ids::VersionId, + version_id as database::models::ids::VersionId, ) .execute(&mut *transaction) .await?; @@ -448,7 +448,7 @@ pub async fn version_edit_helper( WHERE version_id = $1 AND field_id = ANY($2) ", - id as database::models::ids::VersionId, + version_id as database::models::ids::VersionId, &loader_field_ids ) .execute(&mut *transaction) @@ -476,7 +476,7 @@ pub async fn version_edit_helper( .remove(&loader_field.id) .unwrap_or_default(); let vf: VersionField = VersionField::check_parse( - version_id.into(), + version_id, loader_field.clone(), vf_value.clone(), enum_variants, @@ -493,7 +493,7 @@ pub async fn version_edit_helper( " DELETE FROM loaders_versions WHERE version_id = $1 ", - id as database::models::ids::VersionId, + version_id as database::models::ids::VersionId, ) .execute(&mut *transaction) .await?; @@ -513,7 +513,10 @@ pub async fn version_edit_helper( .to_string(), ) })?; - loader_versions.push(LoaderVersion::new(loader_id, id)); + loader_versions.push(LoaderVersion { + loader_id, + version_id, + }); } LoaderVersion::insert_many(loader_versions, &mut transaction) .await?; @@ -535,7 +538,7 @@ pub async fn version_edit_helper( WHERE (id = $2) ", featured, - id as database::models::ids::VersionId, + version_id as database::models::ids::VersionId, ) .execute(&mut *transaction) .await?; @@ -549,7 +552,7 @@ pub async fn version_edit_helper( WHERE (id = $2) ", body, - id as database::models::ids::VersionId, + version_id as database::models::ids::VersionId, ) .execute(&mut *transaction) .await?; @@ -569,7 +572,7 @@ pub async fn version_edit_helper( WHERE (id = $2) ", *downloads as i32, - id as database::models::ids::VersionId, + version_id as database::models::ids::VersionId, ) .execute(&mut *transaction) .await?; @@ -604,7 +607,7 @@ pub async fn version_edit_helper( WHERE (id = $2) ", status.as_str(), - id as database::models::ids::VersionId, + version_id as database::models::ids::VersionId, ) .execute(&mut *transaction) .await?; @@ -652,7 +655,7 @@ pub async fn version_edit_helper( WHERE (id = $2) ", ordering.to_owned() as Option, - id as database::models::ids::VersionId, + version_id as database::models::ids::VersionId, ) .execute(&mut *transaction) .await?; diff --git a/apps/labrinth/src/util/validate.rs b/apps/labrinth/src/util/validate.rs index 2cb949f35..1aede409c 100644 --- a/apps/labrinth/src/util/validate.rs +++ b/apps/labrinth/src/util/validate.rs @@ -1,14 +1,13 @@ +use std::sync::LazyLock; + use itertools::Itertools; -use lazy_static::lazy_static; use regex::Regex; use validator::{ValidationErrors, ValidationErrorsKind}; use crate::models::pats::Scopes; -lazy_static! { - pub static ref RE_URL_SAFE: Regex = - Regex::new(r#"^[a-zA-Z0-9!@$()`.+,_"-]*$"#).unwrap(); -} +pub static RE_URL_SAFE: LazyLock = + LazyLock::new(|| Regex::new(r"^[a-zA-Z0-9_-]*$").unwrap()); //TODO: In order to ensure readability, only the first error is printed, this may need to be expanded on in the future! pub fn validation_errors_to_string( diff --git a/packages/app-lib/Cargo.toml b/packages/app-lib/Cargo.toml index cb9dfa3cc..275a31c06 100644 --- a/packages/app-lib/Cargo.toml +++ b/packages/app-lib/Cargo.toml @@ -5,75 +5,72 @@ authors = ["Jai A "] edition = "2024" [dependencies] -bytes = "1" -serde = { version = "1.0", features = ["derive"] } -serde_json = "1.0" -serde_ini = "0.2.0" -sha1_smol = { version = "1.0.0", features = ["std"] } -sha2 = "0.10.9" -url = { version = "2.2", features = ["serde"] } -uuid = { version = "1.1", features = ["serde", "v4"] } -zip = "2.6.1" -async_zip = { version = "0.0.17", features = ["chrono", "tokio-fs", "deflate", "bzip2", "zstd", "deflate64"] } -flate2 = "1.1.1" -tempfile = "3.5.0" -dashmap = { version = "6.1.0", features = ["serde"] } -quick-xml = { version = "0.37", features = ["async-tokio"] } -enumset = "1.1" +bytes.workspace = true +serde = { workspace = true, features = ["derive"] } +serde_json.workspace = true +serde_ini.workspace = true +sha1_smol.workspace = true +sha2.workspace = true +url = { workspace = true, features = ["serde"] } +uuid = { workspace = true, features = ["serde", "v4"] } +zip.workspace = true +async_zip = { workspace = true, features = ["chrono", "tokio-fs", "deflate", "bzip2", "zstd", "deflate64"] } +flate2.workspace = true +tempfile.workspace = true +dashmap = { workspace = true, features = ["serde"] } +quick-xml = { workspace = true, features = ["async-tokio"] } +enumset.workspace = true -chrono = { version = "0.4.19", features = ["serde"] } -daedalus = { path = "../../packages/daedalus" } -dirs = "6.0.0" +chrono = { workspace = true, features = ["serde"] } +daedalus.workspace = true +dirs.workspace = true -regex = "1.5" -sys-info = "0.9.0" -sysinfo = "0.35.0" -thiserror = "2.0.12" -either = "1.13" +regex.workspace = true +sysinfo = { workspace = true, features = ["system", "disk"] } +thiserror.workspace = true +either.workspace = true -tracing = "0.1.37" -tracing-subscriber = { version = "0.3.18", features = ["chrono", "env-filter"] } -tracing-error = "0.2.0" +tracing.workspace = true +tracing-subscriber = { workspace = true, features = ["chrono", "env-filter"] } +tracing-error.workspace = true -paste = { version = "1.0" } +paste.workspace = true -tauri = { version = "2.5.1", optional = true } -indicatif = { version = "0.17.3", optional = true } +tauri = { workspace = true, optional = true } +indicatif = { workspace = true, optional = true } -async-tungstenite = { version = "0.29.1", features = ["tokio-runtime", "tokio-rustls-webpki-roots"] } -futures = "0.3" -reqwest = { version = "0.12.15", features = ["json", "stream", "deflate", "gzip", "brotli", "rustls-tls", "charset", "http2", "macos-system-configuration"], default-features = false } -tokio = { version = "1", features = ["full"] } -tokio-util = "0.7" -async-recursion = "1.0.4" -fs4 = { version = "0.13", features = ["tokio"] } -async-walkdir = "2.1" -async-compression = { version = "0.4", default-features = false, features = ["tokio", "gzip"] } +async-tungstenite = { workspace = true, features = ["tokio-runtime", "tokio-rustls-webpki-roots"] } +futures = { workspace = true, features = ["async-await", "alloc"] } +reqwest = { workspace = true, features = ["json", "stream", "deflate", "gzip", "brotli", "rustls-tls-webpki-roots", "charset", "http2", "macos-system-configuration"] } +tokio = { workspace = true, features = ["time", "io-util", "net", "sync", "fs", "macros", "process"] } +tokio-util = { workspace = true, features = ["compat"] } +async-recursion.workspace = true +fs4 = { workspace = true, features = ["tokio"] } +async-walkdir.workspace = true +async-compression = { workspace = true, features = ["tokio", "gzip"] } -notify = { version = "8.0.0", default-features = false } -notify-debouncer-mini = { version = "0.6.0", default-features = false } +notify.workspace = true +notify-debouncer-mini.workspace = true -lazy_static = "1.4.0" -dunce = "1.0.3" +dunce.workspace = true -whoami = "1.4.0" +whoami.workspace = true -discord-rich-presence = "0.2.4" +discord-rich-presence.workspace = true -p256 = { version = "0.13.2", features = ["ecdsa"] } -rand = "0.8" -byteorder = "1.5.0" -base64 = "0.22.1" +p256 = { workspace = true, features = ["ecdsa"] } +rand.workspace = true +base64.workspace = true -sqlx = { version = "0.8.2", features = [ "runtime-tokio", "sqlite", "macros" ] } +sqlx = { workspace = true, features = ["runtime-tokio", "sqlite", "macros", "migrate", "json"] } -quartz_nbt = { version = "0.2", features = ["serde"] } -hickory-resolver = "0.25" +quartz_nbt = { workspace = true, features = ["serde"] } +hickory-resolver.workspace = true -ariadne = { path = "../ariadne" } +ariadne.workspace = true [target.'cfg(windows)'.dependencies] -winreg = "0.55.0" +winreg.workspace = true [features] tauri = ["dep:tauri"] diff --git a/packages/app-lib/src/api/jre.rs b/packages/app-lib/src/api/jre.rs index 16ebf79f3..ef193aac3 100644 --- a/packages/app-lib/src/api/jre.rs +++ b/packages/app-lib/src/api/jre.rs @@ -6,6 +6,7 @@ use dashmap::DashMap; use reqwest::Method; use serde::Deserialize; use std::path::PathBuf; +use sysinfo::{MemoryRefreshKind, RefreshKind}; use crate::util::io; use crate::util::jre::extract_java_majorminor_version; @@ -175,11 +176,10 @@ pub async fn test_jre( // Gets maximum memory in KiB. pub async fn get_max_memory() -> crate::Result { - Ok(sys_info::mem_info() - .map_err(|_| { - crate::Error::from(crate::ErrorKind::LauncherError( - "Unable to get computer memory".to_string(), - )) - })? - .total) + Ok(sysinfo::System::new_with_specifics( + RefreshKind::nothing() + .with_memory(MemoryRefreshKind::nothing().with_ram()), + ) + .total_memory() + / 1024) } diff --git a/packages/app-lib/src/api/worlds.rs b/packages/app-lib/src/api/worlds.rs index 246935c8a..44704dfa9 100644 --- a/packages/app-lib/src/api/worlds.rs +++ b/packages/app-lib/src/api/worlds.rs @@ -17,7 +17,6 @@ use either::Either; use enumset::{EnumSet, EnumSetType}; use fs4::tokio::AsyncFileExt; use futures::StreamExt; -use lazy_static::lazy_static; use quartz_nbt::{NbtCompound, NbtTag}; use regex::{Regex, RegexBuilder}; use serde::{Deserialize, Serialize}; @@ -25,6 +24,7 @@ use std::cmp::Reverse; use std::io::Cursor; use std::net::{Ipv4Addr, Ipv6Addr}; use std::path::{Path, PathBuf}; +use std::sync::LazyLock; use tokio::io::AsyncWriteExt; use tokio_util::compat::FuturesAsyncWriteCompatExt; use url::Url; @@ -548,17 +548,19 @@ pub async fn backup_world(instance: &Path, world: &str) -> Result { } fn find_available_name(dir: &Path, file_name: &str, extension: &str) -> String { - lazy_static! { - static ref RESERVED_WINDOWS_FILENAMES: Regex = RegexBuilder::new(r#"^.*\.|(?:COM|CLOCK\$|CON|PRN|AUX|NUL|COM[1-9]|LPT[1-9])(?:\..*)?$"#) + static RESERVED_WINDOWS_FILENAMES: LazyLock = LazyLock::new(|| { + RegexBuilder::new(r#"^.*\.|(?:COM|CLOCK\$|CON|PRN|AUX|NUL|COM[1-9]|LPT[1-9])(?:\..*)?$"#) .case_insensitive(true) .build() - .unwrap(); - static ref COPY_COUNTER_PATTERN: Regex = RegexBuilder::new(r#"^(?.*) \((?\d*)\)$"#) + .unwrap() + }); + static COPY_COUNTER_PATTERN: LazyLock = LazyLock::new(|| { + RegexBuilder::new(r#"^(?.*) \((?\d*)\)$"#) .case_insensitive(true) .unicode(true) .build() - .unwrap(); - } + .unwrap() + }); let mut file_name = file_name.replace( [ diff --git a/packages/app-lib/src/state/fs_watcher.rs b/packages/app-lib/src/state/fs_watcher.rs index 347a7a38e..12bd89313 100644 --- a/packages/app-lib/src/state/fs_watcher.rs +++ b/packages/app-lib/src/state/fs_watcher.rs @@ -5,30 +5,27 @@ use crate::state::{ DirectoryInfo, ProfileInstallStage, ProjectType, attached_world_data, }; use crate::worlds::WorldType; -use futures::{SinkExt, StreamExt, channel::mpsc::channel}; use notify::{RecommendedWatcher, RecursiveMode}; use notify_debouncer_mini::{DebounceEventResult, Debouncer, new_debouncer}; use std::time::Duration; -use tokio::sync::RwLock; +use tokio::sync::{RwLock, mpsc::channel}; pub type FileWatcher = RwLock>; pub async fn init_watcher() -> crate::Result { - let (mut tx, mut rx) = channel(1); + let (tx, mut rx) = channel(1); let file_watcher = new_debouncer( Duration::from_secs_f32(1.0), move |res: DebounceEventResult| { - futures::executor::block_on(async { - tx.send(res).await.unwrap(); - }) + tx.blocking_send(res).ok(); }, )?; tokio::task::spawn(async move { let span = tracing::span!(tracing::Level::INFO, "init_watcher"); tracing::info!(parent: &span, "Initting watcher"); - while let Some(res) = rx.next().await { + while let Some(res) = rx.recv().await { let _span = span.enter(); match res { diff --git a/packages/app-lib/src/state/minecraft_auth.rs b/packages/app-lib/src/state/minecraft_auth.rs index 45bd7ef48..96b3044ba 100644 --- a/packages/app-lib/src/state/minecraft_auth.rs +++ b/packages/app-lib/src/state/minecraft_auth.rs @@ -2,7 +2,6 @@ use crate::ErrorKind; use crate::util::fetch::REQWEST_CLIENT; use base64::Engine; use base64::prelude::{BASE64_STANDARD, BASE64_URL_SAFE_NO_PAD}; -use byteorder::BigEndian; use chrono::{DateTime, Duration, TimeZone, Utc}; use dashmap::DashMap; use futures::TryStreamExt; @@ -62,12 +61,6 @@ pub enum MinecraftAuthenticationError { #[source] source: reqwest::Error, }, - #[error("Error creating signed request buffer {step:?}: {source}")] - ConstructingSignedRequest { - step: MinecraftAuthStep, - #[source] - source: std::io::Error, - }, #[error("Error reading XBOX Session ID header")] NoSessionId, #[error("Error reading user hash")] @@ -1087,56 +1080,25 @@ async fn send_signed_request( let time: u128 = { ((current_date.timestamp() as u128) + 11644473600) * 10000000 }; - use byteorder::WriteBytesExt; let mut buffer = Vec::new(); - buffer.write_u32::(1).map_err(|source| { - MinecraftAuthenticationError::ConstructingSignedRequest { source, step } - })?; - buffer.write_u8(0).map_err(|source| { - MinecraftAuthenticationError::ConstructingSignedRequest { source, step } - })?; - buffer - .write_u64::(time as u64) - .map_err(|source| { - MinecraftAuthenticationError::ConstructingSignedRequest { - source, - step, - } - })?; - buffer.write_u8(0).map_err(|source| { - MinecraftAuthenticationError::ConstructingSignedRequest { source, step } - })?; + buffer.extend_from_slice(&1_u32.to_be_bytes()[..]); + buffer.push(0_u8); + buffer.extend_from_slice(&(time as u64).to_be_bytes()[..]); + buffer.push(0_u8); buffer.extend_from_slice("POST".as_bytes()); - buffer.write_u8(0).map_err(|source| { - MinecraftAuthenticationError::ConstructingSignedRequest { source, step } - })?; + buffer.push(0_u8); buffer.extend_from_slice(url_path.as_bytes()); - buffer.write_u8(0).map_err(|source| { - MinecraftAuthenticationError::ConstructingSignedRequest { source, step } - })?; + buffer.push(0_u8); buffer.extend_from_slice(&auth); - buffer.write_u8(0).map_err(|source| { - MinecraftAuthenticationError::ConstructingSignedRequest { source, step } - })?; + buffer.push(0_u8); buffer.extend_from_slice(&body); - buffer.write_u8(0).map_err(|source| { - MinecraftAuthenticationError::ConstructingSignedRequest { source, step } - })?; + buffer.push(0_u8); let ecdsa_sig: Signature = key.key.sign(&buffer); let mut sig_buffer = Vec::new(); - sig_buffer.write_i32::(1).map_err(|source| { - MinecraftAuthenticationError::ConstructingSignedRequest { source, step } - })?; - sig_buffer - .write_u64::(time as u64) - .map_err(|source| { - MinecraftAuthenticationError::ConstructingSignedRequest { - source, - step, - } - })?; + sig_buffer.extend_from_slice(&1_i32.to_be_bytes()[..]); + sig_buffer.extend_from_slice(&(time as u64).to_be_bytes()[..]); sig_buffer.extend_from_slice(&ecdsa_sig.r().to_bytes()); sig_buffer.extend_from_slice(&ecdsa_sig.s().to_bytes()); diff --git a/packages/app-lib/src/state/profiles.rs b/packages/app-lib/src/state/profiles.rs index 641af8356..2aa09ece1 100644 --- a/packages/app-lib/src/state/profiles.rs +++ b/packages/app-lib/src/state/profiles.rs @@ -9,7 +9,6 @@ use crate::util::fetch::{FetchSemaphore, IoSemaphore, write_cached_icon}; use crate::util::io::{self}; use chrono::{DateTime, TimeDelta, TimeZone, Utc}; use dashmap::DashMap; -use lazy_static::lazy_static; use regex::Regex; use serde::{Deserialize, Serialize}; use sqlx::SqlitePool; @@ -17,6 +16,7 @@ use std::collections::HashSet; use std::convert::TryFrom; use std::convert::TryInto; use std::path::Path; +use std::sync::LazyLock; use tokio::fs::DirEntry; use tokio::io::{AsyncBufReadExt, AsyncRead}; use tokio::task::JoinSet; @@ -837,9 +837,9 @@ impl Profile { state: &crate::State, join_entry: &mut JoinLogEntry, ) -> crate::Result<()> { - lazy_static! { - static ref LOG_LINE_REGEX: Regex = Regex::new(r"^\[[0-9]{2}(?::[0-9]{2}){2}] \[.+?/[A-Z]+?]: Connecting to (.+?), ([1-9][0-9]{0,4})$").unwrap(); - } + static LOG_LINE_REGEX: LazyLock = LazyLock::new(|| { + Regex::new(r"^\[[0-9]{2}(?::[0-9]{2}){2}] \[.+?/[A-Z]+?]: Connecting to (.+?), ([1-9][0-9]{0,4})$").unwrap() + }); let reader = tokio::io::BufReader::new(reader); let mut lines = reader.lines(); while let Some(log_line) = lines.next_line().await? { diff --git a/packages/app-lib/src/util/fetch.rs b/packages/app-lib/src/util/fetch.rs index 3f8391c4d..2323ec7d9 100644 --- a/packages/app-lib/src/util/fetch.rs +++ b/packages/app-lib/src/util/fetch.rs @@ -1,14 +1,14 @@ -//! Functions for fetching infromation from the Internet +//! Functions for fetching information from the Internet use super::io::{self, IOError}; use crate::config::{MODRINTH_API_URL, MODRINTH_API_URL_V3}; use crate::event::LoadingBarId; use crate::event::emit::emit_loading; use bytes::Bytes; -use lazy_static::lazy_static; use reqwest::Method; use serde::de::DeserializeOwned; use std::ffi::OsStr; use std::path::{Path, PathBuf}; +use std::sync::LazyLock; use std::time::{self}; use tokio::sync::Semaphore; use tokio::{fs::File, io::AsyncWriteExt}; @@ -18,22 +18,20 @@ pub struct IoSemaphore(pub Semaphore); #[derive(Debug)] pub struct FetchSemaphore(pub Semaphore); -lazy_static! { - pub static ref REQWEST_CLIENT: reqwest::Client = { - let mut headers = reqwest::header::HeaderMap::new(); - let header = reqwest::header::HeaderValue::from_str(&format!( - "modrinth/theseus/{} (support@modrinth.com)", - env!("CARGO_PKG_VERSION") - )) - .unwrap(); - headers.insert(reqwest::header::USER_AGENT, header); - reqwest::Client::builder() - .tcp_keepalive(Some(time::Duration::from_secs(10))) - .default_headers(headers) - .build() - .expect("Reqwest Client Building Failed") - }; -} +pub static REQWEST_CLIENT: LazyLock = LazyLock::new(|| { + let mut headers = reqwest::header::HeaderMap::new(); + let header = reqwest::header::HeaderValue::from_str(&format!( + "modrinth/theseus/{} (support@modrinth.com)", + env!("CARGO_PKG_VERSION") + )) + .unwrap(); + headers.insert(reqwest::header::USER_AGENT, header); + reqwest::Client::builder() + .tcp_keepalive(Some(time::Duration::from_secs(10))) + .default_headers(headers) + .build() + .expect("Reqwest Client Building Failed") +}); const FETCH_ATTEMPTS: usize = 3; #[tracing::instrument(skip(semaphore))] diff --git a/packages/app-lib/src/util/jre.rs b/packages/app-lib/src/util/jre.rs index 6369a7635..e32c93649 100644 --- a/packages/app-lib/src/util/jre.rs +++ b/packages/app-lib/src/util/jre.rs @@ -276,11 +276,10 @@ pub async fn check_java_at_filepath(path: &Path) -> Option { }; let bytes = include_bytes!("../../library/JavaInfo.class"); - let tempdir: PathBuf = tempfile::tempdir().ok()?.into_path(); - if !tempdir.exists() { + let Ok(tempdir) = tempfile::tempdir() else { return None; - } - let file_path = tempdir.join("JavaInfo.class"); + }; + let file_path = tempdir.path().join("JavaInfo.class"); io::write(&file_path, bytes).await.ok()?; let output = Command::new(&java) diff --git a/packages/app-lib/src/util/platform.rs b/packages/app-lib/src/util/platform.rs index e1c4c5241..3eb57e2a6 100644 --- a/packages/app-lib/src/util/platform.rs +++ b/packages/app-lib/src/util/platform.rs @@ -1,6 +1,5 @@ //! Platform-related code use daedalus::minecraft::{Os, OsRule}; -use regex::Regex; // OS detection pub trait OsExt { @@ -92,12 +91,16 @@ pub fn os_rule( } } - if let Some(version) = &rule.version { - if let Ok(regex) = Regex::new(version.as_str()) { - rule_match &= - regex.is_match(&sys_info::os_release().unwrap_or_default()); - } - } + // `rule.version` is ignored because it's not usually seen on real recent + // Minecraft version manifests, its alleged regex syntax is undefined and is + // likely to not match `Regex`'s, and the way to get the value to match it + // against is allegedly calling `System.getProperty("os.version")`, which + // on Windows the OpenJDK implements by fetching the kernel32.dll version, + // an approach that no public Rust library implements. Moreover, launchers + // such as PrismLauncher also ignore this field. Code references: + // - https://github.com/openjdk/jdk/blob/948ade8e7003a41683600428c8e3155c7ed798db/src/java.base/windows/native/libjava/java_props_md.c#L556 + // - https://github.com/PrismLauncher/PrismLauncher/blob/1c20faccf88999474af70db098a4c10e7a03af33/launcher/minecraft/Rule.h#L77 + // - https://github.com/FillZpp/sys-info-rs/blob/60ecf1470a5b7c90242f429934a3bacb6023ec4d/c/windows.c#L23-L38 rule_match } diff --git a/packages/ariadne/Cargo.toml b/packages/ariadne/Cargo.toml index ce155d6d5..ed5947d1f 100644 --- a/packages/ariadne/Cargo.toml +++ b/packages/ariadne/Cargo.toml @@ -4,13 +4,12 @@ version = "0.1.0" edition = "2024" [dependencies] -serde = { version = "1.0", features = ["derive"] } -serde_json = "1.0" -thiserror = "2.0.12" -uuid = { version = "1.2.2", features = ["v4", "fast-rng", "serde"] } -serde_bytes = "0.11" -rand = "0.8.5" -either = "1.13" -chrono = { version = "0.4.26", features = ["serde"] } -serde_cbor = "0.11" -lazy_static = "1.5" +serde = { workspace = true, features = ["derive"] } +serde_json.workspace = true +thiserror.workspace = true +uuid = { workspace = true, features = ["v4", "fast-rng", "serde"] } +serde_bytes.workspace = true +rand.workspace = true +either.workspace = true +chrono = { workspace = true, features = ["serde"] } +serde_cbor.workspace = true diff --git a/packages/ariadne/src/versions.rs b/packages/ariadne/src/versions.rs index 4ea00b659..8cc295145 100644 --- a/packages/ariadne/src/versions.rs +++ b/packages/ariadne/src/versions.rs @@ -1,8 +1,7 @@ -use lazy_static::lazy_static; -use std::collections::HashMap; +use std::{collections::HashMap, sync::LazyLock}; -lazy_static! { - static ref SPECIAL_PARENTS: HashMap<&'static str, &'static str> = { +static SPECIAL_PARENTS: LazyLock> = + LazyLock::new(|| { let mut m = HashMap::new(); m.insert("15w14a", "1.8.3"); m.insert("1.RV-Pre1", "1.9.2"); @@ -12,8 +11,7 @@ lazy_static! { m.insert("23w13a_or_b", "23w13a"); m.insert("24w14potato", "24w12a"); m - }; -} + }); pub fn is_feature_supported_in( version: &str, diff --git a/packages/daedalus/Cargo.toml b/packages/daedalus/Cargo.toml index 01b1c2d9f..014ce6f83 100644 --- a/packages/daedalus/Cargo.toml +++ b/packages/daedalus/Cargo.toml @@ -14,7 +14,7 @@ readme = "README.md" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -serde = { version = "1.0", features = ["derive"] } -serde_json = "1.0" -chrono = { version = "0.4", features = ["serde"] } -thiserror = "2.0" +serde = { workspace = true, features = ["derive"] } +serde_json.workspace = true +chrono = { workspace = true, features = ["serde"] } +thiserror.workspace = true