diff --git a/Cargo.lock b/Cargo.lock index 4dcedcd..08b071b 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4,18 +4,29 @@ version = 3 [[package]] name = "addr2line" -version = "0.21.0" +version = "0.24.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a30b2e23b9e17a9f90641c7ab1549cd9b44f296d3ccbf309d2863cfe398a0cb" +checksum = "dfbe277e56a376000877090da837660b4427aad530e3028d44e0bffe4f89a1c1" dependencies = [ "gimli", ] [[package]] -name = "adler" -version = "1.0.2" +name = "adler2" +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 = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" +checksum = "b169f7a6d4742236a0a00c541b845991d0ac43e546831af1249753ab4c3aa3a0" +dependencies = [ + "cfg-if", + "cipher", + "cpufeatures", +] [[package]] name = "aho-corasick" @@ -28,63 +39,64 @@ dependencies = [ [[package]] name = "anstream" -version = "0.6.13" +version = "0.6.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d96bd03f33fe50a863e394ee9718a706f988b9079b20c3784fb726e7678b62fb" +checksum = "8acc5369981196006228e28809f761875c0327210a891e941f4c683b3a99529b" dependencies = [ "anstyle", "anstyle-parse", "anstyle-query", "anstyle-wincon", "colorchoice", + "is_terminal_polyfill", "utf8parse", ] [[package]] name = "anstyle" -version = "1.0.6" +version = "1.0.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8901269c6307e8d93993578286ac0edf7f195079ffff5ebdeea6a59ffb7e36bc" +checksum = "55cc3b69f167a1ef2e161439aa98aed94e6028e5f9a59be9a6ffb47aef1651f9" [[package]] name = "anstyle-parse" -version = "0.2.3" +version = "0.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c75ac65da39e5fe5ab759307499ddad880d724eed2f6ce5b5e8a26f4f387928c" +checksum = "3b2d16507662817a6a20a9ea92df6652ee4f94f914589377d69f3b21bc5798a9" dependencies = [ "utf8parse", ] [[package]] name = "anstyle-query" -version = "1.0.2" +version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e28923312444cdd728e4738b3f9c9cac739500909bb3d3c94b43551b16517648" +checksum = "79947af37f4177cfead1110013d678905c37501914fba0efea834c3fe9a8d60c" dependencies = [ - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] name = "anstyle-wincon" -version = "3.0.2" +version = "3.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1cd54b81ec8d6180e24654d0b371ad22fc3dd083b6ff8ba325b72e00c87660a7" +checksum = "2109dbce0e72be3ec00bed26e6a7479ca384ad226efdd66db8fa2e3a38c83125" dependencies = [ "anstyle", - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] name = "anyhow" -version = "1.0.81" +version = "1.0.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0952808a6c2afd1aa8947271f3a60f1a6763c7b912d210184c5149b5cf147247" +checksum = "4c95c10ba0b00a02636238b814946408b1322d5ac4760326e6fb8ec956d85775" [[package]] name = "async-stream" -version = "0.3.5" +version = "0.3.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cd56dd203fef61ac097dd65721a419ddccb106b2d2b70ba60a6b529f03961a51" +checksum = "0b5a71a6f37880a80d1d7f19efd781e4b5de42c88f0722cc13bcb6cc2cfe8476" dependencies = [ "async-stream-impl", "futures-core", @@ -93,46 +105,51 @@ dependencies = [ [[package]] name = "async-stream-impl" -version = "0.3.5" +version = "0.3.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "16e62a023e7c117e27523144c5d2459f4397fcc3cab0085af8e2224f643a0193" +checksum = "c7c24de15d275a1ecfd47a380fb4d5ec9bfe0933f309ed5e705b775596a3574d" dependencies = [ "proc-macro2", "quote", - "syn 2.0.57", + "syn 2.0.89", ] [[package]] name = "async-trait" -version = "0.1.79" +version = "0.1.83" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a507401cad91ec6a857ed5513a2073c82a9b9048762b885bb98655b306964681" +checksum = "721cae7de5c34fbb2acd27e21e6d2cf7b886dce0c27388d46c4e6c47ea4318dd" dependencies = [ "proc-macro2", "quote", - "syn 2.0.57", + "syn 2.0.89", ] +[[package]] +name = "atomic-waker" +version = "1.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0" + [[package]] name = "autocfg" -version = "1.2.0" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1fdabc7756949593fe60f30ec81974b613357de856987752631dea1e3394c80" +checksum = "ace50bade8e6234aa140d9a2f552bbee1db4d353f69b8217bc503490fc1a9f26" [[package]] name = "axum" -version = "0.6.20" +version = "0.7.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b829e4e32b91e643de6eafe82b1d90675f5874230191a4ffbc1b336dec4d6bf" +checksum = "edca88bc138befd0323b20752846e6587272d3b03b0343c8ea28a6f819e6e71f" dependencies = [ "async-trait", "axum-core", - "bitflags 1.3.2", "bytes", "futures-util", "http", "http-body", - "hyper", + "http-body-util", "itoa", "matchit", "memchr", @@ -141,42 +158,45 @@ dependencies = [ "pin-project-lite", "rustversion", "serde", - "sync_wrapper", - "tower", + "sync_wrapper 1.0.2", + "tower 0.5.1", "tower-layer", "tower-service", ] [[package]] name = "axum-core" -version = "0.3.4" +version = "0.4.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "759fa577a247914fd3f7f76d62972792636412fbfd634cd452f6a385a74d2d2c" +checksum = "09f2bd6146b97ae3359fa0cc6d6b376d9539582c7b4220f041a33ec24c226199" dependencies = [ "async-trait", "bytes", "futures-util", "http", "http-body", + "http-body-util", "mime", + "pin-project-lite", "rustversion", + "sync_wrapper 1.0.2", "tower-layer", "tower-service", ] [[package]] name = "backtrace" -version = "0.3.71" +version = "0.3.74" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26b05800d2e817c8b3b4b54abd461726265fa9789ae34330622f2db9ee696f9d" +checksum = "8d82cb332cdfaed17ae235a638438ac4d4839913cc2af585c3c6746e8f8bee1a" dependencies = [ "addr2line", - "cc", "cfg-if", "libc", "miniz_oxide", "object", "rustc-demangle", + "windows-targets 0.52.6", ] [[package]] @@ -195,35 +215,49 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9d297deb1925b89f2ccc13d7635fa0714f12c87adce1c75356b39ca9b7178567" [[package]] -name = "bitflags" -version = "1.3.2" +name = "base64" +version = "0.22.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" +checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" [[package]] name = "bitflags" -version = "2.5.0" +version = "2.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b048fb63fd8b5923fc5aa7b340d8e156aec7ec02f0c78fa8a6ddc2613f6f71de" + +[[package]] +name = "block-padding" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf4b9d6a944f767f8e5e0db018570623c85f3d925ac718db4e06d0187adb21c1" +checksum = "a8894febbff9f758034a5b8e12d87918f56dfc64a8e1fe757d65e29041538d93" +dependencies = [ + "generic-array", +] [[package]] name = "bridgectl" -version = "0.0.6" +version = "0.0.7" dependencies = [ "cat-dev", "clap", "fnv", "libc", - "log 0.0.6", + "log 0.0.7", "mac_address", "miette", - "once_cell", - "terminal_size", + "terminal_size 0.4.0", "tokio", "tracing", "valuable", ] +[[package]] +name = "bumpalo" +version = "3.16.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "79296716171880943b8470b5f8d03aa55eb2e645a4874bdbb28adb49162e012c" + [[package]] name = "byteorder" version = "1.5.0" @@ -232,30 +266,32 @@ checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" [[package]] name = "bytes" -version = "1.6.0" +version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "514de17de45fdb8dc022b1a7975556c53c86f9f0aa5f534b98977b171857c2c9" +checksum = "9ac0150caa2ae65ca5bd83f25c7de183dea78d4d366469f148435e2acfbad0da" [[package]] name = "cat-dev" -version = "0.0.6" +version = "0.0.7" dependencies = [ + "aes", "bytes", + "cipher", "configparser", + "ecb", "fnv", "futures", - "hyper", "libc", "local-ip-address", "mac_address", "miette", "network-interface", - "once_cell", "pin-project-lite", + "reqwest", "serde", "serde_urlencoded", "tempfile", - "thiserror", + "thiserror 2.0.3", "tokio", "tracing", "valuable", @@ -264,16 +300,19 @@ dependencies = [ [[package]] name = "catlog" -version = "0.0.6" +version = "0.0.7" dependencies = [ "tokio", ] [[package]] name = "cc" -version = "1.0.90" +version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8cd6604a82acf3039f1144f54b8eb34e91ffba622051189e71b781822d5ee1f5" +checksum = "fd9de9f2205d5ef3fd67e685b0df337994ddd4495e2a28d185500d0e1edfea47" +dependencies = [ + "shlex", +] [[package]] name = "cfg-if" @@ -281,11 +320,27 @@ version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" +[[package]] +name = "cfg_aliases" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fd16c4719339c4530435d38e511904438d07cce7950afa3718a84ac36c10e89e" + +[[package]] +name = "cipher" +version = "0.4.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "773f3b9af64447d2ce9850330c473515014aa235e6a783b02db81ff39e4a3dad" +dependencies = [ + "crypto-common", + "inout", +] + [[package]] name = "clap" -version = "4.5.4" +version = "4.5.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90bc066a67923782aa8515dbaea16946c5bcc5addbd668bb80af688e53e548a0" +checksum = "fb3b4b9e5a7c7514dfa52869339ee98b3156b0bfb4e8a77c4ff4babb64b1604f" dependencies = [ "clap_builder", "clap_derive", @@ -293,54 +348,54 @@ dependencies = [ [[package]] name = "clap_builder" -version = "4.5.2" +version = "4.5.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae129e2e766ae0ec03484e609954119f123cc1fe650337e155d03b022f24f7b4" +checksum = "b17a95aa67cc7b5ebd32aa5370189aa0d79069ef1c64ce893bd30fb24bff20ec" dependencies = [ "anstream", "anstyle", "clap_lex", "strsim", - "terminal_size", + "terminal_size 0.4.0", "unicase", - "unicode-width", + "unicode-width 0.2.0", ] [[package]] name = "clap_derive" -version = "4.5.4" +version = "4.5.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "528131438037fd55894f62d6e9f068b8f45ac57ffa77517819645d10aed04f64" +checksum = "4ac6a0c7b1a9e9a5186361f67dfa1b88213572f427fb9ab038efb2bd8c582dab" dependencies = [ "heck", "proc-macro2", "quote", - "syn 2.0.57", + "syn 2.0.89", ] [[package]] name = "clap_lex" -version = "0.7.0" +version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "98cc8fbded0c607b7ba9dd60cd98df59af97e84d24e49c8557331cfc26d301ce" +checksum = "afb84c814227b90d6895e01398aee0d8033c00e7466aca416fb6a8e0eb19d8a7" [[package]] name = "colorchoice" -version = "1.0.0" +version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "acbf1af155f9b9ef647e42cdc158db4b64a1b61f743629225fde6f3e0be2a7c7" +checksum = "5b63caa9aa9397e2d9480a9b13673856c78d8ac123288526c37d7839f2a86990" [[package]] name = "configparser" -version = "3.0.4" +version = "3.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ec6d3da8e550377a85339063af6e3735f4b1d9392108da4e083a1b3b9820288" +checksum = "e57e3272f0190c3f1584272d613719ba5fc7df7f4942fe542e63d949cf3a649b" [[package]] name = "console-api" -version = "0.6.0" +version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fd326812b3fd01da5bb1af7d340d0d555fd3d4b641e7f1dfcf5962a902952787" +checksum = "8030735ecb0d128428b64cd379809817e620a40e5001c54465b99ec5feec2857" dependencies = [ "futures-core", "prost", @@ -351,9 +406,9 @@ dependencies = [ [[package]] name = "console-subscriber" -version = "0.2.0" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7481d4c57092cd1c19dd541b92bdce883de840df30aa5d03fd48a3935c01842e" +checksum = "6539aa9c6a4cd31f4b1c040f860a1eac9aa80e7df6b05d506a6e7179936d6a01" dependencies = [ "console-api", "crossbeam-channel", @@ -361,7 +416,9 @@ dependencies = [ "futures-task", "hdrhistogram", "humantime", + "hyper-util", "parking_lot", + "prost", "prost-types", "serde", "serde_json", @@ -374,29 +431,64 @@ dependencies = [ "tracing-subscriber", ] +[[package]] +name = "core-foundation" +version = "0.9.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "91e195e091a93c46f7102ec7818a2aa394e1e1771c3ab4825963fa03e45afb8f" +dependencies = [ + "core-foundation-sys", + "libc", +] + +[[package]] +name = "core-foundation-sys" +version = "0.8.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b" + +[[package]] +name = "cpufeatures" +version = "0.2.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "16b80225097f2e5ae4e7179dd2266824648f3e2f49d9134d584b76389d31c4c3" +dependencies = [ + "libc", +] + [[package]] name = "crc32fast" -version = "1.4.0" +version = "1.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b3855a8a784b474f333699ef2bbca9db2c4a1f6d9088a90a2d25b1eb53111eaa" +checksum = "a97769d94ddab943e4510d138150169a2758b5ef3eb191a9ee688de3e23ef7b3" dependencies = [ "cfg-if", ] [[package]] name = "crossbeam-channel" -version = "0.5.12" +version = "0.5.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab3db02a9c5b5121e1e42fbdb1aeb65f5e02624cc58c43f2884c6ccac0b82f95" +checksum = "33480d6946193aa8033910124896ca395333cae7e2d1113d1fef6c3272217df2" dependencies = [ "crossbeam-utils", ] [[package]] name = "crossbeam-utils" -version = "0.8.19" +version = "0.8.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "22ec99545bb0ed0ea7bb9b8e1e9122ea386ff8a48c0922e43f36d45ab09e0e80" + +[[package]] +name = "crypto-common" +version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "248e3bacc7dc6baa3b21e405ee045c3047101a49145e7e9eca583ab4c2ca5345" +checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3" +dependencies = [ + "generic-array", + "typenum", +] [[package]] name = "deranged" @@ -407,11 +499,40 @@ dependencies = [ "powerfmt", ] +[[package]] +name = "displaydoc" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.89", +] + +[[package]] +name = "ecb" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1a8bfa975b1aec2145850fcaa1c6fe269a16578c44705a532ae3edc92b8881c7" +dependencies = [ + "cipher", +] + [[package]] name = "either" -version = "1.10.0" +version = "1.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "60b1af1c220855b6ceac025d3f6ecdd2b7c4894bfe9cd9bda4fbb4bc7c0d4cf0" + +[[package]] +name = "encoding_rs" +version = "0.8.35" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "11157ac094ffbdde99aa67b23417ebdd801842852b500e395a45a9c0aac03e4a" +checksum = "75030f3c4f45dafd7586dd6780965a8c7e8e285a5ecb86713e63a79c5b2766f3" +dependencies = [ + "cfg-if", +] [[package]] name = "equivalent" @@ -421,9 +542,9 @@ checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" [[package]] name = "errno" -version = "0.3.8" +version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a258e46cdc063eb8519c00b9fc845fc47bcfca4130e2f08e88665ceda8474245" +checksum = "534c5cf6194dfab3db3242765c03bbe257cf92f22b38f6bc0c58d59108a820ba" dependencies = [ "libc", "windows-sys 0.52.0", @@ -431,13 +552,13 @@ dependencies = [ [[package]] name = "fastrand" -version = "2.0.2" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "658bd65b1cf4c852a3cc96f18a8ce7b5640f6b703f905c7d74532294c2a63984" +checksum = "486f806e73c5707928240ddc295403b1b93c96a02038563881c4a2fd84b81ac4" [[package]] name = "findbridge" -version = "0.0.6" +version = "0.0.7" dependencies = [ "cat-dev", "mac_address", @@ -447,9 +568,9 @@ dependencies = [ [[package]] name = "flate2" -version = "1.0.28" +version = "1.0.35" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "46303f565772937ffe1d394a4fac6f411c6013172fadde9dcdb1e147a086940e" +checksum = "c936bfdafb507ebbf50b8074c54fa31c5be9a1e7e5f467dd659697041407d07c" dependencies = [ "crc32fast", "miniz_oxide", @@ -461,6 +582,21 @@ version = "1.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" +[[package]] +name = "foreign-types" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f6f339eb8adc052cd2ca78910fda869aefa38d22d5cb648e6485e4d3fc06f3b1" +dependencies = [ + "foreign-types-shared", +] + +[[package]] +name = "foreign-types-shared" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" + [[package]] name = "form_urlencoded" version = "1.2.1" @@ -472,9 +608,9 @@ dependencies = [ [[package]] name = "futures" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "645c6916888f6cb6350d2550b80fb63e734897a8498abe35cfb732b6487804b0" +checksum = "65bc07b1a8bc7c85c5f2e110c476c7389b4554ba72af57d8445ea63a576b0876" dependencies = [ "futures-channel", "futures-core", @@ -487,9 +623,9 @@ dependencies = [ [[package]] name = "futures-channel" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eac8f7d7865dcb88bd4373ab671c8cf4508703796caa2b1985a9ca867b3fcb78" +checksum = "2dff15bf788c671c1934e366d07e30c1814a8ef514e1af724a602e8a2fbe1b10" dependencies = [ "futures-core", "futures-sink", @@ -497,15 +633,15 @@ dependencies = [ [[package]] name = "futures-core" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dfc6580bb841c5a68e9ef15c77ccc837b40a7504914d52e47b8b0e9bbda25a1d" +checksum = "05f29059c0c2090612e8d742178b0580d2dc940c837851ad723096f87af6663e" [[package]] name = "futures-executor" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a576fc72ae164fca6b9db127eaa9a9dda0d61316034f33a0a0d4eda41f02b01d" +checksum = "1e28d1d997f585e54aebc3f97d39e72338912123a67330d723fdbb564d646c9f" dependencies = [ "futures-core", "futures-task", @@ -514,38 +650,38 @@ dependencies = [ [[package]] name = "futures-io" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a44623e20b9681a318efdd71c299b6b222ed6f231972bfe2f224ebad6311f0c1" +checksum = "9e5c1b78ca4aae1ac06c48a526a655760685149f0d465d21f37abfe57ce075c6" [[package]] name = "futures-macro" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac" +checksum = "162ee34ebcb7c64a8abebc059ce0fee27c2262618d7b60ed8faf72fef13c3650" dependencies = [ "proc-macro2", "quote", - "syn 2.0.57", + "syn 2.0.89", ] [[package]] name = "futures-sink" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9fb8e00e87438d937621c1c6269e53f536c14d3fbd6a042bb24879e57d474fb5" +checksum = "e575fab7d1e0dcb8d0c7bcf9a63ee213816ab51902e6d244a95819acacf1d4f7" [[package]] name = "futures-task" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38d84fa142264698cdce1a9f9172cf383a0c82de1bddcf3092901442c4097004" +checksum = "f90f7dce0722e95104fcb095585910c0977252f286e354b5e3bd38902cd99988" [[package]] name = "futures-util" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d6401deb83407ab3da39eba7e33987a73c3df0c82b4bb5813ee871c19c41d48" +checksum = "9fa08315bb612088cc391249efdc3bc77536f16c91f6cf495e6fbe85b20a4a81" dependencies = [ "futures-channel", "futures-core", @@ -559,9 +695,19 @@ dependencies = [ "slab", ] +[[package]] +name = "generic-array" +version = "0.14.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" +dependencies = [ + "typenum", + "version_check", +] + [[package]] name = "getbridgeconfig" -version = "0.0.6" +version = "0.0.7" dependencies = [ "cat-dev", "tokio", @@ -569,9 +715,9 @@ dependencies = [ [[package]] name = "getrandom" -version = "0.2.12" +version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "190092ea657667030ac6a35e305e62fc4dd69fd98ac98631e5d3a2b1575a12b5" +checksum = "c4567c8db10ae91089c99af84c68c38da3ec2f087c3f82960bcdbf3656b6f4d7" dependencies = [ "cfg-if", "libc", @@ -580,23 +726,23 @@ dependencies = [ [[package]] name = "gimli" -version = "0.28.1" +version = "0.31.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4271d37baee1b8c7e4b708028c57d816cf9d2434acb33a549475f78c181f6253" +checksum = "07e28edb80900c19c28f1072f2e8aeca7fa06b23cd4169cefe1af5aa3260783f" [[package]] name = "h2" -version = "0.3.25" +version = "0.4.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4fbd2820c5e49886948654ab546d0688ff24530286bdcf8fca3cefb16d4618eb" +checksum = "ccae279728d634d083c00f6099cb58f01cc99c145b84b8be2f6c74618d79922e" dependencies = [ + "atomic-waker", "bytes", "fnv", "futures-core", "futures-sink", - "futures-util", "http", - "indexmap 2.2.6", + "indexmap 2.6.0", "slab", "tokio", "tokio-util", @@ -611,9 +757,9 @@ checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" [[package]] name = "hashbrown" -version = "0.14.3" +version = "0.15.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "290f1a1d9242c78d09ce40a5e87e7554ee637af1351968159f4952f028f75604" +checksum = "3a9bfc1af68b1726ea47d3d5109de126281def866b33970e10fbab11b5dafab3" [[package]] name = "hdrhistogram" @@ -621,7 +767,7 @@ version = "7.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "765c9198f173dd59ce26ff9f95ef0aafd0a0fe01fb9d72841bc5066a4c06511d" dependencies = [ - "base64", + "base64 0.21.7", "byteorder", "flate2", "nom", @@ -642,9 +788,9 @@ checksum = "d231dfb89cfffdbc30e7fc41579ed6066ad03abda9e567ccafae602b97ec5024" [[package]] name = "http" -version = "0.2.12" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "601cbb57e577e2f5ef5be8e7b83f0f63994f25aa94d673e54a92d5c516d101f1" +checksum = "21b9ddb458710bc376481b842f5da65cdf31522de232c1ca8146abce2a358258" dependencies = [ "bytes", "fnv", @@ -653,20 +799,32 @@ dependencies = [ [[package]] name = "http-body" -version = "0.4.6" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1efedce1fb8e6913f23e0c92de8e62cd5b772a67e7b3946df930a62566c93184" +dependencies = [ + "bytes", + "http", +] + +[[package]] +name = "http-body-util" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ceab25649e9960c0311ea418d17bee82c0dcec1bd053b5f9a66e265a693bed2" +checksum = "793429d76616a256bcb62c2a2ec2bed781c8307e797e2598c50010f2bee2544f" dependencies = [ "bytes", + "futures-util", "http", + "http-body", "pin-project-lite", ] [[package]] name = "httparse" -version = "1.8.0" +version = "1.9.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d897f394bad6a705d5f4104762e116a75639e470d80901eed05a860a95cb1904" +checksum = "7d71d3574edd2771538b901e6549113b4006ece66150fb69c0fb6d9a2adae946" [[package]] name = "httpdate" @@ -682,13 +840,12 @@ checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4" [[package]] name = "hyper" -version = "0.14.28" +version = "1.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf96e135eb83a2a8ddf766e426a841d8ddd7449d5f00d34ea02b41d2f19eef80" +checksum = "97818827ef4f364230e16705d4706e2897df2bb60617d6ca15d598025a3c481f" dependencies = [ "bytes", "futures-channel", - "futures-core", "futures-util", "h2", "http", @@ -697,182 +854,408 @@ dependencies = [ "httpdate", "itoa", "pin-project-lite", - "socket2", + "smallvec", "tokio", - "tower-service", - "tracing", "want", ] +[[package]] +name = "hyper-rustls" +version = "0.27.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "08afdbb5c31130e3034af566421053ab03787c640246a446327f550d11bcb333" +dependencies = [ + "futures-util", + "http", + "hyper", + "hyper-util", + "rustls", + "rustls-pki-types", + "tokio", + "tokio-rustls", + "tower-service", +] + [[package]] name = "hyper-timeout" -version = "0.4.1" +version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bbb958482e8c7be4bc3cf272a766a2b0bf1a6755e7a6ae777f017a31d11b13b1" +checksum = "2b90d566bffbce6a75bd8b09a05aa8c2cb1fabb6cb348f8840c9e4c90a0d83b0" dependencies = [ "hyper", + "hyper-util", "pin-project-lite", "tokio", - "tokio-io-timeout", + "tower-service", ] [[package]] -name = "indexmap" -version = "1.9.3" +name = "hyper-tls" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd070e393353796e801d209ad339e89596eb4c8d430d18ede6a1cced8fafbd99" +checksum = "70206fc6890eaca9fde8a0bf71caa2ddfc9fe045ac9e5c70df101a7dbde866e0" dependencies = [ - "autocfg", - "hashbrown 0.12.3", + "bytes", + "http-body-util", + "hyper", + "hyper-util", + "native-tls", + "tokio", + "tokio-native-tls", + "tower-service", ] [[package]] -name = "indexmap" -version = "2.2.6" +name = "hyper-util" +version = "0.1.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "168fb715dda47215e360912c096649d23d58bf392ac62f73919e831745e40f26" +checksum = "df2dcfbe0677734ab2f3ffa7fa7bfd4706bfdc1ef393f2ee30184aed67e631b4" dependencies = [ - "equivalent", - "hashbrown 0.14.3", + "bytes", + "futures-channel", + "futures-util", + "http", + "http-body", + "hyper", + "pin-project-lite", + "socket2", + "tokio", + "tower-service", + "tracing", ] [[package]] -name = "is_ci" -version = "1.2.0" +name = "icu_collections" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7655c9839580ee829dfacba1d1278c2b7883e50a277ff7541299489d6bdfdc45" +checksum = "db2fa452206ebee18c4b5c2274dbf1de17008e874b4dc4f0aea9d01ca79e4526" +dependencies = [ + "displaydoc", + "yoke", + "zerofrom", + "zerovec", +] [[package]] -name = "itertools" -version = "0.11.0" +name = "icu_locid" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1c173a5686ce8bfa551b3563d0c2170bf24ca44da99c7ca4bfdab5418c3fe57" +checksum = "13acbb8371917fc971be86fc8057c41a64b521c184808a698c02acc242dbf637" dependencies = [ - "either", + "displaydoc", + "litemap", + "tinystr", + "writeable", + "zerovec", ] [[package]] -name = "itoa" -version = "1.0.11" +name = "icu_locid_transform" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49f1f14873335454500d59611f1cf4a4b0f786f9ac11f4312a78e4cf2566695b" +checksum = "01d11ac35de8e40fdeda00d9e1e9d92525f3f9d887cdd7aa81d727596788b54e" +dependencies = [ + "displaydoc", + "icu_locid", + "icu_locid_transform_data", + "icu_provider", + "tinystr", + "zerovec", +] [[package]] -name = "lazy_static" -version = "1.4.0" +name = "icu_locid_transform_data" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" +checksum = "fdc8ff3388f852bede6b579ad4e978ab004f139284d7b28715f773507b946f6e" [[package]] -name = "libc" -version = "0.2.153" +name = "icu_normalizer" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c198f91728a82281a64e1f4f9eeb25d82cb32a5de251c6bd1b5154d63a8e7bd" +checksum = "19ce3e0da2ec68599d193c93d088142efd7f9c5d6fc9b803774855747dc6a84f" +dependencies = [ + "displaydoc", + "icu_collections", + "icu_normalizer_data", + "icu_properties", + "icu_provider", + "smallvec", + "utf16_iter", + "utf8_iter", + "write16", + "zerovec", +] [[package]] -name = "linux-raw-sys" -version = "0.4.13" +name = "icu_normalizer_data" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "01cda141df6706de531b6c46c3a33ecca755538219bd484262fa09410c13539c" +checksum = "f8cafbf7aa791e9b22bec55a167906f9e1215fd475cd22adfcf660e03e989516" [[package]] -name = "local-ip-address" -version = "0.6.1" +name = "icu_properties" +version = "1.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "136ef34e18462b17bf39a7826f8f3bbc223341f8e83822beb8b77db9a3d49696" +checksum = "93d6020766cfc6302c15dbbc9c8778c37e62c14427cb7f6e601d849e092aeef5" dependencies = [ - "libc", - "neli", - "thiserror", - "windows-sys 0.48.0", + "displaydoc", + "icu_collections", + "icu_locid_transform", + "icu_properties_data", + "icu_provider", + "tinystr", + "zerovec", ] [[package]] -name = "lock_api" -version = "0.4.11" +name = "icu_properties_data" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c168f8615b12bc01f9c17e2eb0cc07dcae1940121185446edc3744920e8ef45" -dependencies = [ - "autocfg", - "scopeguard", -] +checksum = "67a8effbc3dd3e4ba1afa8ad918d5684b8868b3b26500753effea8d2eed19569" [[package]] -name = "log" -version = "0.0.6" +name = "icu_provider" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6ed421c8a8ef78d3e2dbc98a973be2f3770cb42b606e3ab18d6237c4dfde68d9" dependencies = [ - "console-subscriber", - "miette", - "once_cell", - "tracing", - "tracing-error", - "tracing-subscriber", + "displaydoc", + "icu_locid", + "icu_provider_macros", + "stable_deref_trait", + "tinystr", + "writeable", + "yoke", + "zerofrom", + "zerovec", ] [[package]] -name = "log" -version = "0.4.21" +name = "icu_provider_macros" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90ed8c1e510134f979dbc4f070f87d4313098b704861a105fe34231c70a3901c" +checksum = "1ec89e9337638ecdc08744df490b221a7399bf8d164eb52a665454e60e075ad6" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.89", +] [[package]] -name = "mac_address" -version = "1.1.5" +name = "idna" +version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4863ee94f19ed315bf3bc00299338d857d4b5bc856af375cc97d237382ad3856" +checksum = "686f825264d630750a544639377bae737628043f20d38bbc029e8f29ea968a7e" dependencies = [ - "nix", - "winapi", + "idna_adapter", + "smallvec", + "utf8_iter", ] [[package]] -name = "matchers" -version = "0.1.0" +name = "idna_adapter" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8263075bb86c5a1b1427b5ae862e8889656f126e9f77c484496e8b47cf5c5558" +checksum = "daca1df1c957320b2cf139ac61e7bd64fed304c5040df000a745aa1de3b4ef71" dependencies = [ - "regex-automata 0.1.10", + "icu_normalizer", + "icu_properties", ] [[package]] -name = "matchit" -version = "0.7.3" +name = "indexmap" +version = "1.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0e7465ac9959cc2b1404e8e2367b43684a6d13790fe23056cc8c6c5a6b7bcb94" +checksum = "bd070e393353796e801d209ad339e89596eb4c8d430d18ede6a1cced8fafbd99" +dependencies = [ + "autocfg", + "hashbrown 0.12.3", +] [[package]] -name = "memchr" -version = "2.7.2" +name = "indexmap" +version = "2.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c8640c5d730cb13ebd907d8d04b52f55ac9a2eec55b440c8892f40d56c76c1d" +checksum = "707907fe3c25f5424cce2cb7e1cbcafee6bdbe735ca90ef77c29e84591e5b9da" +dependencies = [ + "equivalent", + "hashbrown 0.15.1", +] [[package]] -name = "memoffset" -version = "0.6.5" +name = "inout" +version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5aa361d4faea93603064a027415f07bd8e1d5c88c9fbf68bf56a285428fd79ce" +checksum = "a0c10553d664a4d0bcff9f4215d0aac67a639cc68ef660840afe309b807bc9f5" dependencies = [ - "autocfg", + "block-padding", + "generic-array", ] [[package]] -name = "miette" -version = "7.2.0" +name = "ipnet" +version = "2.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4edc8853320c2a0dab800fbda86253c8938f6ea88510dc92c5f1ed20e794afc1" -dependencies = [ - "backtrace", - "backtrace-ext", - "cfg-if", +checksum = "ddc24109865250148c2e0f3d25d4f0f479571723792d3802153c60922a4fb708" + +[[package]] +name = "is_ci" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7655c9839580ee829dfacba1d1278c2b7883e50a277ff7541299489d6bdfdc45" + +[[package]] +name = "is_terminal_polyfill" +version = "1.70.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7943c866cc5cd64cbc25b2e01621d07fa8eb2a1a23160ee81ce38704e97b8ecf" + +[[package]] +name = "itertools" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "413ee7dfc52ee1a4949ceeb7dbc8a33f2d6c088194d9f922fb8318faf1f01186" +dependencies = [ + "either", +] + +[[package]] +name = "itoa" +version = "1.0.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "540654e97a3f4470a492cd30ff187bc95d89557a903a2bbf112e2fae98104ef2" + +[[package]] +name = "js-sys" +version = "0.3.72" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6a88f1bda2bd75b0452a14784937d796722fdebfe50df998aeb3f0b7603019a9" +dependencies = [ + "wasm-bindgen", +] + +[[package]] +name = "lazy_static" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" + +[[package]] +name = "libc" +version = "0.2.164" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "433bfe06b8c75da9b2e3fbea6e5329ff87748f0b144ef75306e674c3f6f7c13f" + +[[package]] +name = "linux-raw-sys" +version = "0.4.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "78b3ae25bc7c8c38cec158d1f2757ee79e9b3740fbc7ccf0e59e4b08d793fa89" + +[[package]] +name = "litemap" +version = "0.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4ee93343901ab17bd981295f2cf0026d4ad018c7c31ba84549a4ddbb47a45104" + +[[package]] +name = "local-ip-address" +version = "0.6.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3669cf5561f8d27e8fc84cc15e58350e70f557d4d65f70e3154e54cd2f8e1782" +dependencies = [ + "libc", + "neli", + "thiserror 1.0.69", + "windows-sys 0.59.0", +] + +[[package]] +name = "lock_api" +version = "0.4.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "07af8b9cdd281b7915f413fa73f29ebd5d55d0d3f0155584dade1ff18cea1b17" +dependencies = [ + "autocfg", + "scopeguard", +] + +[[package]] +name = "log" +version = "0.0.7" +dependencies = [ + "console-subscriber", + "miette", + "tracing", + "tracing-error", + "tracing-subscriber", +] + +[[package]] +name = "log" +version = "0.4.22" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a7a70ba024b9dc04c27ea2f0c0548feb474ec5c54bba33a7f72f873a39d07b24" + +[[package]] +name = "mac_address" +version = "1.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8836fae9d0d4be2c8b4efcdd79e828a2faa058a90d005abf42f91cac5493a08e" +dependencies = [ + "nix", + "winapi", +] + +[[package]] +name = "matchers" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8263075bb86c5a1b1427b5ae862e8889656f126e9f77c484496e8b47cf5c5558" +dependencies = [ + "regex-automata 0.1.10", +] + +[[package]] +name = "matchit" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0e7465ac9959cc2b1404e8e2367b43684a6d13790fe23056cc8c6c5a6b7bcb94" + +[[package]] +name = "memchr" +version = "2.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3" + +[[package]] +name = "memoffset" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "488016bfae457b036d996092f6cb448677611ce4449e970ceaf42695203f218a" +dependencies = [ + "autocfg", +] + +[[package]] +name = "miette" +version = "7.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4edc8853320c2a0dab800fbda86253c8938f6ea88510dc92c5f1ed20e794afc1" +dependencies = [ + "backtrace", + "backtrace-ext", + "cfg-if", "miette-derive", "owo-colors", "supports-color", "supports-hyperlinks", "supports-unicode", - "terminal_size", + "terminal_size 0.3.0", "textwrap", - "thiserror", - "unicode-width", + "thiserror 1.0.69", + "unicode-width 0.1.14", ] [[package]] @@ -883,7 +1266,7 @@ checksum = "dcf09caffaac8068c346b6df2a7fc27a177fd20b39421a39ce0a211bde679a6c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.57", + "syn 2.0.89", ] [[package]] @@ -900,27 +1283,28 @@ checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" [[package]] name = "miniz_oxide" -version = "0.7.2" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d811f3e15f28568be3407c8e7fdb6514c1cda3cb30683f15b6a1a1dc4ea14a7" +checksum = "e2d80299ef12ff69b16a84bb182e3b9df68b5a91574d3d4fa6e41b65deec4df1" dependencies = [ - "adler", + "adler2", ] [[package]] name = "mio" -version = "0.8.11" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4a650543ca06a924e8b371db273b2756685faae30f8487da1b56505a8f78b0c" +checksum = "80e04d1dcff3aae0704555fe5fee3bcfaf3d1fdf8a7e521d5b9d2b42acb52cec" dependencies = [ + "hermit-abi", "libc", "wasi", - "windows-sys 0.48.0", + "windows-sys 0.52.0", ] [[package]] name = "mionparamspace" -version = "0.0.6" +version = "0.0.7" dependencies = [ "cat-dev", "time", @@ -929,13 +1313,30 @@ dependencies = [ [[package]] name = "mionps" -version = "0.0.6" +version = "0.0.7" dependencies = [ "cat-dev", "time", "tokio", ] +[[package]] +name = "native-tls" +version = "0.2.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a8614eb2c83d59d1c8cc974dd3f920198647674a0a035e1af1fa58707e317466" +dependencies = [ + "libc", + "log 0.4.22", + "openssl", + "openssl-probe", + "openssl-sys", + "schannel", + "security-framework", + "security-framework-sys", + "tempfile", +] + [[package]] name = "neli" version = "0.6.4" @@ -944,7 +1345,7 @@ checksum = "1100229e06604150b3becd61a4965d5c70f3be1759544ea7274166f4be41ef43" dependencies = [ "byteorder", "libc", - "log 0.4.21", + "log 0.4.22", "neli-proc-macros", ] @@ -963,25 +1364,25 @@ dependencies = [ [[package]] name = "network-interface" -version = "1.1.2" +version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ee524f98ddbe7772762a7477cfb22356df075cac4069bf81ac5082a46db742c" +checksum = "433419f898328beca4f2c6c73a1b52540658d92b0a99f0269330457e0fd998d5" dependencies = [ "cc", "libc", - "thiserror", + "thiserror 1.0.69", "winapi", ] [[package]] name = "nix" -version = "0.23.2" +version = "0.28.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f3790c00a0150112de0f4cd161e3d7fc4b2d8a5542ffc35f099a2562aecb35c" +checksum = "ab2156c4fce2f8df6c499cc1c763e4394b7482525bf2a9701c9d79d215f519e4" dependencies = [ - "bitflags 1.3.2", - "cc", + "bitflags", "cfg-if", + "cfg_aliases", "libc", "memoffset", ] @@ -1014,37 +1415,71 @@ checksum = "51d515d32fb182ee37cda2ccdcb92950d6a3c2893aa280e540671c2cd0f3b1d9" [[package]] name = "num-traits" -version = "0.2.18" +version = "0.2.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da0df0e5185db44f69b44f26786fe401b6c293d1907744beaa7fa62b2e5a517a" +checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841" dependencies = [ "autocfg", ] [[package]] -name = "num_cpus" -version = "1.16.0" +name = "object" +version = "0.36.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4161fcb6d602d4d2081af7c3a45852d875a03dd337a6bfdd6e06407b61342a43" +checksum = "aedf0a2d09c573ed1d8d85b30c119153926a2b36dce0ab28322c09a117a4683e" dependencies = [ - "hermit-abi", + "memchr", +] + +[[package]] +name = "once_cell" +version = "1.20.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1261fe7e33c73b354eab43b1273a57c8f967d0391e80353e51f764ac02cf6775" + +[[package]] +name = "openssl" +version = "0.10.68" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6174bc48f102d208783c2c84bf931bb75927a617866870de8a4ea85597f871f5" +dependencies = [ + "bitflags", + "cfg-if", + "foreign-types", "libc", + "once_cell", + "openssl-macros", + "openssl-sys", ] [[package]] -name = "object" -version = "0.32.2" +name = "openssl-macros" +version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a6a622008b6e321afc04970976f62ee297fdbaa6f95318ca343e3eebb9648441" +checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" dependencies = [ - "memchr", + "proc-macro2", + "quote", + "syn 2.0.89", ] [[package]] -name = "once_cell" -version = "1.19.0" +name = "openssl-probe" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" + +[[package]] +name = "openssl-sys" +version = "0.9.104" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" +checksum = "45abf306cbf99debc8195b66b7346498d7b10c210de50418b5ccd7ceba08c741" +dependencies = [ + "cc", + "libc", + "pkg-config", + "vcpkg", +] [[package]] name = "overload" @@ -1054,15 +1489,15 @@ checksum = "b15813163c1d831bf4a13c3610c05c0d03b39feb07f7e09fa234dac9b15aaf39" [[package]] name = "owo-colors" -version = "4.0.0" +version = "4.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "caff54706df99d2a78a5a4e3455ff45448d81ef1bb63c22cd14052ca0e993a3f" +checksum = "fb37767f6569cd834a413442455e0f066d0d522de8630436e2a1761d9726ba56" [[package]] name = "parking_lot" -version = "0.12.1" +version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3742b2c103b9f06bc9fff0a37ff4912935851bee6d36f3c02bcc755bcfec228f" +checksum = "f1bf18183cf54e8d6059647fc3063646a1801cf30896933ec2311622cc4b9a27" dependencies = [ "lock_api", "parking_lot_core", @@ -1070,15 +1505,15 @@ dependencies = [ [[package]] name = "parking_lot_core" -version = "0.9.9" +version = "0.9.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c42a9226546d68acdd9c0a280d17ce19bfe27a46bf68784e4066115788d008e" +checksum = "1e401f977ab385c9e4e3ab30627d6f26d00e2c73eef317493c4ec6d468726cf8" dependencies = [ "cfg-if", "libc", "redox_syscall", "smallvec", - "windows-targets 0.48.5", + "windows-targets 0.52.6", ] [[package]] @@ -1089,29 +1524,29 @@ checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" [[package]] name = "pin-project" -version = "1.1.5" +version = "1.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6bf43b791c5b9e34c3d182969b4abb522f9343702850a2e57f460d00d09b4b3" +checksum = "be57f64e946e500c8ee36ef6331845d40a93055567ec57e8fae13efd33759b95" dependencies = [ "pin-project-internal", ] [[package]] name = "pin-project-internal" -version = "1.1.5" +version = "1.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2f38a4412a78282e09a2cf38d195ea5420d15ba0602cb375210efbc877243965" +checksum = "3c0f5fad0874fc7abcd4d750e76917eaebbecaa2c20bde22e1dbeeba8beb758c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.57", + "syn 2.0.89", ] [[package]] name = "pin-project-lite" -version = "0.2.14" +version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bda66fc9667c18cb2758a2ac84d1167245054bcf85d5d1aaa6923f45801bdd02" +checksum = "915a1e146535de9163f3987b8944ed8cf49a18bb0056bcebcdcece385cece4ff" [[package]] name = "pin-utils" @@ -1119,6 +1554,12 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" +[[package]] +name = "pkg-config" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "953ec861398dccce10c670dfeaf3ec4911ca479e9c02154b3a215178c5f566f2" + [[package]] name = "powerfmt" version = "0.2.0" @@ -1127,24 +1568,27 @@ checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391" [[package]] name = "ppv-lite86" -version = "0.2.17" +version = "0.2.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" +checksum = "77957b295656769bb8ad2b6a6b09d897d94f05c41b069aede1fcdaa675eaea04" +dependencies = [ + "zerocopy", +] [[package]] name = "proc-macro2" -version = "1.0.79" +version = "1.0.92" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e835ff2298f5721608eb1a980ecaee1aef2c132bf95ecc026a11b7bf3c01c02e" +checksum = "37d3544b3f2748c54e147655edb5025752e2303145b5aefb3c3ea2c78b973bb0" dependencies = [ "unicode-ident", ] [[package]] name = "prost" -version = "0.12.3" +version = "0.13.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "146c289cda302b98a28d40c8b3b90498d6e526dd24ac2ecea73e4e491685b94a" +checksum = "7b0487d90e047de87f984913713b85c601c05609aad5b0df4b4573fbf69aa13f" dependencies = [ "bytes", "prost-derive", @@ -1152,31 +1596,31 @@ dependencies = [ [[package]] name = "prost-derive" -version = "0.12.3" +version = "0.13.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "efb6c9a1dd1def8e2124d17e83a20af56f1570d6c2d2bd9e266ccb768df3840e" +checksum = "e9552f850d5f0964a4e4d0bf306459ac29323ddfbae05e35a7c0d35cb0803cc5" dependencies = [ "anyhow", "itertools", "proc-macro2", "quote", - "syn 2.0.57", + "syn 2.0.89", ] [[package]] name = "prost-types" -version = "0.12.3" +version = "0.13.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "193898f59edcf43c26227dcd4c8427f00d99d61e95dcde58dabd49fa291d470e" +checksum = "4759aa0d3a6232fb8dbdb97b61de2c20047c68aca932c7ed76da9d788508d670" dependencies = [ "prost", ] [[package]] name = "quote" -version = "1.0.35" +version = "1.0.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "291ec9ab5efd934aaf503a6466c5d5251535d108ee747472c3977cc5acc868ef" +checksum = "b5b9d34b8991d19d98081b46eacdd8eb58c6f2b201139f7c5f643cc155a633af" dependencies = [ "proc-macro2", ] @@ -1213,23 +1657,23 @@ dependencies = [ [[package]] name = "redox_syscall" -version = "0.4.1" +version = "0.5.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4722d768eff46b75989dd134e5c353f0d6296e5aaa3132e776cbdb56be7731aa" +checksum = "9b6dfecf2c74bce2466cabf93f6664d6998a69eb21e39f4207930065b27b771f" dependencies = [ - "bitflags 1.3.2", + "bitflags", ] [[package]] name = "regex" -version = "1.10.4" +version = "1.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c117dbdfde9c8308975b6a18d71f3f385c89461f7b3fb054288ecf2a2058ba4c" +checksum = "b544ef1b4eac5dc2db33ea63606ae9ffcfac26c1416a2806ae0bf5f56b201191" dependencies = [ "aho-corasick", "memchr", - "regex-automata 0.4.6", - "regex-syntax 0.8.3", + "regex-automata 0.4.9", + "regex-syntax 0.8.5", ] [[package]] @@ -1243,13 +1687,13 @@ dependencies = [ [[package]] name = "regex-automata" -version = "0.4.6" +version = "0.4.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "86b83b8b9847f9bf95ef68afb0b8e6cdb80f498442f5179a29fad448fcc1eaea" +checksum = "809e8dc61f6de73b46c85f4c96486310fe304c434cfa43669d7b40f711150908" dependencies = [ "aho-corasick", "memchr", - "regex-syntax 0.8.3", + "regex-syntax 0.8.5", ] [[package]] @@ -1260,40 +1704,146 @@ checksum = "f162c6dd7b008981e4d40210aca20b4bd0f9b60ca9271061b07f78537722f2e1" [[package]] name = "regex-syntax" -version = "0.8.3" +version = "0.8.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2b15c43186be67a4fd63bee50d0303afffcef381492ebe2c5d87f324e1b8815c" + +[[package]] +name = "reqwest" +version = "0.12.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a77c62af46e79de0a562e1a9849205ffcb7fc1238876e9bd743357570e04046f" +dependencies = [ + "base64 0.22.1", + "bytes", + "encoding_rs", + "futures-core", + "futures-util", + "h2", + "http", + "http-body", + "http-body-util", + "hyper", + "hyper-rustls", + "hyper-tls", + "hyper-util", + "ipnet", + "js-sys", + "log 0.4.22", + "mime", + "native-tls", + "once_cell", + "percent-encoding", + "pin-project-lite", + "rustls-pemfile", + "serde", + "serde_json", + "serde_urlencoded", + "sync_wrapper 1.0.2", + "system-configuration", + "tokio", + "tokio-native-tls", + "tower-service", + "url", + "wasm-bindgen", + "wasm-bindgen-futures", + "web-sys", + "windows-registry", +] + +[[package]] +name = "ring" +version = "0.17.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "adad44e29e4c806119491a7f06f03de4d1af22c3a680dd47f1e6e179439d1f56" +checksum = "c17fa4cb658e3583423e915b9f3acc01cceaee1860e33d59ebae66adc3a2dc0d" +dependencies = [ + "cc", + "cfg-if", + "getrandom", + "libc", + "spin", + "untrusted", + "windows-sys 0.52.0", +] [[package]] name = "rustc-demangle" -version = "0.1.23" +version = "0.1.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d626bb9dae77e28219937af045c257c28bfd3f69333c512553507f5f9798cb76" +checksum = "719b953e2095829ee67db738b3bfa9fa368c94900df327b3f07fe6e794d2fe1f" [[package]] name = "rustix" -version = "0.38.32" +version = "0.38.41" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "65e04861e65f21776e67888bfbea442b3642beaa0138fdb1dd7a84a52dffdb89" +checksum = "d7f649912bc1495e167a6edee79151c84b1bad49748cb4f1f1167f459f6224f6" dependencies = [ - "bitflags 2.5.0", + "bitflags", "errno", "libc", "linux-raw-sys", "windows-sys 0.52.0", ] +[[package]] +name = "rustls" +version = "0.23.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9c9cc1d47e243d655ace55ed38201c19ae02c148ae56412ab8750e8f0166ab7f" +dependencies = [ + "once_cell", + "rustls-pki-types", + "rustls-webpki", + "subtle", + "zeroize", +] + +[[package]] +name = "rustls-pemfile" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dce314e5fee3f39953d46bb63bb8a46d40c2f8fb7cc5a3b6cab2bde9721d6e50" +dependencies = [ + "rustls-pki-types", +] + +[[package]] +name = "rustls-pki-types" +version = "1.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "16f1201b3c9a7ee8039bcadc17b7e605e2945b27eee7631788c1bd2b0643674b" + +[[package]] +name = "rustls-webpki" +version = "0.102.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "64ca1bc8749bd4cf37b5ce386cc146580777b4e8572c7b97baf22c83f444bee9" +dependencies = [ + "ring", + "rustls-pki-types", + "untrusted", +] + [[package]] name = "rustversion" -version = "1.0.14" +version = "1.0.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ffc183a10b4478d04cbbbfc96d0873219d962dd5accaff2ffbd4ceb7df837f4" +checksum = "0e819f2bc632f285be6d7cd36e25940d45b2391dd6d9b939e79de557f7014248" [[package]] name = "ryu" -version = "1.0.17" +version = "1.0.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f3cb5ba0dc43242ce17de99c180e96db90b235b8a9fdc9543c96d2209116bd9f" + +[[package]] +name = "schannel" +version = "0.1.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e86697c916019a8588c99b5fac3cead74ec0b4b819707a682fd4d23fa0ce1ba1" +checksum = "1f29ebaa345f945cec9fbbc532eb307f0fdad8161f281b6369539c8d84876b3d" +dependencies = [ + "windows-sys 0.59.0", +] [[package]] name = "scopeguard" @@ -1301,33 +1851,57 @@ version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" +[[package]] +name = "security-framework" +version = "2.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "897b2245f0b511c87893af39b033e5ca9cce68824c4d7e7630b5a1d339658d02" +dependencies = [ + "bitflags", + "core-foundation", + "core-foundation-sys", + "libc", + "security-framework-sys", +] + +[[package]] +name = "security-framework-sys" +version = "2.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fa39c7303dc58b5543c94d22c1766b0d31f2ee58306363ea622b10bbc075eaa2" +dependencies = [ + "core-foundation-sys", + "libc", +] + [[package]] name = "serde" -version = "1.0.197" +version = "1.0.215" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3fb1c873e1b9b056a4dc4c0c198b24c3ffa059243875552b2bd0933b1aee4ce2" +checksum = "6513c1ad0b11a9376da888e3e0baa0077f1aed55c17f50e7b2397136129fb88f" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.197" +version = "1.0.215" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7eb0b34b42edc17f6b7cac84a52a1c5f0e1bb2227e997ca9011ea3dd34e8610b" +checksum = "ad1e866f866923f252f05c889987993144fb74e722403468a4ebd70c3cd756c0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.57", + "syn 2.0.89", ] [[package]] name = "serde_json" -version = "1.0.115" +version = "1.0.133" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "12dc5c46daa8e9fdf4f5e71b6cf9a53f2487da0e86e55808e2d35539666497dd" +checksum = "c7fceb2473b9166b2294ef05efcb65a3db80803f0b03ef86a5fc88a2b85ee377" dependencies = [ "itoa", + "memchr", "ryu", "serde", ] @@ -1346,7 +1920,7 @@ dependencies = [ [[package]] name = "setbridgeconfig" -version = "0.0.6" +version = "0.0.7" dependencies = [ "cat-dev", "tokio", @@ -1361,11 +1935,17 @@ dependencies = [ "lazy_static", ] +[[package]] +name = "shlex" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" + [[package]] name = "signal-hook-registry" -version = "1.4.1" +version = "1.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d8229b473baa5980ac72ef434c4415e70c4b5e71b423043adb4ba059f89c99a1" +checksum = "a9e9e0b4211b72e7b8b6e85c807d36c212bdb33ea8587f7569562a84df5465b1" dependencies = [ "libc", ] @@ -1393,25 +1973,43 @@ checksum = "b7c388c1b5e93756d0c740965c41e8822f866621d41acbdf6336a6a168f8840c" [[package]] name = "socket2" -version = "0.5.6" +version = "0.5.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05ffd9c0a93b7543e062e759284fcf5f5e3b098501104bfbdde4d404db792871" +checksum = "ce305eb0b4296696835b71df73eb912e0f1ffd2556a501fcede6e0c50349191c" dependencies = [ "libc", "windows-sys 0.52.0", ] +[[package]] +name = "spin" +version = "0.9.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67" + +[[package]] +name = "stable_deref_trait" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3" + [[package]] name = "strsim" -version = "0.11.0" +version = "0.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ee073c9e4cd00e28217186dbe12796d692868f432bf2e97ee73bed0c56dfa01" +checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f" + +[[package]] +name = "subtle" +version = "2.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292" [[package]] name = "supports-color" -version = "3.0.0" +version = "3.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9829b314621dfc575df4e409e79f9d6a66a3bd707ab73f23cb4aa3a854ac854f" +checksum = "8775305acf21c96926c900ad056abeef436701108518cf890020387236ac5a77" dependencies = [ "is_ci", ] @@ -1429,43 +2027,85 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b7401a30af6cb5818bb64852270bb722533397edcfc7344954a38f420819ece2" [[package]] -name = "syn" -version = "1.0.109" +name = "syn" +version = "1.0.109" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "syn" +version = "2.0.89" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "44d46482f1c1c87acd84dea20c1bf5ebff4c757009ed6bf19cfd36fb10e92c4e" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "sync_wrapper" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2047c6ded9c721764247e62cd3b03c09ffc529b2ba5b10ec482ae507a4a70160" + +[[package]] +name = "sync_wrapper" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0bf256ce5efdfa370213c1dabab5935a12e49f2c58d15e9eac2870d3b4f27263" +dependencies = [ + "futures-core", +] + +[[package]] +name = "synstructure" +version = "0.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" +checksum = "c8af7666ab7b6390ab78131fb5b0fce11d6b7a6951602017c35fa82800708971" dependencies = [ "proc-macro2", "quote", - "unicode-ident", + "syn 2.0.89", ] [[package]] -name = "syn" -version = "2.0.57" +name = "system-configuration" +version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "11a6ae1e52eb25aab8f3fb9fca13be982a373b8f1157ca14b897a825ba4a2d35" +checksum = "3c879d448e9d986b661742763247d3693ed13609438cf3d006f51f5368a5ba6b" dependencies = [ - "proc-macro2", - "quote", - "unicode-ident", + "bitflags", + "core-foundation", + "system-configuration-sys", ] [[package]] -name = "sync_wrapper" -version = "0.1.2" +name = "system-configuration-sys" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2047c6ded9c721764247e62cd3b03c09ffc529b2ba5b10ec482ae507a4a70160" +checksum = "8e1d1b10ced5ca923a1fcb8d03e96b8d3268065d724548c0211415ff6ac6bac4" +dependencies = [ + "core-foundation-sys", + "libc", +] [[package]] name = "tempfile" -version = "3.10.1" +version = "3.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85b77fafb263dd9d05cbeac119526425676db3784113aa9295c88498cbf8bff1" +checksum = "28cce251fcbc87fac86a866eeb0d6c2d536fc16d06f184bb61aeae11aa4cee0c" dependencies = [ "cfg-if", "fastrand", + "once_cell", "rustix", - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] @@ -1478,6 +2118,16 @@ dependencies = [ "windows-sys 0.48.0", ] +[[package]] +name = "terminal_size" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4f599bd7ca042cfdf8f4512b277c02ba102247820f9d9d4a9f521f496751a6ef" +dependencies = [ + "rustix", + "windows-sys 0.59.0", +] + [[package]] name = "textwrap" version = "0.16.1" @@ -1486,27 +2136,47 @@ checksum = "23d434d3f8967a09480fb04132ebe0a3e088c173e6d0ee7897abbdf4eab0f8b9" dependencies = [ "smawk", "unicode-linebreak", - "unicode-width", + "unicode-width 0.1.14", +] + +[[package]] +name = "thiserror" +version = "1.0.69" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6aaf5339b578ea85b50e080feb250a3e8ae8cfcdff9a461c9ec2904bc923f52" +dependencies = [ + "thiserror-impl 1.0.69", ] [[package]] name = "thiserror" -version = "1.0.58" +version = "2.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c006c85c7651b3cf2ada4584faa36773bd07bac24acfb39f3c431b36d7e667aa" +dependencies = [ + "thiserror-impl 2.0.3", +] + +[[package]] +name = "thiserror-impl" +version = "1.0.69" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "03468839009160513471e86a034bb2c5c0e4baae3b43f79ffc55c4a5427b3297" +checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1" dependencies = [ - "thiserror-impl", + "proc-macro2", + "quote", + "syn 2.0.89", ] [[package]] name = "thiserror-impl" -version = "1.0.58" +version = "2.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c61f3ba182994efc43764a46c018c347bc492c79f024e705f46567b418f6d4f7" +checksum = "f077553d607adc1caf65430528a576c757a71ed73944b66ebb58ef2bbd243568" dependencies = [ "proc-macro2", "quote", - "syn 2.0.57", + "syn 2.0.89", ] [[package]] @@ -1521,9 +2191,9 @@ dependencies = [ [[package]] name = "time" -version = "0.3.34" +version = "0.3.36" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c8248b6521bb14bc45b4067159b9b6ad792e2d6d754d6c41fb50e29fefe38749" +checksum = "5dfd88e563464686c916c7e46e623e520ddc6d79fa6641390f2e3fa86e83e885" dependencies = [ "deranged", "num-conv", @@ -1538,52 +2208,72 @@ version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ef927ca75afb808a4d64dd374f00a2adf8d0fcff8e7b184af886c3c87ec4a3f3" +[[package]] +name = "tinystr" +version = "0.7.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9117f5d4db391c1cf6927e7bea3db74b9a1c1add8f7eda9ffd5364f40f57b82f" +dependencies = [ + "displaydoc", + "zerovec", +] + [[package]] name = "tokio" -version = "1.37.0" +version = "1.41.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1adbebffeca75fcfd058afa480fb6c0b81e165a0323f9c9d39c9697e37c46787" +checksum = "22cfb5bee7a6a52939ca9224d6ac897bb669134078daa8735560897f69de4d33" dependencies = [ "backtrace", "bytes", "libc", "mio", - "num_cpus", "parking_lot", "pin-project-lite", "signal-hook-registry", "socket2", "tokio-macros", "tracing", - "windows-sys 0.48.0", + "windows-sys 0.52.0", ] [[package]] -name = "tokio-io-timeout" -version = "1.2.0" +name = "tokio-macros" +version = "2.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "30b74022ada614a1b4834de765f9bb43877f910cc8ce4be40e89042c9223a8bf" +checksum = "693d596312e88961bc67d7f1f97af8a70227d9f90c31bba5806eec004978d752" dependencies = [ - "pin-project-lite", + "proc-macro2", + "quote", + "syn 2.0.89", +] + +[[package]] +name = "tokio-native-tls" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bbae76ab933c85776efabc971569dd6119c580d8f5d448769dec1764bf796ef2" +dependencies = [ + "native-tls", "tokio", ] [[package]] -name = "tokio-macros" -version = "2.2.0" +name = "tokio-rustls" +version = "0.26.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b8a1e28f2deaa14e508979454cb3a223b10b938b45af148bc0986de36f1923b" +checksum = "0c7bc40d0e5a97695bb96e27995cd3a08538541b0a846f65bba7a359f36700d4" dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.57", + "rustls", + "rustls-pki-types", + "tokio", ] [[package]] name = "tokio-stream" -version = "0.1.15" +version = "0.1.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "267ac89e0bec6e691e5813911606935d77c476ff49024f98abcea3e7b15e37af" +checksum = "4f4e6ce100d0eb49a2734f8c0812bcd324cf357d21810932c5df6b96ef2b86f1" dependencies = [ "futures-core", "pin-project-lite", @@ -1592,40 +2282,42 @@ dependencies = [ [[package]] name = "tokio-util" -version = "0.7.10" +version = "0.7.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5419f34732d9eb6ee4c3578b7989078579b7f039cbbb9ca2c4da015749371e15" +checksum = "61e7c3654c13bcd040d4a03abee2c75b1d14a37b423cf5a813ceae1cc903ec6a" dependencies = [ "bytes", "futures-core", "futures-sink", "pin-project-lite", "tokio", - "tracing", ] [[package]] name = "tonic" -version = "0.10.2" +version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d560933a0de61cf715926b9cac824d4c883c2c43142f787595e48280c40a1d0e" +checksum = "877c5b330756d856ffcc4553ab34a5684481ade925ecc54bcd1bf02b1d0d4d52" dependencies = [ "async-stream", "async-trait", "axum", - "base64", + "base64 0.22.1", "bytes", "h2", "http", "http-body", + "http-body-util", "hyper", "hyper-timeout", + "hyper-util", "percent-encoding", "pin-project", "prost", + "socket2", "tokio", "tokio-stream", - "tower", + "tower 0.4.13", "tower-layer", "tower-service", "tracing", @@ -1651,17 +2343,31 @@ dependencies = [ "tracing", ] +[[package]] +name = "tower" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2873938d487c3cfb9aed7546dc9f2711d867c9f90c46b889989a2cb84eba6b4f" +dependencies = [ + "futures-core", + "futures-util", + "pin-project-lite", + "sync_wrapper 0.1.2", + "tower-layer", + "tower-service", +] + [[package]] name = "tower-layer" -version = "0.3.2" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c20c8dbed6283a09604c3e69b4b7eeb54e298b8a600d4d5ecb5ad39de609f1d0" +checksum = "121c2a6cda46980bb0fcd1647ffaf6cd3fc79a013de288782836f6df9c48780e" [[package]] name = "tower-service" -version = "0.3.2" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6bc1c9ce2b5135ac7f93c72918fc37feb872bdc6a5533a8b85eb4b86bfdae52" +checksum = "8df9b6e13f2d32c91b9bd719c00d1958837bc7dec474d94952798cc8e69eeec3" [[package]] name = "tracing" @@ -1682,7 +2388,7 @@ checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.57", + "syn 2.0.89", ] [[package]] @@ -1711,7 +2417,7 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ee855f1f400bd0e5c02d150ae5de3840039a3f54b025156404e34c23c03f47c3" dependencies = [ - "log 0.4.21", + "log 0.4.22", "once_cell", "tracing-core", ] @@ -1758,20 +2464,23 @@ version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b" +[[package]] +name = "typenum" +version = "1.17.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825" + [[package]] name = "unicase" -version = "2.7.0" +version = "2.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f7d2d4dafb69621809a81864c9c1b864479e1235c0dd4e199924b9742439ed89" -dependencies = [ - "version_check", -] +checksum = "7e51b68083f157f853b6379db119d1c1be0e6e4dec98101079dec41f6f5cf6df" [[package]] name = "unicode-ident" -version = "1.0.12" +version = "1.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" +checksum = "adb9e6ca4f869e1180728b7950e35922a7fc6397f7b641499e8f3ef06e50dc83" [[package]] name = "unicode-linebreak" @@ -1781,15 +2490,50 @@ checksum = "3b09c83c3c29d37506a3e260c08c03743a6bb66a9cd432c6934ab501a190571f" [[package]] name = "unicode-width" -version = "0.1.11" +version = "0.1.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7dd6e30e90baa6f72411720665d41d89b9a3d039dc45b8faea1ddd07f617f6af" + +[[package]] +name = "unicode-width" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1fc81956842c57dac11422a97c3b8195a1ff727f06e85c84ed2e8aa277c9a0fd" + +[[package]] +name = "untrusted" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" + +[[package]] +name = "url" +version = "2.5.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32f8b686cadd1473f4bd0117a5d28d36b1ade384ea9b5069a1c40aefed7fda60" +dependencies = [ + "form_urlencoded", + "idna", + "percent-encoding", +] + +[[package]] +name = "utf16_iter" +version = "1.0.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c8232dd3cdaed5356e0f716d285e4b40b932ac434100fe9b7e0e8e935b9e6246" + +[[package]] +name = "utf8_iter" +version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e51733f11c9c4f72aa0c160008246859e340b00807569a0da0e7a1079b27ba85" +checksum = "b6c140620e7ffbb22c2dee59cafe6084a59b5ffc27a8859a5f0d494b5d52b6be" [[package]] name = "utf8parse" -version = "0.2.1" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "711b9620af191e0cdc7468a8d14e709c3dcdb115b36f838e601583af800a370a" +checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821" [[package]] name = "valuable" @@ -1821,11 +2565,17 @@ dependencies = [ "valuable", ] +[[package]] +name = "vcpkg" +version = "0.2.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426" + [[package]] name = "version_check" -version = "0.9.4" +version = "0.9.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" +checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a" [[package]] name = "want" @@ -1842,6 +2592,83 @@ version = "0.11.0+wasi-snapshot-preview1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" +[[package]] +name = "wasm-bindgen" +version = "0.2.95" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "128d1e363af62632b8eb57219c8fd7877144af57558fb2ef0368d0087bddeb2e" +dependencies = [ + "cfg-if", + "once_cell", + "wasm-bindgen-macro", +] + +[[package]] +name = "wasm-bindgen-backend" +version = "0.2.95" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cb6dd4d3ca0ddffd1dd1c9c04f94b868c37ff5fac97c30b97cff2d74fce3a358" +dependencies = [ + "bumpalo", + "log 0.4.22", + "once_cell", + "proc-macro2", + "quote", + "syn 2.0.89", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-futures" +version = "0.4.45" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cc7ec4f8827a71586374db3e87abdb5a2bb3a15afed140221307c3ec06b1f63b" +dependencies = [ + "cfg-if", + "js-sys", + "wasm-bindgen", + "web-sys", +] + +[[package]] +name = "wasm-bindgen-macro" +version = "0.2.95" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e79384be7f8f5a9dd5d7167216f022090cf1f9ec128e6e6a482a2cb5c5422c56" +dependencies = [ + "quote", + "wasm-bindgen-macro-support", +] + +[[package]] +name = "wasm-bindgen-macro-support" +version = "0.2.95" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "26c6ab57572f7a24a4985830b120de1594465e5d500f24afe89e16b4e833ef68" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.89", + "wasm-bindgen-backend", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-shared" +version = "0.2.95" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "65fc09f10666a9f147042251e0dda9c18f166ff7de300607007e96bdebc1068d" + +[[package]] +name = "web-sys" +version = "0.3.72" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f6488b90108c040df0fe62fa815cbdee25124641df01814dd7282749234c6112" +dependencies = [ + "js-sys", + "wasm-bindgen", +] + [[package]] name = "winapi" version = "0.3.9" @@ -1866,31 +2693,77 @@ checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" [[package]] name = "windows" -version = "0.54.0" +version = "0.58.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9252e5725dbed82865af151df558e754e4a3c2c30818359eb17465f1346a1b49" +checksum = "dd04d41d93c4992d421894c18c8b43496aa748dd4c081bac0dc93eb0489272b6" dependencies = [ "windows-core", - "windows-targets 0.52.4", + "windows-targets 0.52.6", ] [[package]] name = "windows-core" -version = "0.54.0" +version = "0.58.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6ba6d44ec8c2591c134257ce647b7ea6b20335bf6379a27dac5f1641fcf59f99" +dependencies = [ + "windows-implement", + "windows-interface", + "windows-result", + "windows-strings", + "windows-targets 0.52.6", +] + +[[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.89", +] + +[[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.89", +] + +[[package]] +name = "windows-registry" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "12661b9c89351d684a50a8a643ce5f608e20243b9fb84687800163429f161d65" +checksum = "e400001bb720a623c1c69032f8e3e4cf09984deec740f007dd2b03ec864804b0" dependencies = [ "windows-result", - "windows-targets 0.52.4", + "windows-strings", + "windows-targets 0.52.6", ] [[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-strings" version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cd19df78e5168dfb0aedc343d1d1b8d422ab2db6756d2dc3fef75035402a3f64" +checksum = "4cd9b125c486025df0eabcb585e62173c6c9eddcec5d117d3b6e8c30e2ee4d10" dependencies = [ - "windows-targets 0.52.4", + "windows-result", + "windows-targets 0.52.6", ] [[package]] @@ -1908,7 +2781,16 @@ version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" dependencies = [ - "windows-targets 0.52.4", + "windows-targets 0.52.6", +] + +[[package]] +name = "windows-sys" +version = "0.59.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b" +dependencies = [ + "windows-targets 0.52.6", ] [[package]] @@ -1928,17 +2810,18 @@ dependencies = [ [[package]] name = "windows-targets" -version = "0.52.4" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7dd37b7e5ab9018759f893a1952c9420d060016fc19a472b4bb20d1bdd694d1b" +checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" dependencies = [ - "windows_aarch64_gnullvm 0.52.4", - "windows_aarch64_msvc 0.52.4", - "windows_i686_gnu 0.52.4", - "windows_i686_msvc 0.52.4", - "windows_x86_64_gnu 0.52.4", - "windows_x86_64_gnullvm 0.52.4", - "windows_x86_64_msvc 0.52.4", + "windows_aarch64_gnullvm 0.52.6", + "windows_aarch64_msvc 0.52.6", + "windows_i686_gnu 0.52.6", + "windows_i686_gnullvm", + "windows_i686_msvc 0.52.6", + "windows_x86_64_gnu 0.52.6", + "windows_x86_64_gnullvm 0.52.6", + "windows_x86_64_msvc 0.52.6", ] [[package]] @@ -1949,9 +2832,9 @@ checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" [[package]] name = "windows_aarch64_gnullvm" -version = "0.52.4" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bcf46cf4c365c6f2d1cc93ce535f2c8b244591df96ceee75d8e83deb70a9cac9" +checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" [[package]] name = "windows_aarch64_msvc" @@ -1961,9 +2844,9 @@ checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" [[package]] name = "windows_aarch64_msvc" -version = "0.52.4" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da9f259dd3bcf6990b55bffd094c4f7235817ba4ceebde8e6d11cd0c5633b675" +checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" [[package]] name = "windows_i686_gnu" @@ -1973,9 +2856,15 @@ checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" [[package]] name = "windows_i686_gnu" -version = "0.52.4" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" + +[[package]] +name = "windows_i686_gnullvm" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b474d8268f99e0995f25b9f095bc7434632601028cf86590aea5c8a5cb7801d3" +checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" [[package]] name = "windows_i686_msvc" @@ -1985,9 +2874,9 @@ checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" [[package]] name = "windows_i686_msvc" -version = "0.52.4" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1515e9a29e5bed743cb4415a9ecf5dfca648ce85ee42e15873c3cd8610ff8e02" +checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" [[package]] name = "windows_x86_64_gnu" @@ -1997,9 +2886,9 @@ checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" [[package]] name = "windows_x86_64_gnu" -version = "0.52.4" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5eee091590e89cc02ad514ffe3ead9eb6b660aedca2183455434b93546371a03" +checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" [[package]] name = "windows_x86_64_gnullvm" @@ -2009,9 +2898,9 @@ checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" [[package]] name = "windows_x86_64_gnullvm" -version = "0.52.4" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77ca79f2451b49fa9e2af39f0747fe999fcda4f5e241b2898624dca97a1f2177" +checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" [[package]] name = "windows_x86_64_msvc" @@ -2021,6 +2910,112 @@ checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" [[package]] name = "windows_x86_64_msvc" -version = "0.52.4" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" + +[[package]] +name = "write16" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d1890f4022759daae28ed4fe62859b1236caebfc61ede2f63ed4e695f3f6d936" + +[[package]] +name = "writeable" +version = "0.5.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e9df38ee2d2c3c5948ea468a8406ff0db0b29ae1ffde1bcf20ef305bcc95c51" + +[[package]] +name = "yoke" +version = "0.7.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "120e6aef9aa629e3d4f52dc8cc43a015c7724194c97dfaf45180d2daf2b77f40" +dependencies = [ + "serde", + "stable_deref_trait", + "yoke-derive", + "zerofrom", +] + +[[package]] +name = "yoke-derive" +version = "0.7.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2380878cad4ac9aac1e2435f3eb4020e8374b5f13c296cb75b4620ff8e229154" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.89", + "synstructure", +] + +[[package]] +name = "zerocopy" +version = "0.7.35" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1b9b4fd18abc82b8136838da5d50bae7bdea537c574d8dc1a34ed098d6c166f0" +dependencies = [ + "byteorder", + "zerocopy-derive", +] + +[[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.89", +] + +[[package]] +name = "zerofrom" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cff3ee08c995dee1859d998dea82f7374f2826091dd9cd47def953cae446cd2e" +dependencies = [ + "zerofrom-derive", +] + +[[package]] +name = "zerofrom-derive" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "595eed982f7d355beb85837f651fa22e90b3c044842dc7f2c2842c086f295808" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.89", + "synstructure", +] + +[[package]] +name = "zeroize" +version = "1.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ced3678a2879b30306d323f4542626697a464a97c0a07c9aebf7ebca65cd4dde" + +[[package]] +name = "zerovec" +version = "0.10.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aa2b893d79df23bfb12d5461018d408ea19dfafe76c2c7ef6d4eba614f8ff079" +dependencies = [ + "yoke", + "zerofrom", + "zerovec-derive", +] + +[[package]] +name = "zerovec-derive" +version = "0.10.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "32b752e52a2da0ddfbdbcc6fceadfeede4c939ed16d13e648833a61dfb611ed8" +checksum = "6eafa6dfb17584ea3e2bd6e76e0cc15ad7af12b09abdd1ca55961bed9b1063c6" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.89", +] diff --git a/Cargo.toml b/Cargo.toml index cc211c1..923f495 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -13,15 +13,14 @@ members = [ resolver = "2" [workspace.dependencies] -bytes = "^1.6.0" +bytes = "^1.8.0" fnv = "^1.0.7" -mac_address = "^1.1.5" +mac_address = "^1.1.7" miette = { version = "^7.2.0", features = ["fancy"] } -network-interface = "^1.1.2" -once_cell = "^1.19.0" -time = "^0.3.34" +network-interface = "^2.0.0" +time = "^0.3.36" tracing = { version = "^0.1.40", features = ["valuable"] } -tokio = { version = "^1.37.0", features = ["full", "tracing"] } +tokio = { version = "^1.41.1", features = ["full", "tracing"] } valuable = { version = "^0.1.0", features = ["derive"] } [workspace.package] @@ -29,7 +28,7 @@ authors = ["Cynthia "] edition = "2021" license = "MIT" repository = "https://github.com/rem-verse/sprig" -version = "0.0.6" +version = "0.0.7" [profile.release] codegen-units = 1 diff --git a/cmd/bridgectl/Cargo.toml b/cmd/bridgectl/Cargo.toml index f412039..7c15e1a 100644 --- a/cmd/bridgectl/Cargo.toml +++ b/cmd/bridgectl/Cargo.toml @@ -11,13 +11,12 @@ publish = false [dependencies] cat-dev = { path = "../../pkg/cat-dev" } -clap = { version = "^4.5.4", features = ["color", "derive", "env", "error-context", "help", "suggestions", "unicode", "usage", "wrap_help"] } +clap = { version = "^4.5.21", features = ["color", "derive", "env", "error-context", "help", "suggestions", "unicode", "usage", "wrap_help"] } fnv.workspace = true log = { path = "../../pkg/log" } mac_address.workspace = true miette.workspace = true -once_cell.workspace = true -terminal_size = "^0.3.0" +terminal_size = "^0.4.0" tokio.workspace = true tracing.workspace = true valuable.workspace = true diff --git a/cmd/bridgectl/src/commands/argv_helpers/bridge_target.rs b/cmd/bridgectl/src/commands/argv_helpers/bridge_target.rs index 5adbc46..4f45f68 100644 --- a/cmd/bridgectl/src/commands/argv_helpers/bridge_target.rs +++ b/cmd/bridgectl/src/commands/argv_helpers/bridge_target.rs @@ -447,76 +447,77 @@ async fn target_search_flags( target_flags: TargetBridgeFlags, positional_argument: Option<&str>, ) -> bool { - let (find_by, extra_ip_filter, extra_name_filter, used_arg) = - if target_flags.specified_bridge_search_flag() { - if target_flags.search_for_mac_raw().is_some() { - if let Some(mac) = target_flags.search_for_mac() { - ( - MIONFindBy::MacAddress(mac), - target_flags.search_for_ip(), - target_flags.search_for_name(), - false, - ) + let (find_by, extra_ip_filter, extra_name_filter, used_arg) = if target_flags + .specified_bridge_search_flag() + { + if target_flags.search_for_mac_raw().is_some() { + if let Some(mac) = target_flags.search_for_mac() { + ( + MIONFindBy::MacAddress(mac), + target_flags.search_for_ip(), + target_flags.search_for_name(), + false, + ) + } else { + if SHOULD_LOG_JSON() { + warn!( + id = "bridgectl::argv::mac_flag_invalid", + mac_flag = ?target_flags.search_for_mac_raw(), + "Mac Flag is not a valid MAC Address, will not be used, and will exit if no other filters present." + ); } else { - if SHOULD_LOG_JSON() { - warn!( - id = "bridgectl::argv::mac_flag_invalid", - mac_flag = ?target_flags.search_for_mac_raw(), - "Mac Flag is not a valid MAC Address, will not be used, and will exit if no other filters present." - ); - } else { - warn!( - mac_flag = ?target_flags.search_for_mac_raw(), - "Mac Flag is not a valid MAC Address, will not be used, and will exit if no other filters present." - ); - } + warn!( + mac_flag = ?target_flags.search_for_mac_raw(), + "Mac Flag is not a valid MAC Address, will not be used, and will exit if no other filters present." + ); + } - if target_flags.search_for_ip().is_none() - && target_flags.search_for_name().is_none() - { - std::process::exit(ARGV_NO_BRIDGE_SPECIFIED); - } else { - if let Some(ip) = target_flags.search_for_ip() { - let mut static_ip_opt = TARGETED_BRIDGE_IP.write().await; - _ = static_ip_opt.insert(ip); - } - if let Some(name) = target_flags.search_for_name() { - let mut static_name_opt = TARGETED_BRIDGE_NAME.write().await; - _ = static_name_opt.insert(name.to_owned()); - } - return false; + if target_flags.search_for_ip().is_none() + && target_flags.search_for_name().is_none() + { + std::process::exit(ARGV_NO_BRIDGE_SPECIFIED); + } else { + if let Some(ip) = target_flags.search_for_ip() { + let mut static_ip_opt = TARGETED_BRIDGE_IP.write().await; + _ = static_ip_opt.insert(ip); } + if let Some(name) = target_flags.search_for_name() { + let mut static_name_opt = TARGETED_BRIDGE_NAME.write().await; + _ = static_name_opt.insert(name.to_owned()); + } + return false; } - } else { - if let Some(ip) = target_flags.search_for_ip() { - let mut static_ip_opt = TARGETED_BRIDGE_IP.write().await; - _ = static_ip_opt.insert(ip); - } - if let Some(name) = target_flags.search_for_name() { - let mut static_name_opt = TARGETED_BRIDGE_NAME.write().await; - _ = static_name_opt.insert(name.to_owned()); - } - return false; } } else { - let argument = positional_argument.expect( - "internal_error: target_search_flags() called when no search flags were specified", - ); + if let Some(ip) = target_flags.search_for_ip() { + let mut static_ip_opt = TARGETED_BRIDGE_IP.write().await; + _ = static_ip_opt.insert(ip); + } + if let Some(name) = target_flags.search_for_name() { + let mut static_name_opt = TARGETED_BRIDGE_NAME.write().await; + _ = static_name_opt.insert(name.to_owned()); + } + return false; + } + } else { + let argument = positional_argument.expect( + "internal_error: target_search_flags() called when no search flags were specified", + ); - match MIONFindBy::from(argument.to_owned()) { - MIONFindBy::Ip(ip) => { - let mut static_ip_opt = TARGETED_BRIDGE_IP.write().await; - _ = static_ip_opt.insert(ip); - return true; - } - MIONFindBy::MacAddress(mac) => (MIONFindBy::MacAddress(mac), None, None, true), - MIONFindBy::Name(name) => { - let mut static_name_opt = TARGETED_BRIDGE_NAME.write().await; - _ = static_name_opt.insert(name); - return true; - } + match MIONFindBy::from(argument.to_owned()) { + MIONFindBy::Ip(ip) => { + let mut static_ip_opt = TARGETED_BRIDGE_IP.write().await; + _ = static_ip_opt.insert(ip); + return true; + } + MIONFindBy::MacAddress(mac) => (MIONFindBy::MacAddress(mac), None, None, true), + MIONFindBy::Name(name) => { + let mut static_name_opt = TARGETED_BRIDGE_NAME.write().await; + _ = static_name_opt.insert(name); + return true; } - }; + } + }; do_scan_initial(find_by, extra_ip_filter, extra_name_filter, used_arg).await } diff --git a/cmd/bridgectl/src/knobs/env.rs b/cmd/bridgectl/src/knobs/env.rs index 5a6abdb..9af62f7 100644 --- a/cmd/bridgectl/src/knobs/env.rs +++ b/cmd/bridgectl/src/knobs/env.rs @@ -1,10 +1,10 @@ //! The list of environment variables that influence behavior for `bridgectl`. -use once_cell::sync::Lazy; use std::{ env::{var as env_var, var_os as env_var_os}, net::Ipv4Addr, path::PathBuf, + sync::LazyLock, time::Duration, }; use tracing::warn; @@ -14,8 +14,9 @@ use tracing::warn; /// Environment Variable Name: `BRIDGECTL_OUTPUT_JSON` /// Expected Values: ("1" or "0"), and ("true" or "false") /// Type: Boolean -pub static USE_JSON_OUTPUT: Lazy = - Lazy::new(|| env_var("BRIDGECTL_OUTPUT_JSON").map_or(false, |var| var == "1" || var == "true")); +pub static USE_JSON_OUTPUT: LazyLock = LazyLock::new(|| { + env_var("BRIDGECTL_OUTPUT_JSON").map_or(false, |var| var == "1" || var == "true") +}); /// A way of specifying the path to the `bridge_env.ini` file if it's not in /// a standard location. @@ -23,8 +24,8 @@ pub static USE_JSON_OUTPUT: Lazy = /// Environment Variable Name: `BRIDGECTL_BRIDGE_ENV_PATH` /// Expected Values: A Path /// Type: [`PathBuf`] -pub static BRIDGE_HOST_STATE_PATH: Lazy> = - Lazy::new(|| env_var_os("BRIDGECTL_BRIDGE_ENV_PATH").map(PathBuf::from)); +pub static BRIDGE_HOST_STATE_PATH: LazyLock> = + LazyLock::new(|| env_var_os("BRIDGECTL_BRIDGE_ENV_PATH").map(PathBuf::from)); /// A way of specifying the serial port to read logs from so you don't have to /// pass it in over a CLI flag. @@ -32,8 +33,8 @@ pub static BRIDGE_HOST_STATE_PATH: Lazy> = /// Environment Variable Name: `BRIDGECTL_SERIAL_PORT` /// Expected Values: `COM1`/`COM2`/etc. on Windows, `/dev/tty` on Linux. /// Type: [`PathBuf`] -pub static BRIDGECTL_SERIAL_PORT: Lazy> = - Lazy::new(|| env_var_os("BRIDGECTL_SERIAL_PORT").map(PathBuf::from)); +pub static BRIDGECTL_SERIAL_PORT: LazyLock> = + LazyLock::new(|| env_var_os("BRIDGECTL_SERIAL_PORT").map(PathBuf::from)); /// Set by `cafe`/`cafex`/`mochiato`, a way of specifying the bridge to /// connect too. @@ -41,8 +42,8 @@ pub static BRIDGECTL_SERIAL_PORT: Lazy> = /// Environment Variable Name: `BRIDGE_CURRENT_NAME` /// Expected Values: Empty, or a String of a valid bridge name. /// Type: String -pub static BRIDGE_CURRENT_NAME: Lazy> = - Lazy::new(|| env_var("BRIDGE_CURRENT_NAME").ok()); +pub static BRIDGE_CURRENT_NAME: LazyLock> = + LazyLock::new(|| env_var("BRIDGE_CURRENT_NAME").ok()); /// Set by `cafe`/`cafex`/`mochiato`, a way of specifying the bridge to /// connect too. @@ -50,7 +51,7 @@ pub static BRIDGE_CURRENT_NAME: Lazy> = /// Environment Variable Name: `BRIDGE_CURRENT_IP_ADDRESS` /// Expected Values: Empty, or a String of a valid bridge ip address. /// Type: [`Ipv4Addr`] -pub static BRIDGE_CURRENT_IP_ADDRESS: Lazy> = Lazy::new(|| { +pub static BRIDGE_CURRENT_IP_ADDRESS: LazyLock> = LazyLock::new(|| { env_var("BRIDGE_CURRENT_IP_ADDRESS").ok().and_then(|val| { match val.parse::() { Ok(val) => Some(val), @@ -68,7 +69,7 @@ pub static BRIDGE_CURRENT_IP_ADDRESS: Lazy> = Lazy::new(|| { /// Environment Variable Name: `BRIDGE_SCAN_TIMEOUT_SECONDS` /// Expected Values: Empty, or a number of seconds. /// Type: [`u64`] -pub static BRIDGE_SCAN_TIMEOUT: Lazy> = Lazy::new(|| { +pub static BRIDGE_SCAN_TIMEOUT: LazyLock> = LazyLock::new(|| { env_var("BRIDGE_SCAN_TIMEOUT_SECONDS").ok().and_then(|val| { match val.parse::() { Ok(val) => Some(Duration::from_secs(val)), @@ -91,7 +92,7 @@ pub static BRIDGE_SCAN_TIMEOUT: Lazy> = Lazy::new(|| { /// Environment Variable Name: `BRIDGE_CONTROL_PORT_OVERRIDE` /// Expected Values: Empty, or a port number (0-65536). /// Type: [`u16`] -pub static BRIDGE_CONTROL_PORT: Lazy> = Lazy::new(|| { +pub static BRIDGE_CONTROL_PORT: LazyLock> = LazyLock::new(|| { env_var("BRIDGE_CONTROL_PORT_OVERRIDE").ok().and_then(|val| { match val.parse::() { Ok(val) => Some(val), diff --git a/pkg/cat-dev/Cargo.toml b/pkg/cat-dev/Cargo.toml index b627ed8..ae23e20 100644 --- a/pkg/cat-dev/Cargo.toml +++ b/pkg/cat-dev/Cargo.toml @@ -8,20 +8,22 @@ repository.workspace = true version.workspace = true [dependencies] +aes = "^0.8.4" bytes.workspace = true -configparser = "^3.0.4" -# Keep us equal with tonic, which is pulled in through tokio console in `log`. -hyper = { version = "^0.14.28", features = ["http1", "client", "runtime", "stream"] } +cipher = { version = "^0.4.4", features = ["alloc", "block-padding"] } +configparser = "^3.1.0" +ecb = "^0.1.2" fnv.workspace = true -futures = "^0.3.30" -local-ip-address = "^0.6.1" +futures = "^0.3.31" +local-ip-address = "^0.6.3" mac_address.workspace = true miette.workspace = true network-interface.workspace = true -pin-project-lite = "^0.2.14" -serde = "^1.0.197" +pin-project-lite = "^0.2.15" +reqwest = "^0.12.9" +serde = "^1.0.214" serde_urlencoded = "^0.7.1" -thiserror = "^1.0.58" +thiserror = "^2.0.3" tracing.workspace = true tokio.workspace = true valuable.workspace = true @@ -30,11 +32,10 @@ valuable.workspace = true libc = "^0.2" [target.'cfg(target_os = "windows")'.dependencies] -windows = { version = "^0.54.0", default-features = false, features=["Win32_Devices_Communication", "Win32_Networking_WinSock", "Win32_Security", "Win32_Storage_FileSystem", "Win32_System_IO", "Win32_System_Registry", "Win32_System_Threading"] } +windows = { version = "^0.58.0", default-features = false, features=["Win32_Devices_Communication", "Win32_Networking_WinSock", "Win32_Security", "Win32_Storage_FileSystem", "Win32_System_IO", "Win32_System_Registry", "Win32_System_Threading"] } [dev-dependencies] -once_cell.workspace = true -tempfile = "^3.10.1" +tempfile = "^3.14.0" [package.metadata.docs.rs] rustc-args = ["--cfg", "tokio_unstable", "--cfg", "tracing_unstable"] diff --git a/pkg/cat-dev/src/errors.rs b/pkg/cat-dev/src/errors.rs index e1ae66b..0b82c04 100644 --- a/pkg/cat-dev/src/errors.rs +++ b/pkg/cat-dev/src/errors.rs @@ -5,9 +5,9 @@ //! specific item. use bytes::Bytes; -use hyper::{http::Error as HttpError, Error as HyperError}; use local_ip_address::Error as LocalIpAddressError; use miette::Diagnostic; +use reqwest::Error as ReqwestError; use serde_urlencoded::ser::Error as SerdeUrlEncodeError; use std::string::FromUtf8Error; use thiserror::Error; @@ -67,6 +67,20 @@ pub enum CatBridgeError { /// modules. #[derive(Error, Diagnostic, Debug, PartialEq, Eq)] pub enum APIError { + /// You attempted to encrypt data that we could not encrypt. + #[error("We could not encrypt your data, because it was not padded to the correct length, expected a block size of: {0}")] + #[diagnostic(code(cat_dev::api::bad_decrypted_data_length))] + BadDecryptedDataLength(usize), + /// You attempted to decrypt data that we could not decrypt. + #[error("We could not decrypt your data, because it was not padded to the correct length, expected a block size of: {0}")] + #[diagnostic(code(cat_dev::api::bad_encrypted_data_length))] + BadEncryptedDataLength(usize), + /// The MION Firmware files end with a final byte that acts as a checksum + /// to validate the content before it was correct. Your checksum was not + /// correct. + #[error("The MION Firmware file you provided had an invalid checksum, we expected: {1:02x}, but got: {0:02x}")] + #[diagnostic(code(cat_dev::api::mion_fw::bad_checksum))] + BadMionFWChecksum(u8, u8), /// You attempted to set the default host bridge to a bridge that does not exist. #[error("You cannot set a default bridge that does not exist.")] #[diagnostic(code(cat_dev::api::default_device_must_exist))] @@ -93,6 +107,27 @@ pub enum APIError { #[error("A Device Name can only be 255 bytes long, but you specified one: {0} bytes long.")] #[diagnostic(code(cat_dev::api::name_too_long))] DeviceNameTooLong(usize), + /// All MION Firmware files must be at a minimum 0x26 bytes long. + /// + /// This covers a single AES-256 block (32 bytes), plus the 6 byte footer + /// that they contain. + #[error("The MION Firmware file provided was too small, it must be at least 0x26 bytes long, was {0:02x}")] + #[diagnostic(code(cat_dev::api::mion_fw::too_small))] + MionFirmwareTooSmall(usize), + /// The MION Firmware version string must end with a `0x00`, as this is a + /// load-bearing NUL terminator for many parts of the firmware. + #[error("The Version String for MION Firmware Files Typed 'MION', must have their version bytes end with a NUL terminator (0x00) due to an oversight in programming. Your file ended with: ({0:02x})")] + #[diagnostic(code(cat_dev::api::mion_fw::missing_nul_terminator))] + MionFirmwareMissingNULTerminator(u8), + /// All MION FW files must end with: + /// + /// - `PWI-SS_FW_IMAGE` for IPL/MION firmware types + /// - `PWI-SS_FP_IMAGE` for FPGA firmware types. + /// + /// If they do not, they are immediately considered invalid. + #[error("While validating the decrypted contents of your FW we were not able to identify the required ending bytes, this firmware is corrupt.")] + #[diagnostic(code(cat_dev::api::mion_fw::missing_signature))] + MionFirmwareMissingSignature, /// You tried asking for a parameter of a specific name, but we could not /// find a parameter with the name you specified. /// @@ -116,6 +151,9 @@ pub enum APIError { #[error("The MION Parameter body you passed in was: {0} bytes long, but must be exactly 512 bytes long!")] #[diagnostic(code(cat_dev::api::parameter::body_incorrect_length))] MIONParameterBodyNotCorrectLength(usize), + /// There are a series of operations you can call on `control.cgi`, + /// unfortunately the one specified is not an operation we know on + /// any firmware version. #[error("Unknown operation for `control.cgi`: [{0}]")] #[diagnostic(code(cat_dev::api::control::unknown_operation))] UnknownControlOperation(String), @@ -137,7 +175,8 @@ pub enum FSError { #[error("Data read from the filesystem was expected to be UTF-8, but was not: {0}")] #[diagnostic(code(cat_dev::fs::utf8_expected))] InvalidDataNeedsUTF8(#[from] FromUtf8Error), - /// We expected to parse file as an INI data. + /// We expected to parse file as an INI data, but it did not contain valid + /// INI data. #[error("Data read from the filesystem was expected to be a valid INI file: {0}")] #[diagnostic(code(cat_dev::fs::expected_ini))] InvalidDataNeedsToBeINI(String), @@ -173,9 +212,6 @@ pub enum NetworkError { #[diagnostic(transparent)] ParseError(#[from] NetworkParseError), /// See [`tokio::io::Error`] for details. - /// - /// We just end up formatting this to a string so we can continue to derive - /// [`PartialEq`], and [`Eq`]. #[error("Error talking to the network could not send/receive data: {0}")] #[diagnostic(code(cat_dev::net::native_failure))] IOError(#[from] IoError), @@ -189,19 +225,19 @@ pub enum NetworkError { #[error("Failed to set the socket we're bound on as a broadcast address, this is needed to discover CAT devices.")] #[diagnostic(code(cat_dev::net::set_broadcast_failure))] SetBroadcastFailure, + /// We waited too long to send/receive data from the network. + /// + /// There may be something wrong with our network connection, or the targets + /// network connection. #[error( "Timed out while writing/reading data from the network, failed to send and receive data." )] #[diagnostic(code(cat_dev::net::timeout))] TimeoutError, - /// See [`hyper::http::Error`] for details. - #[error("Underlying HTTP error: {0}")] - #[diagnostic(code(cat_dev::net::proto::http_failure))] - HttpError(#[from] HttpError), - /// See [`hyper::Error`] for details. + /// See [`reqwest::Error`] for details. #[error("Underlying HTTP client error: {0}")] #[diagnostic(code(cat_dev::net::http_failure))] - HyperError(#[from] HyperError), + ReqwestError(#[from] ReqwestError), /// See [`local_ip_address::Error`] for details. #[error("Failure fetching local ip address: {0}")] #[diagnostic(code(cat_dev::net::local_ip_failure))] @@ -231,6 +267,8 @@ pub enum NetworkParseError { #[error("Tried to read Packet of type ({0}) from network needs at least {1} bytes, but only got {2} bytes: {3:02x?}")] #[diagnostic(code(cat_dev::net::parse::not_enough_data))] NotEnoughData(&'static str, usize, usize, Bytes), + /// We expected to read a packet containing exactly a set of bytes, + /// unfortunatley it did not contain those _Exact_ bytes. #[error("Tried to read Packet of type ({0}) from network, must be encoded exactly as [{1:02x?}], but got [{2:02x?}]")] #[diagnostic(code(cat_dev::net::parse::packet_doesnt_match_static_data))] PacketDoesntMatchStaticPayload(&'static str, &'static [u8], Bytes), @@ -243,10 +281,15 @@ pub enum NetworkParseError { #[error("Unknown Code aka Packet Type: `{0}` received from the network (this may mean your CAT-DEV is doing something we didn't expect)")] #[diagnostic(code(cat_dev::net::parse::unknown_packet_type))] UnknownCommand(u8), - /// Unknown packet tpe for the MION Params port. + /// Unknown packet type for the MION Params port. #[error("Unknown Packet Type: `{0}` received from the network (this may mean your CAT-DEV is doing something we didn't expect)")] #[diagnostic(code(cat_dev::net::parse::params::unknown_packet_type))] UnknownParamsPacketType(i32), + /// We got an error code back from trying to interact with the MION + /// paramspace port. + /// + /// We unfortunately do not have these error codes known at this point in + /// time. #[error("Error code received from MION Params: `{0}`")] #[diagnostic(code(cat_dev::net::parse::params::error_code))] ParamsPacketErrorCode(i32), @@ -254,22 +297,32 @@ pub enum NetworkParseError { #[error("Failed to encode data as form data: {0}")] #[diagnostic(code(cat_dev::net::parse::http::encode::form_data_error))] FormDataEncodeError(#[from] SerdeUrlEncodeError), - /// We got an unexpected status code from the CAT-DEV. + /// We got an unexpected status code from the CAT-DEV, this is only used when + /// we did not get an HTTP body back from the CAT-DEV as well. #[error("Got an unexpected status code that wasn't successful over HTTP: {0}")] #[diagnostic(code(cat_dev::net::parse::http::bad_status_code_without_body))] UnexpectedStatusCodeNoBody(u16), + /// We got an unexpected status code from the CAT-DEV, it also came with an + /// HTTP body that may contain clues to it's error. #[error("Got an unexpected status code that wasn't successful over HTTP: {0}, Body: {1:02x?}")] UnexpectedStatusCode(u16, Bytes), /// We expected to read UTF-8 data from the network, but it wasn't UTF-8. #[error("Data read from the network was expected to be UTF-8, but was not: {0}")] #[diagnostic(code(cat_dev::net::parse::utf8_expected))] InvalidDataNeedsUTF8(#[from] FromUtf8Error), + /// We could not find the `` tags in a page that is supposed to return + /// HTML. #[error("Could not parse HTML response could not find one of the body tags: ``, or ``: {0}")] #[diagnostic(code(cat_dev::net::parse::html::no_body_tag))] HtmlResponseMissingBody(String), #[error("Could not find Memory Dump Table Body, failed to find sigils: {0}")] #[diagnostic(code(cat_dev::net::parse::html::no_mem_dump_sigil))] HtmlResponseMissingMemoryDumpSigil(String), + /// The HTML response we got was expected to contain hexadecimal bytes. + /// + /// We could not parse one of these hexadecimal bytes. Either the device + /// responded with an error we didn't properly pick up on, or we got corrupt + /// data somehow., #[error("Could not parse byte from memory dump: {0}")] #[diagnostic(code(cat_dev::net::parse::html::bad_memory_byte))] HtmlResponseBadByte(String), diff --git a/pkg/cat-dev/src/mion/cgis/control.rs b/pkg/cat-dev/src/mion/cgis/control.rs index 7165b20..9ddf77a 100644 --- a/pkg/cat-dev/src/mion/cgis/control.rs +++ b/pkg/cat-dev/src/mion/cgis/control.rs @@ -9,12 +9,8 @@ use crate::{ }, }; use fnv::FnvHashMap; -use hyper::{ - body::to_bytes as read_http_body_bytes, - client::{connect::Connect, Client}, - Body, Request, Response, Version, -}; use local_ip_address::local_ip; +use reqwest::{Client, Response, Version}; use serde::Serialize; use std::net::Ipv4Addr; use tracing::{field::valuable, warn}; @@ -44,14 +40,11 @@ pub async fn get_info( /// - If the server does not respond with a 200. /// - If we cannot read the body from HTTP. /// - If we cannot parse the HTML response. -pub async fn get_info_with_raw_client( - client: &Client, +pub async fn get_info_with_raw_client( + client: &Client, mion_ip: Ipv4Addr, name: &str, -) -> Result, CatBridgeError> -where - ClientConnectorTy: Clone + Connect + Send + Sync + 'static, -{ +) -> Result, CatBridgeError> { let response = do_raw_control_request( client, mion_ip, @@ -67,9 +60,7 @@ where ) .await?; let status = response.status().as_u16(); - let body_result = read_http_body_bytes(response.into_body()) - .await - .map_err(NetworkError::HyperError); + let body_result = response.bytes().await.map_err(NetworkError::ReqwestError); if status != 200 { if let Ok(body) = body_result { return Err(CatBridgeError::NetworkError(NetworkError::ParseError( @@ -114,14 +105,11 @@ pub async fn set_param( /// - If the server does not respond with a 200. /// - If we cannot read the body from HTTP. /// - If we cannot parse the HTML response. -pub async fn set_param_with_raw_client( - client: &Client, +pub async fn set_param_with_raw_client( + client: &Client, mion_ip: Ipv4Addr, parameter_to_set: SetParameter, -) -> Result -where - ClientConnectorTy: Clone + Connect + Send + Sync + 'static, -{ +) -> Result { let response = do_raw_control_request( client, mion_ip, @@ -138,9 +126,7 @@ where ) .await?; let status = response.status().as_u16(); - let body_result = read_http_body_bytes(response.into_body()) - .await - .map_err(NetworkError::HyperError); + let body_result = response.bytes().await.map_err(NetworkError::ReqwestError); if status != 200 { if let Ok(body) = body_result { return Err(CatBridgeError::NetworkError(NetworkError::ParseError( @@ -219,16 +205,13 @@ pub async fn power_on_v2( /// - If the server does not respond with a 200. /// - If we cannot read the body from HTTP. /// - If we cannot parse the HTML response. -pub async fn power_on_v2_with_raw_client( - client: &Client, +pub async fn power_on_v2_with_raw_client( + client: &Client, mion_ip: Ipv4Addr, atapi_port: Option, pcfs_port: Option, emulate_fs: bool, -) -> Result -where - ClientConnectorTy: Clone + Connect + Send + Sync + 'static, -{ +) -> Result { let mut parameters = vec![ ( "operation", @@ -257,9 +240,7 @@ where let response = do_raw_control_request(client, mion_ip, ¶meters).await?; let status = response.status().as_u16(); - let body_result = read_http_body_bytes(response.into_body()) - .await - .map_err(NetworkError::HyperError); + let body_result = response.bytes().await.map_err(NetworkError::ReqwestError); if status != 200 { if let Ok(body) = body_result { return Err(CatBridgeError::NetworkError(NetworkError::ParseError( @@ -292,31 +273,28 @@ where /// /// - If we cannot make an HTTP request to the MION Request. /// - If we fail to encode your parameters into a request body. -pub async fn do_raw_control_request<'key, 'value, ClientConnectorTy, UrlEncodableType>( - client: &Client, +pub async fn do_raw_control_request<'key, 'value, UrlEncodableType>( + client: &Client, mion_ip: Ipv4Addr, url_parameters: UrlEncodableType, -) -> Result, NetworkError> +) -> Result where - ClientConnectorTy: Clone + Connect + Send + Sync + 'static, UrlEncodableType: Serialize, { Ok(client - .request( - Request::post(format!("http://{mion_ip}/mion/control.cgi")) - .version(Version::HTTP_11) - .header("authorization", format!("Basic {AUTHZ_HEADER}")) - .header("content-type", "application/x-www-form-urlencoded") - .header( - "user-agent", - format!("cat-dev/{}", env!("CARGO_PKG_VERSION")), - ) - .body( - serde_urlencoded::to_string(&url_parameters) - .map_err(NetworkParseError::FormDataEncodeError)? - .into(), - )?, + .post(format!("http://{mion_ip}/mion/control.cgi")) + .version(Version::HTTP_11) + .header("authorization", format!("Basic {AUTHZ_HEADER}")) + .header("content-type", "application/x-www-form-urlencoded") + .header( + "user-agent", + format!("cat-dev/{}", env!("CARGO_PKG_VERSION")), + ) + .body::( + serde_urlencoded::to_string(&url_parameters) + .map_err(NetworkParseError::FormDataEncodeError)?, ) + .send() .await?) } diff --git a/pkg/cat-dev/src/mion/cgis/dump_eeprom.rs b/pkg/cat-dev/src/mion/cgis/dump_eeprom.rs index 8c30723..d7501a7 100644 --- a/pkg/cat-dev/src/mion/cgis/dump_eeprom.rs +++ b/pkg/cat-dev/src/mion/cgis/dump_eeprom.rs @@ -6,11 +6,7 @@ use crate::{ mion::cgis::AUTHZ_HEADER, }; use bytes::{BufMut, Bytes, BytesMut}; -use hyper::{ - body::to_bytes as read_http_body_bytes, - client::{connect::Connect, Client}, - Body, Request, Response, Version, -}; +use reqwest::{Client, Response, Version}; use serde::Serialize; use std::net::Ipv4Addr; use tracing::debug; @@ -41,13 +37,10 @@ pub async fn dump_eeprom(mion_ip: Ipv4Addr) -> Result { /// - If the server does not respond with a 200. /// - If we cannot read the body from HTTP. /// - If we cannot parse the HTML response. -pub async fn dump_eeprom_with_raw_client( - client: &Client, +pub async fn dump_eeprom_with_raw_client( + client: &Client, mion_ip: Ipv4Addr, -) -> Result -where - ClientConnectorTy: Clone + Connect + Send + Sync + 'static, -{ +) -> Result { let mut memory_buffer = BytesMut::with_capacity(0x2000); while memory_buffer.len() <= EEPROM_MAX_ADDRESS { @@ -65,9 +58,7 @@ where .await?; let status = response.status().as_u16(); - let body_result = read_http_body_bytes(response.into_body()) - .await - .map_err(NetworkError::HyperError); + let body_result = response.bytes().await.map_err(NetworkError::ReqwestError); if status != 200 { if let Ok(body) = body_result { return Err(CatBridgeError::NetworkError(NetworkError::ParseError( @@ -141,30 +132,27 @@ fn extract_memory_table_body(body: &str) -> Result { /// /// - If we cannot make an HTTP request to the MION Request. /// - If we fail to encode your parameters into a request body. -pub async fn do_raw_eeprom_request<'key, 'value, ClientConnectorTy, UrlEncodableType>( - client: &Client, +pub async fn do_raw_eeprom_request<'key, 'value, UrlEncodableType>( + client: &Client, mion_ip: Ipv4Addr, url_parameters: UrlEncodableType, -) -> Result, NetworkError> +) -> Result where - ClientConnectorTy: Clone + Connect + Send + Sync + 'static, UrlEncodableType: Serialize, { Ok(client - .request( - Request::post(format!("http://{mion_ip}/dbg/eeprom_dump.cgi")) - .version(Version::HTTP_11) - .header("authorization", format!("Basic {AUTHZ_HEADER}")) - .header("content-type", "application/x-www-form-urlencoded") - .header( - "user-agent", - format!("cat-dev/{}", env!("CARGO_PKG_VERSION")), - ) - .body( - serde_urlencoded::to_string(&url_parameters) - .map_err(NetworkParseError::FormDataEncodeError)? - .into(), - )?, + .post(format!("http://{mion_ip}/dbg/eeprom_dump.cgi")) + .version(Version::HTTP_11) + .header("authorization", format!("Basic {AUTHZ_HEADER}")) + .header("content-type", "application/x-www-form-urlencoded") + .header( + "user-agent", + format!("cat-dev/{}", env!("CARGO_PKG_VERSION")), + ) + .body::( + serde_urlencoded::to_string(&url_parameters) + .map_err(NetworkParseError::FormDataEncodeError)?, ) + .send() .await?) } diff --git a/pkg/cat-dev/src/mion/cgis/dump_memory.rs b/pkg/cat-dev/src/mion/cgis/dump_memory.rs index b434257..828e39b 100644 --- a/pkg/cat-dev/src/mion/cgis/dump_memory.rs +++ b/pkg/cat-dev/src/mion/cgis/dump_memory.rs @@ -12,11 +12,7 @@ use crate::{ use bytes::{Bytes, BytesMut}; use fnv::FnvHashMap; use futures::{future::Either, StreamExt}; -use hyper::{ - body::to_bytes as read_http_body_bytes, - client::{connect::Connect, Client}, - Body, Request, Response, Version, -}; +use reqwest::{Client, Response, Version}; use serde::Serialize; use std::{ net::Ipv4Addr, @@ -90,14 +86,13 @@ where /// - If the server does not respond with a 200. /// - If we cannot read the body from HTTP. /// - If we cannot parse the HTML response. -pub async fn dump_memory_with_raw_client( - client: &Client, +pub async fn dump_memory_with_raw_client( + client: &Client, mion_ip: Ipv4Addr, resume_at: Option, buff_callback: FnTy, ) -> Result<(), CatBridgeError> where - ClientConnectorTy: Clone + Connect + Send + Sync + 'static, FnTy: FnMut(Vec) + Send + Sync, { let (stop_requests_sender, mut stop_requests_consumer) = bounded_channel(1); @@ -209,16 +204,13 @@ async fn do_memory_page_ordering( } } -async fn do_memory_page_fetch( - client: &Client, +async fn do_memory_page_fetch( + client: &Client, mion_ip: Ipv4Addr, page_start: usize, retry_counter: &AtomicU8, result_stream: &BoundedSender), CatBridgeError>>, -) -> bool -where - ClientConnectorTy: Clone + Connect + Send + Sync + 'static, -{ +) -> bool { let start_addr = format!("{page_start:08X}"); debug!( bridge.ip = %mion_ip, @@ -259,7 +251,7 @@ where let status = response.status().as_u16(); let timeout_body_result = timeout( Duration::from_secs(MEMORY_TIMEOUT_SECONDS), - read_http_body_bytes(response.into_body()), + response.bytes(), ) .await; let Ok(body_result) = timeout_body_result else { @@ -292,7 +284,7 @@ where .await; return false; } - let read_body_bytes = match body_result.map_err(NetworkError::HyperError) { + let read_body_bytes = match body_result.map_err(NetworkError::ReqwestError) { Ok(value) => value, Err(cause) => { _ = result_stream.send(Err(cause.into())).await; @@ -390,30 +382,27 @@ fn extract_memory_table_body(body: &str) -> Result { /// /// - If we cannot make an HTTP request to the MION Request. /// - If we fail to encode your parameters into a request body. -pub async fn do_raw_memory_request<'key, 'value, ClientConnectorTy, UrlEncodableType>( - client: &Client, +pub async fn do_raw_memory_request<'key, 'value, UrlEncodableType>( + client: &Client, mion_ip: Ipv4Addr, url_parameters: UrlEncodableType, -) -> Result, NetworkError> +) -> Result where - ClientConnectorTy: Clone + Connect + Send + Sync + 'static, UrlEncodableType: Serialize, { Ok(client - .request( - Request::post(format!("http://{mion_ip}/dbg/mem_dump.cgi")) - .version(Version::HTTP_11) - .header("authorization", format!("Basic {AUTHZ_HEADER}")) - .header("content-type", "application/x-www-form-urlencoded") - .header( - "user-agent", - format!("cat-dev/{}", env!("CARGO_PKG_VERSION")), - ) - .body( - serde_urlencoded::to_string(&url_parameters) - .map_err(NetworkParseError::FormDataEncodeError)? - .into(), - )?, + .post(format!("http://{mion_ip}/dbg/mem_dump.cgi")) + .version(Version::HTTP_11) + .header("authorization", format!("Basic {AUTHZ_HEADER}")) + .header("content-type", "application/x-www-form-urlencoded") + .header( + "user-agent", + format!("cat-dev/{}", env!("CARGO_PKG_VERSION")), + ) + .body::( + serde_urlencoded::to_string(&url_parameters) + .map_err(NetworkParseError::FormDataEncodeError)?, ) + .send() .await?) } diff --git a/pkg/cat-dev/src/mion/cgis/signal_get.rs b/pkg/cat-dev/src/mion/cgis/signal_get.rs index 985b1d2..5740431 100644 --- a/pkg/cat-dev/src/mion/cgis/signal_get.rs +++ b/pkg/cat-dev/src/mion/cgis/signal_get.rs @@ -5,11 +5,7 @@ use crate::{ errors::{CatBridgeError, NetworkError, NetworkParseError}, mion::cgis::AUTHZ_HEADER, }; -use hyper::{ - body::to_bytes as read_http_body_bytes, - client::{connect::Connect, Client}, - Body, Request, Response, Version, -}; +use reqwest::{Client, Response, Version}; use serde::Serialize; use std::net::Ipv4Addr; @@ -35,18 +31,13 @@ pub async fn get_vdd2(mion_ip: Ipv4Addr) -> Result { /// - If the server does not respond with a 200. /// - If we cannot read the body from HTTP. /// - If we cannot parse the HTML response. -pub async fn get_vdd2_with_raw_client( - client: &Client, +pub async fn get_vdd2_with_raw_client( + client: &Client, mion_ip: Ipv4Addr, -) -> Result -where - ClientConnectorTy: Clone + Connect + Send + Sync + 'static, -{ +) -> Result { let response = do_raw_signal_http_request(client, mion_ip, &[("sig", "VDD2")]).await?; let status = response.status().as_u16(); - let body_result = read_http_body_bytes(response.into_body()) - .await - .map_err(NetworkError::HyperError); + let body_result = response.bytes().await.map_err(NetworkError::ReqwestError); if status != 200 { if let Ok(body) = body_result { return Err(CatBridgeError::NetworkError(NetworkError::ParseError( @@ -94,30 +85,27 @@ where /// /// - If we cannot make an HTTP request to the MION Request. /// - If we fail to encode your parameters into a request body. -pub async fn do_raw_signal_http_request<'key, 'value, ClientConnectorTy, UrlEncodableType>( - client: &Client, +pub async fn do_raw_signal_http_request<'key, 'value, UrlEncodableType>( + client: &Client, mion_ip: Ipv4Addr, url_parameters: UrlEncodableType, -) -> Result, NetworkError> +) -> Result where - ClientConnectorTy: Clone + Connect + Send + Sync + 'static, UrlEncodableType: Serialize, { Ok(client - .request( - Request::post(format!("http://{mion_ip}/signal_get.cgi")) - .version(Version::HTTP_11) - .header("authorization", format!("Basic {AUTHZ_HEADER}")) - .header("content-type", "application/x-www-form-urlencoded") - .header( - "user-agent", - format!("cat-dev/{}", env!("CARGO_PKG_VERSION")), - ) - .body( - serde_urlencoded::to_string(&url_parameters) - .map_err(NetworkParseError::FormDataEncodeError)? - .into(), - )?, + .post(format!("http://{mion_ip}/signal_get.cgi")) + .version(Version::HTTP_11) + .header("authorization", format!("Basic {AUTHZ_HEADER}")) + .header("content-type", "application/x-www-form-urlencoded") + .header( + "user-agent", + format!("cat-dev/{}", env!("CARGO_PKG_VERSION")), + ) + .body::( + serde_urlencoded::to_string(&url_parameters) + .map_err(NetworkParseError::FormDataEncodeError)?, ) + .send() .await?) } diff --git a/pkg/cat-dev/src/mion/firmware.rs b/pkg/cat-dev/src/mion/firmware.rs new file mode 100644 index 0000000..c56fcb4 --- /dev/null +++ b/pkg/cat-dev/src/mion/firmware.rs @@ -0,0 +1,437 @@ +//! APIs for interacting with MION Firmware Files. + +use crate::errors::APIError; +use aes::{cipher::KeyInit, Aes256}; +use cipher::{block_padding::NoPadding, BlockDecryptMut, BlockEncryptMut, BlockSizeUser}; +use ecb::{Decryptor, Encryptor}; +use std::fmt::{Display, Formatter, Result as FmtResult}; + +type Aes256EcbEnc = Encryptor; +type Aes256EcbDec = Decryptor; + +/// The derived AES key used for firmware encryption/decryption. +const STOCK_FW_KEY: [u8; 32] = [ + 0xA9, 0xFE, 0x4F, 0x78, 0x26, 0x3A, 0xE0, 0xE0, 0xC8, 0xFF, 0x39, 0x95, 0xE4, 0x43, 0x1F, 0x74, + 0x87, 0x9D, 0x1C, 0x67, 0x04, 0x29, 0xBC, 0x79, 0xA5, 0xE3, 0x35, 0x47, 0x8A, 0x60, 0x3B, 0x22, +]; + +/// The MION actually contains multiple types of firmware, this enum encodes +/// those types. +#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)] +pub enum MIONFirmwareType { + /// The MION has an FPGA array, these firmware files target those. + Fpga, + /// The MION has an IPL chip similar to the gamecube, these firmware files + /// target that chip. + Ipl, + /// The root firmware for the main MION board. + Mion, +} +impl Display for MIONFirmwareType { + fn fmt(&self, fmt: &mut Formatter<'_>) -> FmtResult { + match *self { + Self::Fpga => write!(fmt, "fpga"), + Self::Ipl => write!(fmt, "ipl"), + Self::Mion => write!(fmt, "fw"), + } + } +} + +/// A MION Firmware File. +/// +/// The MION itself has 3 types of firmware: +/// +/// - "fpga.${version}.bin" aka [`MIONFirmwareType::Fpga`] +/// - "fw.${version}.bin" aka [`MIONFirmwareType::Ipl`] +/// - "ipl.${version}.bin" aka [`MIONFirmwareType::Mion`] +/// +/// Each of these are used for separate part of firmware, but all follow the +/// same format. An encrypted blob, followed by a 4 byte version string, +/// followed by a checksum. +#[derive(Clone, Debug, PartialEq, Eq)] +pub struct MIONFirmwareFile { + /// The actual firmware contents, this is *decrypted* when represented in + /// memory here. + data: Vec, + /// The type of firmware this is. + fw_type: MIONFirmwareType, + /// The 4 bytes that represent versions. + /// + /// Each firmware type treats these bytes _slightly_ + /// differently. Thanks Nintendo. + version_bytes: [u8; 4], + /// I have no clue what this byte is. + unk_byte: u8, + /// The checksum byte of everything else in the file. Very last byte. + checksum: u8, +} + +impl MIONFirmwareFile { + /// Attempt to parse a firmware file that would be uploaded to the MION + /// board. + /// + /// These packages would be manually uploaded to: + /// `http:///update.cgi`. + /// + /// ## Errors + /// + /// This function will error if the original MION firmwares would throw an + /// error at this package, or would otherwise corrupt when installing it. + /// This consistetues the following checks: + /// + /// - Validating the file is at least 0x26 (38) bytes long + /// (*note: the mion only checks for 0x16 but will fail because the AES + /// block size is 32 bytes.*) + /// - The file has an invalid checksum (the checksum is the last byte in + /// the file.) + /// - If uploading a firmware type of [`MIONFirmwareType::Mion`], the last + /// byte in the version must be 0x00, if it's not the upload will corrupt + /// heavily as the programmers treated it as a load-bearing NUL terminator + /// which is required for strings in C (the language the FW was written + /// in). + /// - If the main contents of the file were not encrypted with the common AES + /// key. + /// - If the decrypted contents do not end with the correct signature, this is + /// `PWI-SS_FW_IMAGE` for [`MionFirmwareType::Mion`] & + /// [`MionFirmwareType::Ipl`], and `PWI-SS_FP_IMAGE` for + /// [`MionFirmwareType::FPGA`]. + pub fn parse(firmware: &[u8], firmware_type: MIONFirmwareType) -> Result { + let firmware_length = firmware.len(); + if firmware_length < 0x26 { + return Err(APIError::MionFirmwareTooSmall(firmware_length)); + } + let chksum_in_file = firmware[firmware_length - 1]; + let got_chksum = calculate_checksum(firmware); + if chksum_in_file != got_chksum { + return Err(APIError::BadMionFWChecksum(chksum_in_file, got_chksum)); + } + // This check is uniquely ours, the MION does not have this. + // + // But this really fucks up a lot, because it's a load bearing NUL + // terminator. + if matches!(firmware_type, MIONFirmwareType::Mion) && firmware[firmware_length - 3] != 0x00 + { + return Err(APIError::MionFirmwareMissingNULTerminator( + firmware[firmware_length - 3], + )); + } + let decrypted = raw_decrypt(&firmware[..firmware_length - 6])?; + + let expected_footer = match firmware_type { + MIONFirmwareType::Fpga => b"PWI-SS_FP_IMAGE\0", + _ => b"PWI-SS_FW_IMAGE\0", + }; + if !decrypted.ends_with(expected_footer) { + return Err(APIError::MionFirmwareMissingSignature); + } + + Ok(Self { + data: decrypted, + fw_type: firmware_type, + version_bytes: [ + firmware[firmware_length - 6], + firmware[firmware_length - 5], + firmware[firmware_length - 4], + firmware[firmware_length - 3], + ], + unk_byte: firmware[firmware_length - 2], + checksum: chksum_in_file, + }) + } + + /// Get the checksum for this firmware file. + #[must_use] + pub const fn checksum(&self) -> u8 { + self.checksum + } + + /// Get the underlying decrypted contents of this firmware file. + #[must_use] + pub const fn contents(&self) -> &Vec { + &self.data + } + + /// Get the type of firmware this is. + #[must_use] + pub const fn firmware_type(&self) -> MIONFirmwareType { + MIONFirmwareType::Mion + } + + /// Get the bytes that would need to be written to a file, and uploaded to + /// `/update.cgi` on the MION to deploy this firmware file. + #[allow( + // This function can't actually panic, it's just raw_encrypt doesn't know + // we've pre-validated the length by decrypting it successfully and not + // offering mutable APIs. + clippy::missing_panics_doc, + )] + #[must_use] + pub fn get_deployable_firmware_data(&self) -> Vec { + let mut encrypted = + raw_encrypt(&self.data).expect("We validate the block size at parse time."); + encrypted.extend_from_slice(&self.version_bytes); + encrypted.push(self.unk_byte); + encrypted.push(self.checksum); + encrypted + } + + /// Get the version for the actual firmware file. + /// + /// Each firmware type has a slightly different format than the rest of the + /// firmware types. An example of known following firmware types are: + /// + /// - [`MIONFirmwareType::Mion`] -> `0.0.14.80` (note: how to split between + /// two 0's?) + /// - [`MIONFirmwareType::Fpga`] -> `13052071` + /// - [`MIONFirmwareType::Ipl`] -> `0.5` + #[must_use] + pub fn version(&self) -> String { + match self.fw_type { + MIONFirmwareType::Mion => format!( + "0.{:02}.{}.{}", + self.version_bytes[0], self.version_bytes[1], self.version_bytes[2], + ), + MIONFirmwareType::Fpga => format!( + "{:02X}{:02X}{:02X}{:02X}", + self.version_bytes[3], + self.version_bytes[2], + self.version_bytes[1], + self.version_bytes[0], + ), + MIONFirmwareType::Ipl => format!( + "{}.{}", + u16::from_le_bytes([self.version_bytes[0], self.version_bytes[1]]), + u16::from_le_bytes([self.version_bytes[2], self.version_bytes[3]]), + ), + } + } +} + +/// Calculate a checksum for a given _encrypted_ blob. +/// +/// The checksum present as the last byte in the file takes in all the content +/// before the final byte of the encrypted file, and spits out a single `u8` +/// that represents the final checksum of the firmware. +/// +/// ## Panics +/// +/// This function should never panic, however there is an `expect` incase math +/// ever fundamenetally breaks and performing a `& 0xFF` returns us _more_ than +/// the last 8 bits. +fn calculate_checksum(encrypted_blob: &[u8]) -> u8 { + let mut chksum = 0_u32; + // For every byte except the last byte (CHKSUM), use it's value to calculate + // the checksum. + for byte in encrypted_blob.iter().take(encrypted_blob.len() - 1) { + chksum = chksum.wrapping_add((*byte).into()); + } + while chksum & 0xFFFF_FF00_u32 != 0 { + chksum = (chksum & 0xFF) + (chksum >> 8); + } + u8::try_from(!chksum & 0xFF) + .expect("&0xFF did not just give us the last 8 bits??? is math broken?") +} + +/// Encrypt a firmware files contents so it can be uploaded. +/// +/// ## Errors +/// +/// If there is a problem encrypting your data. See error codes +/// from the [`aes`], and [`ecb`] crates. +fn raw_encrypt(file_contents: &[u8]) -> Result, APIError> { + let encryptor = Aes256EcbEnc::new(&STOCK_FW_KEY.into()); + let mut decrypted = vec![ + 0x0; + Aes256EcbEnc::block_size() + * (file_contents.len() / Aes256EcbEnc::block_size() + 1) + ]; + let actual_len = encryptor + .encrypt_padded_b2b_mut::(file_contents, &mut decrypted) + .map_err(|_| APIError::BadDecryptedDataLength(Aes256EcbEnc::block_size()))? + .len(); + decrypted.truncate(actual_len); + Ok(decrypted) +} + +/// Decrypt a firmware files contents so it can be uploaded. +/// +/// ## Errors +/// +/// If your data is not the correct size to be decrypted. +fn raw_decrypt(file_contents: &[u8]) -> Result, APIError> { + let decryptor = Aes256EcbDec::new(&STOCK_FW_KEY.into()); + + decryptor + .decrypt_padded_vec_mut::(file_contents) + .map_err(|_| APIError::BadEncryptedDataLength(Aes256EcbDec::block_size())) +} + +#[cfg(test)] +mod unit_tests { + use super::*; + use std::path::PathBuf; + + #[must_use] + pub fn get_test_data_path(relative_to_test_data: &str) -> PathBuf { + let mut final_path = PathBuf::from( + std::env::var("CARGO_MANIFEST_DIR") + .expect("Failed to read `CARGO_MANIFEST_DIR` to locate t est files!"), + ); + final_path.push("src"); + final_path.push("mion"); + final_path.push("test-data"); + for file_part in relative_to_test_data.split('/') { + if file_part.is_empty() { + continue; + } + final_path.push(file_part); + } + final_path + } + + #[test] + pub fn can_decrypt_and_reencrypt_fw() { + for (source_file_name, dest_file_name) in vec![ + ("/fpga.13052071.bin", "/fpga.13052071_d.bin"), + ("/fw.0.00.14.80.bin", "/fw.0.00.14.80_d.bin"), + ("/ipl.0.5.bin", "/ipl.0.5_d.bin"), + ] { + let encrypted_path = get_test_data_path(source_file_name); + let decrypted_path = get_test_data_path(dest_file_name); + + let full_encrypted_contents = + std::fs::read(&encrypted_path).expect("Failed to read encrypted file to decrypt!"); + let decrypted = + raw_decrypt(&full_encrypted_contents[..]).expect("Failed to decrypt data!"); + let expected_decrypted_contents = std::fs::read(&decrypted_path) + .expect("Failed to read expected decrypted contents!"); + + assert_eq!( + decrypted.len(), + expected_decrypted_contents.len(), + "Decrypted data length did not match expected decrypted data length, file: {}", + encrypted_path.display(), + ); + for (idx, byte) in decrypted.iter().enumerate() { + if *byte != expected_decrypted_contents[idx] { + panic!( + "Decrypted Byte at Location: {idx} did not match expected contents! (total: {})", + decrypted.len(), + ); + } + } + + let re_encrypted = raw_encrypt(&decrypted).expect("Failed to encrypt firmware!"); + assert_eq!( + re_encrypted.len(), + full_encrypted_contents.len(), + "Encrypted data length did not match expected encrypted data length!", + ); + for (idx, byte) in re_encrypted.iter().enumerate() { + if *byte != full_encrypted_contents[idx] { + panic!( + "Re-Encrypted Byte at Location: {idx} did not match expected contents! (total: {})", + re_encrypted.len(), + ); + } + } + } + } + + #[test] + pub fn correctly_calculates_checksums() { + // These test constants were all taken from real life MION files. + // + // You can see what the MION would "expect" by connecting to a running + // MION device with telnet (the username is `mion`, and password is + // `/Multi_I/O_Network/`, the same as the HTTP interface.) Then run the + // following commands: + // + // ```bash + // INET> enable_telnet_trace + // Telnet port is ENABLED to transmit debug logs... + // + // INET> enable_debug SATA_H|SATA_D|FPGA|PCIE|EEPROM|HTTP|FWUPD|FPUPD|BIOS|KERNEL + // enable_debug SATA_H|SATA_D|FPGA|PCIE|EEPROM|HTTP|FWUPD|FPUPD|BIOS|KERNEL modules are enabled to produce debug logs... + // ``` + // + // Then upload a firmware file with a purposefully bad checksum (the last + // byte in the file). And in your existing telnet session run: + // + // ```bash + // INET> task_trace + // [...snipped...] + // 9, TS - 191574, Msg - *** ERR: [HTTP] >Checck sum : Calc, Image 21, 20 + // + // 9, TS - 193977, Msg - === INF: [HTTP] >_http_update_fw_html Enter, seq = -2, Mode = Firmware + // ``` + // + // The numbers will most likely be different at the beginning but what we + // care about is the: `Checck sum : Calc, Image 21, 20` line. In this case + // it's letting us know it calculated a checksum of 0x21, but the file had + // a checksum of 0x20. So it would have showed the error page. + // + // You can use this to validate the output of any file. + + for (file_path, footer_data, name, expected_value) in vec![ + ( + "/fw.0.00.14.80.bin", + vec![0x00_u8, 0x0E, 0x50, 0x00, 0xA1, 0x00], + "$encrypted.0.14.80.0.$0xA1", + 0x21_u8, + ), + ( + "/fw.0.00.14.80.bin", + vec![0x01_u8, 0x0E, 0x50, 0x00, 0xA1, 0x00], + "$encrypted.1.14.80.0.$0xA1", + 0x20_u8, + ), + ( + "/fw.0.00.14.80.bin", + vec![0xFF_u8, 0x0E, 0x50, 0x00, 0xA1, 0x00], + "$encrypted.255.14.80.0.$0xA1", + 0x21_u8, + ), + ( + "/fw.0.00.14.80.bin", + vec![0xCF_u8, 0x0E, 0x50, 0x00, 0xA1, 0x00], + "$encrypted.207.14.80.0.$0xA1", + 0x51_u8, + ), + ] { + let mut encrypted_contents = std::fs::read(get_test_data_path(file_path)) + .expect("Failed to read test data file!"); + encrypted_contents.extend(footer_data); + assert_eq!( + calculate_checksum(&encrypted_contents), + expected_value, + "Checksum did not match for named contents: {name}! Please check checksum code!", + ); + } + } + + #[test] + pub fn can_successfully_parse_real_fw_file() { + let mut mion_fw = std::fs::read(get_test_data_path("/fw.0.00.14.80.bin")) + .expect("Failed to read encrypted MION FW!"); + let mut ipl_fw = std::fs::read(get_test_data_path("/ipl.0.5.bin")) + .expect("Failed to read encrypted IPL FW!"); + let mut fpga_fw = std::fs::read(get_test_data_path("/fpga.13052071.bin")) + .expect("Failed to read encrypted FPGA FW!"); + // Append the real life footers that would've been on these files. + mion_fw.extend([0x00, 0x0E, 0x50, 0x00, 0xA1, 0x21]); + ipl_fw.extend([0x00, 0x00, 0x05, 0x00, 0xA1, 0x3E]); + fpga_fw.extend([0x71, 0x20, 0x05, 0x13, 0xA2, 0xBF]); + + let parsed_mion = MIONFirmwareFile::parse(&mion_fw, MIONFirmwareType::Mion) + .expect("Failed to parse MION firmware!"); + let parsed_ipl = MIONFirmwareFile::parse(&ipl_fw, MIONFirmwareType::Ipl) + .expect("Failed to parse IPL firmware!"); + let parsed_fpga = MIONFirmwareFile::parse(&fpga_fw, MIONFirmwareType::Fpga) + .expect("Failed to parse FPGA firmware!"); + + assert_eq!(parsed_mion.version(), "0.00.14.80"); + assert_eq!(parsed_ipl.version(), "0.5"); + assert_eq!(parsed_fpga.version(), "13052071"); + } +} diff --git a/pkg/cat-dev/src/mion/mod.rs b/pkg/cat-dev/src/mion/mod.rs index d97783c..1b71d9d 100644 --- a/pkg/cat-dev/src/mion/mod.rs +++ b/pkg/cat-dev/src/mion/mod.rs @@ -9,5 +9,6 @@ pub mod cgis; pub mod discovery; +pub mod firmware; pub mod parameter; pub mod proto; diff --git a/pkg/cat-dev/src/mion/proto/parameter/mod.rs b/pkg/cat-dev/src/mion/proto/parameter/mod.rs index 2f5042f..5c0c75c 100644 --- a/pkg/cat-dev/src/mion/proto/parameter/mod.rs +++ b/pkg/cat-dev/src/mion/proto/parameter/mod.rs @@ -443,9 +443,9 @@ impl From for Bytes { mod unit_tests { use super::*; use bytes::Bytes; - use once_cell::sync::Lazy; + use std::sync::LazyLock; - static REAL_LIFE_DUMPED_MION_PARAMETERS_PACKET: Lazy> = Lazy::new(|| { + static REAL_LIFE_DUMPED_MION_PARAMETERS_PACKET: LazyLock> = LazyLock::new(|| { vec![ 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, 0x02, 0x02, 0x0c, 0x0d, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, @@ -487,7 +487,7 @@ mod unit_tests { 0xff, 0xff, ] }); - static REAL_LIFE_SET_MION_PARAMETERS_PACKET: Lazy> = Lazy::new(|| { + static REAL_LIFE_SET_MION_PARAMETERS_PACKET: LazyLock> = LazyLock::new(|| { vec![ 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, 0x02, 0x02, 0x0c, 0x0d, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, diff --git a/pkg/cat-dev/src/mion/test-data/README.md b/pkg/cat-dev/src/mion/test-data/README.md new file mode 100644 index 0000000..0d129aa --- /dev/null +++ b/pkg/cat-dev/src/mion/test-data/README.md @@ -0,0 +1,9 @@ +# Test Binary Data # + +Binary data used for testing certain parts of encryption/decryption with real +life files. These are small (<5mbs) to keep git happy (as git does not handle +even medium sized binary files well). + +These files are not guaranteed to be usable in any context outside of these +tests. For example the decrypted firmware files used in for validating +decrypted contents are both invalid. diff --git a/pkg/cat-dev/src/mion/test-data/fpga.13052071.bin b/pkg/cat-dev/src/mion/test-data/fpga.13052071.bin new file mode 100644 index 0000000..d1025dc Binary files /dev/null and b/pkg/cat-dev/src/mion/test-data/fpga.13052071.bin differ diff --git a/pkg/cat-dev/src/mion/test-data/fpga.13052071_d.bin b/pkg/cat-dev/src/mion/test-data/fpga.13052071_d.bin new file mode 100644 index 0000000..bbc91ff Binary files /dev/null and b/pkg/cat-dev/src/mion/test-data/fpga.13052071_d.bin differ diff --git a/pkg/cat-dev/src/mion/test-data/fw.0.00.14.80.bin b/pkg/cat-dev/src/mion/test-data/fw.0.00.14.80.bin new file mode 100644 index 0000000..b83d1b1 Binary files /dev/null and b/pkg/cat-dev/src/mion/test-data/fw.0.00.14.80.bin differ diff --git a/pkg/cat-dev/src/mion/test-data/fw.0.00.14.80_d.bin b/pkg/cat-dev/src/mion/test-data/fw.0.00.14.80_d.bin new file mode 100644 index 0000000..71664d0 Binary files /dev/null and b/pkg/cat-dev/src/mion/test-data/fw.0.00.14.80_d.bin differ diff --git a/pkg/cat-dev/src/mion/test-data/ipl.0.5.bin b/pkg/cat-dev/src/mion/test-data/ipl.0.5.bin new file mode 100644 index 0000000..3e3af9b Binary files /dev/null and b/pkg/cat-dev/src/mion/test-data/ipl.0.5.bin differ diff --git a/pkg/cat-dev/src/mion/test-data/ipl.0.5_d.bin b/pkg/cat-dev/src/mion/test-data/ipl.0.5_d.bin new file mode 100644 index 0000000..f24eff8 Binary files /dev/null and b/pkg/cat-dev/src/mion/test-data/ipl.0.5_d.bin differ diff --git a/pkg/cat-dev/src/serial/underlying/sys/windows.rs b/pkg/cat-dev/src/serial/underlying/sys/windows.rs index e61cd37..3f61682 100644 --- a/pkg/cat-dev/src/serial/underlying/sys/windows.rs +++ b/pkg/cat-dev/src/serial/underlying/sys/windows.rs @@ -77,7 +77,7 @@ impl RawSyncSerialPort { WriteTotalTimeoutConstant: DEFAULT_TIMEOUT_MS, }; unsafe { - SetCommTimeouts(HANDLE(fd.as_raw_handle() as isize), &timeouts) + SetCommTimeouts(HANDLE(fd.as_raw_handle()), &timeouts) .map_err(|_| IoError::last_os_error())?; } let dcb = DCB { @@ -89,8 +89,7 @@ impl RawSyncSerialPort { ..Default::default() }; unsafe { - SetCommState(HANDLE(fd.as_raw_handle() as isize), &dcb) - .map_err(|_| IoError::last_os_error())?; + SetCommState(HANDLE(fd.as_raw_handle()), &dcb).map_err(|_| IoError::last_os_error())?; } Ok(Self { fd }) @@ -115,7 +114,7 @@ impl RawSyncSerialPort { pub fn get_read_timeout(&self) -> IoResult { let mut timeouts = unsafe { std::mem::zeroed() }; unsafe { - GetCommTimeouts(HANDLE(self.fd.as_raw_handle() as isize), &mut timeouts) + GetCommTimeouts(HANDLE(self.fd.as_raw_handle()), &mut timeouts) .map_err(|_| IoError::last_os_error())?; } Ok(Duration::from_millis( @@ -131,7 +130,7 @@ impl RawSyncSerialPort { pub fn get_write_timeout(&self) -> IoResult { let mut timeouts = unsafe { std::mem::zeroed() }; unsafe { - GetCommTimeouts(HANDLE(self.fd.as_raw_handle() as isize), &mut timeouts) + GetCommTimeouts(HANDLE(self.fd.as_raw_handle()), &mut timeouts) .map_err(|_| IoError::last_os_error())?; } Ok(Duration::from_millis( @@ -156,14 +155,14 @@ impl RawSyncSerialPort { let mut timeouts = unsafe { std::mem::zeroed() }; unsafe { - GetCommTimeouts(HANDLE(self.fd.as_raw_handle() as isize), &mut timeouts) + GetCommTimeouts(HANDLE(self.fd.as_raw_handle()), &mut timeouts) .map_err(|_| IoError::last_os_error())?; } timeouts.ReadIntervalTimeout = u32::MAX; timeouts.ReadTotalTimeoutMultiplier = u32::MAX; timeouts.ReadTotalTimeoutConstant = timeout_ms.try_into().unwrap_or(u32::MAX); unsafe { - SetCommTimeouts(HANDLE(self.fd.as_raw_handle() as isize), &timeouts) + SetCommTimeouts(HANDLE(self.fd.as_raw_handle()), &timeouts) .map_err(|_| IoError::last_os_error())?; } @@ -187,13 +186,13 @@ impl RawSyncSerialPort { let mut timeouts = unsafe { std::mem::zeroed() }; unsafe { - GetCommTimeouts(HANDLE(self.fd.as_raw_handle() as isize), &mut timeouts) + GetCommTimeouts(HANDLE(self.fd.as_raw_handle()), &mut timeouts) .map_err(|_| IoError::last_os_error())?; } timeouts.WriteTotalTimeoutMultiplier = u32::MAX; timeouts.WriteTotalTimeoutConstant = timeout_ms.try_into().unwrap_or(u32::MAX); unsafe { - SetCommTimeouts(HANDLE(self.fd.as_raw_handle() as isize), &timeouts) + SetCommTimeouts(HANDLE(self.fd.as_raw_handle()), &timeouts) .map_err(|_| IoError::last_os_error())?; } @@ -217,7 +216,7 @@ impl RawSyncSerialPort { match unsafe { ReadFile( - HANDLE(self.fd.as_raw_handle() as isize), + HANDLE(self.fd.as_raw_handle()), Some(buff), Some(&mut read_bytes), Some(&mut overlapped), @@ -291,7 +290,7 @@ impl RawSyncSerialPort { match unsafe { WriteFile( - HANDLE(self.fd.as_raw_handle() as isize), + HANDLE(self.fd.as_raw_handle()), Some(buff), Some(&mut written), Some(&mut overlapped), @@ -346,8 +345,7 @@ impl RawSyncSerialPort { /// If we cannot call `FlushFileBuffers`, or it returns an error. pub fn flush_output(&self) -> IoResult<()> { unsafe { - FlushFileBuffers(HANDLE(self.fd.as_raw_handle() as isize)) - .map_err(|_| IoError::last_os_error()) + FlushFileBuffers(HANDLE(self.fd.as_raw_handle())).map_err(|_| IoError::last_os_error()) } } @@ -366,11 +364,8 @@ impl RawSyncSerialPort { } unsafe { - PurgeComm( - HANDLE(self.fd.as_raw_handle() as isize), - PURGE_COMM_FLAGS(flags), - ) - .map_err(|_| IoError::last_os_error()) + PurgeComm(HANDLE(self.fd.as_raw_handle()), PURGE_COMM_FLAGS(flags)) + .map_err(|_| IoError::last_os_error()) } } @@ -382,7 +377,7 @@ impl RawSyncSerialPort { pub fn set_rts(&self, state: bool) -> IoResult<()> { unsafe { EscapeCommFunction( - HANDLE(self.fd.as_raw_handle() as isize), + HANDLE(self.fd.as_raw_handle()), if state { SETRTS } else { CLRRTS }, ) .map_err(|_| IoError::last_os_error()) @@ -406,7 +401,7 @@ impl RawSyncSerialPort { pub fn set_dtr(&self, state: bool) -> IoResult<()> { unsafe { EscapeCommFunction( - HANDLE(self.fd.as_raw_handle() as isize), + HANDLE(self.fd.as_raw_handle()), if state { SETDTR } else { CLRDTR }, ) .map_err(|_| IoError::last_os_error()) @@ -488,7 +483,7 @@ impl RawSyncSerialPort { fn read_pin(fd: &File, pin: u32) -> IoResult { let mut bits: MODEM_STATUS_FLAGS = MODEM_STATUS_FLAGS(0); unsafe { - GetCommModemStatus(HANDLE(fd.as_raw_handle() as isize), &mut bits) + GetCommModemStatus(HANDLE(fd.as_raw_handle()), &mut bits) .map_err(|_| IoError::last_os_error())?; } Ok(bits.0 & pin != 0) @@ -499,7 +494,7 @@ impl RawSyncSerialPort { let mut transferred = 0; match GetOverlappedResult( - HANDLE(file.as_raw_handle() as isize), + HANDLE(file.as_raw_handle()), overlapped, &mut transferred, true, @@ -547,7 +542,7 @@ struct RegKey { } impl RegKey { fn open(parent: HKEY, subpath: &CStr, rights: REG_SAM_FLAGS) -> IoResult { - let mut key: HKEY = HKEY(std::ptr::null_mut::() as isize); + let mut key: HKEY = HKEY(std::ptr::null_mut::()); unsafe { RegOpenKeyExA(parent, PCSTR(subpath.as_ptr().cast()), 0, rights, &mut key) diff --git a/pkg/log/Cargo.toml b/pkg/log/Cargo.toml index 9979838..361dbe6 100644 --- a/pkg/log/Cargo.toml +++ b/pkg/log/Cargo.toml @@ -10,9 +10,8 @@ version.workspace = true publish = false [dependencies] -console-subscriber = { version = "^0.2.0", default-features = false, features = ["env-filter", "parking_lot"] } +console-subscriber = { version = "^0.4.1", default-features = false, features = ["env-filter", "parking_lot"] } miette.workspace = true -once_cell.workspace = true tracing.workspace = true tracing-error = "^0.2.0" tracing-subscriber = { version = "^0.3.18", features = ["env-filter", "json", "valuable"] } \ No newline at end of file diff --git a/pkg/log/src/lib.rs b/pkg/log/src/lib.rs index 9432a86..56f73f2 100644 --- a/pkg/log/src/lib.rs +++ b/pkg/log/src/lib.rs @@ -1,8 +1,11 @@ #![doc = include_str!("../README.md")] use miette::{miette, Context, IntoDiagnostic, Result}; -use once_cell::sync::Lazy; -use std::{env::var as env_var, net::SocketAddr, sync::Mutex}; +use std::{ + env::var as env_var, + net::SocketAddr, + sync::{LazyLock, Mutex}, +}; use tracing::debug; use tracing_error::ErrorLayer; use tracing_subscriber::{ @@ -10,7 +13,7 @@ use tracing_subscriber::{ }; /// Check if we have actually initialized logging before. -static HAS_INITIALIZED_LOGGING: Lazy> = Lazy::new(|| Mutex::new(false)); +static HAS_INITIALIZED_LOGGING: LazyLock> = LazyLock::new(|| Mutex::new(false)); /// Determine if our logger will use ANSI escape codes. ///