From a08702e022737ac4e7b7d035b44e338d3b488f18 Mon Sep 17 00:00:00 2001 From: Ian Clarke Date: Thu, 26 Dec 2024 14:28:27 -0600 Subject: [PATCH 01/49] upgrade Wasmer --- Cargo.lock | 836 ++++++++++++++++++++++++++++++++++++++--------------- Cargo.toml | 2 +- 2 files changed, 596 insertions(+), 242 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 2a8330b1f..7eaf650de 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -52,17 +52,6 @@ dependencies = [ "subtle", ] -[[package]] -name = "ahash" -version = "0.7.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "891477e0c6a8957309ee5c45a6368af3ae14bb510732d2684ffa19af310920f9" -dependencies = [ - "getrandom", - "once_cell", - "version_check", -] - [[package]] name = "ahash" version = "0.8.11" @@ -391,7 +380,7 @@ dependencies = [ "cfg-if", "libc", "miniz_oxide", - "object", + "object 0.36.5", "rustc-demangle", "windows-targets 0.52.6", ] @@ -423,6 +412,26 @@ dependencies = [ "serde", ] +[[package]] +name = "bindgen" +version = "0.70.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f49d8fed880d473ea71efb9bf597651e77201bdd4893efe54c9e5d65ae04ce6f" +dependencies = [ + "bitflags 2.6.0", + "cexpr", + "clang-sys", + "itertools 0.13.0", + "log", + "prettyplease", + "proc-macro2", + "quote", + "regex", + "rustc-hash", + "shlex", + "syn 2.0.89", +] + [[package]] name = "bitflags" version = "1.3.2" @@ -438,18 +447,6 @@ dependencies = [ "serde", ] -[[package]] -name = "bitvec" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1bc2832c24239b0141d5674bb9174f9d68a8b5b3f2753311927c172ca46f7e9c" -dependencies = [ - "funty", - "radium", - "tap", - "wyz", -] - [[package]] name = "blake3" version = "1.5.4" @@ -494,8 +491,20 @@ version = "0.6.12" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "23cdc57ce23ac53c931e88a43d06d070a6fd142f2617be5855eb75efc9beb1c2" dependencies = [ - "bytecheck_derive", - "ptr_meta", + "bytecheck_derive 0.6.12", + "ptr_meta 0.1.4", + "simdutf8", +] + +[[package]] +name = "bytecheck" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "50c8f430744b23b54ad15161fcbc22d82a29b73eacbe425fea23ec822600bc6f" +dependencies = [ + "bytecheck_derive 0.8.0", + "ptr_meta 0.3.0", + "rancor", "simdutf8", ] @@ -510,6 +519,17 @@ dependencies = [ "syn 1.0.109", ] +[[package]] +name = "bytecheck_derive" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "523363cbe1df49b68215efdf500b103ac3b0fb4836aed6d15689a076eadb8fff" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.89", +] + [[package]] name = "bytemuck" version = "1.20.0" @@ -528,6 +548,27 @@ version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9ac0150caa2ae65ca5bd83f25c7de183dea78d4d366469f148435e2acfbad0da" +[[package]] +name = "bzip2" +version = "0.4.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bdb116a6ef3f6c3698828873ad02c3014b3c85cadb88496095628e3ef1e347f8" +dependencies = [ + "bzip2-sys", + "libc", +] + +[[package]] +name = "bzip2-sys" +version = "0.1.11+1.0.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "736a955f3fa7875102d57c82b8cac37ec45224a07fd32d58f9f7a186b6cd4cdc" +dependencies = [ + "cc", + "libc", + "pkg-config", +] + [[package]] name = "cache-padded" version = "1.3.0" @@ -546,9 +587,20 @@ version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fd9de9f2205d5ef3fd67e685b0df337994ddd4495e2a28d185500d0e1edfea47" dependencies = [ + "jobserver", + "libc", "shlex", ] +[[package]] +name = "cexpr" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6fac387a98bb7c37292057cffc56d62ecb629900026402633ae9160df93a8766" +dependencies = [ + "nom", +] + [[package]] name = "cfg-if" version = "1.0.0" @@ -612,6 +664,17 @@ dependencies = [ "zeroize", ] +[[package]] +name = "clang-sys" +version = "1.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b023947811758c97c59bf9d1c188fd619ad4718dcaa767947df1cadb14f39f4" +dependencies = [ + "glob", + "libc", + "libloading", +] + [[package]] name = "clap" version = "4.5.21" @@ -652,6 +715,15 @@ version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "afb84c814227b90d6895e01398aee0d8033c00e7466aca416fb6a8e0eb19d8a7" +[[package]] +name = "cmake" +version = "0.1.52" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c682c223677e0e5b6b7f63a64b9351844c3f1b1678a68b7ee617e30fb082620e" +dependencies = [ + "cc", +] + [[package]] name = "colorchoice" version = "1.0.3" @@ -708,15 +780,15 @@ checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b" [[package]] name = "corosensei" -version = "0.1.4" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "80128832c58ea9cbd041d2a759ec449224487b2c1e400453d99d244eead87a8e" +checksum = "ad067b451c08956709f8762dba86e049c124ea52858e3ab8d076ba2892caa437" dependencies = [ "autocfg", "cfg-if", "libc", "scopeguard", - "windows-sys 0.33.0", + "windows-sys 0.59.0", ] [[package]] @@ -730,74 +802,80 @@ dependencies = [ [[package]] name = "cranelift-bforest" -version = "0.91.1" +version = "0.110.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a2ab4512dfd3a6f4be184403a195f76e81a8a9f9e6c898e19d2dc3ce20e0115" +checksum = "305d51c180ebdc46ef61bc60c54ae6512db3bc9a05842a1f1e762e45977019ab" dependencies = [ "cranelift-entity", ] +[[package]] +name = "cranelift-bitset" +version = "0.110.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "690d8ae6c73748e5ce3d8fe59034dceadb8823e6c8994ba324141c5eae909b0e" + [[package]] name = "cranelift-codegen" -version = "0.91.1" +version = "0.110.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "98b022ed2a5913a38839dfbafe6cf135342661293b08049843362df4301261dc" +checksum = "bd7ca95e831c18d1356da783765c344207cbdffea91e13e47fa9327dbb2e0719" dependencies = [ - "arrayvec", "bumpalo", "cranelift-bforest", + "cranelift-bitset", "cranelift-codegen-meta", "cranelift-codegen-shared", - "cranelift-egraph", + "cranelift-control", "cranelift-entity", "cranelift-isle", - "gimli 0.26.2", + "gimli 0.28.1", + "hashbrown 0.14.5", "log", "regalloc2", + "rustc-hash", "smallvec", "target-lexicon", ] [[package]] name = "cranelift-codegen-meta" -version = "0.91.1" +version = "0.110.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "639307b45434ad112a98f8300c0f0ab085cbefcd767efcdef9ef19d4c0756e74" +checksum = "f0a2d2ab65e6cbf91f81781d8da65ec2005510f18300eff21a99526ed6785863" dependencies = [ "cranelift-codegen-shared", ] [[package]] name = "cranelift-codegen-shared" -version = "0.91.1" +version = "0.110.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "278e52e29c53fcf32431ef08406c295699a70306d05a0715c5b1bf50e33a9ab7" +checksum = "efcff860573cf3db9ae98fbd949240d78b319df686cc306872e7fab60e9c84d7" [[package]] -name = "cranelift-egraph" -version = "0.91.1" +name = "cranelift-control" +version = "0.110.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "624b54323b06e675293939311943ba82d323bb340468ce1889be5da7932c8d73" +checksum = "69d70e5b75c2d5541ef80a99966ccd97aaa54d2a6af19ea31759a28538e1685a" dependencies = [ - "cranelift-entity", - "fxhash", - "hashbrown 0.12.3", - "indexmap 1.9.3", - "log", - "smallvec", + "arbitrary", ] [[package]] name = "cranelift-entity" -version = "0.91.1" +version = "0.110.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a59bcbca89c3f1b70b93ab3cbba5e5e0cbf3e63dadb23c7525cb142e21a9d4c" +checksum = "a48cb0a194c9ba82fec35a1e492055388d89b2e3c03dee9dcf2488892be8004d" +dependencies = [ + "cranelift-bitset", +] [[package]] name = "cranelift-frontend" -version = "0.91.1" +version = "0.110.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d70abacb8cfef3dc8ff7e8836e9c1d70f7967dfdac824a4cd5e30223415aca6" +checksum = "8327afc6c1c05f4be62fefce5b439fa83521c65363a322e86ea32c85e7ceaf64" dependencies = [ "cranelift-codegen", "log", @@ -807,9 +885,9 @@ dependencies = [ [[package]] name = "cranelift-isle" -version = "0.91.1" +version = "0.110.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "393bc73c451830ff8dbb3a07f61843d6cb41a084f9996319917c0b291ed785bb" +checksum = "56b08621c00321efcfa3eee6a3179adc009e21ea8d24ca7adc3c326184bc3f48" [[package]] name = "crc" @@ -826,6 +904,15 @@ version = "2.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "19d374276b40fb8bbdee95aef7c7fa6b5316ec764510eb64b8dd0e2ed0d7e7f5" +[[package]] +name = "crc32fast" +version = "1.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a97769d94ddab943e4510d138150169a2758b5ef3eb191a9ee688de3e23ef7b3" +dependencies = [ + "cfg-if", +] + [[package]] name = "crossbeam" version = "0.8.4" @@ -1018,6 +1105,12 @@ version = "2.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e8566979429cf69b49a5c740c60791108e86440e8be149bbea4fe54d2c32d6e2" +[[package]] +name = "deflate64" +version = "0.1.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "da692b8d1080ea3045efaab14434d40468c3d8657e42abddfffca87b428f4c1b" + [[package]] name = "delegate" version = "0.13.1" @@ -1051,21 +1144,21 @@ dependencies = [ ] [[package]] -name = "derivative" -version = "2.2.0" +name = "derive_arbitrary" +version = "1.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fcc3dd5e9e9c0b295d6e1e4d811fb6f157d5ffd784b8d202fc62eac8035a770b" +checksum = "30542c1ad912e0e3d22a1935c290e12e8a29d704a420177a31faad4a601a0800" dependencies = [ "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.89", ] [[package]] -name = "derive_arbitrary" -version = "1.4.1" +name = "derive_more" +version = "0.99.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "30542c1ad912e0e3d22a1935c290e12e8a29d704a420177a31faad4a601a0800" +checksum = "5f33878137e4dafd7fa914ad4e259e18a4e8e532b9617a2d0150262bf53abfce" dependencies = [ "proc-macro2", "quote", @@ -1278,9 +1371,9 @@ dependencies = [ [[package]] name = "fallible-iterator" -version = "0.2.0" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4443176a9f2c162692bd3d352d745ef9413eec5782a80d8fd6f8a1ac692a07f7" +checksum = "2acce4a10f12dc2fb14a218589d4f1f62ef011b2d0cc4b3cb1bba8e94da14649" [[package]] name = "fastrand" @@ -1323,7 +1416,7 @@ dependencies = [ "serde_json", "serde_with", "tar", - "thiserror", + "thiserror 1.0.69", "tokio", "tokio-tungstenite", "toml", @@ -1354,6 +1447,16 @@ dependencies = [ "rustc_version", ] +[[package]] +name = "flate2" +version = "1.0.35" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c936bfdafb507ebbf50b8074c54fa31c5be9a1e7e5f467dd659697041407d07c" +dependencies = [ + "crc32fast", + "miniz_oxide", +] + [[package]] name = "flume" version = "0.11.1" @@ -1426,7 +1529,7 @@ dependencies = [ "futures", "headers", "hickory-resolver", - "itertools", + "itertools 0.13.0", "notify", "once_cell", "opentelemetry 0.26.0", @@ -1451,7 +1554,7 @@ dependencies = [ "stretto", "tar", "tempfile", - "thiserror", + "thiserror 1.0.69", "time", "tokio", "tokio-tungstenite", @@ -1535,7 +1638,7 @@ dependencies = [ "serde_bytes", "serde_json", "serde_with", - "thiserror", + "thiserror 1.0.69", "tokio", "tokio-tungstenite", "tracing", @@ -1554,12 +1657,6 @@ dependencies = [ "libc", ] -[[package]] -name = "funty" -version = "2.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6d5a32815ae3f33302d95fdcb2ce17862f8c65363dcfd29360480ba1001fc9c" - [[package]] name = "futures" version = "0.3.31" @@ -1685,15 +1782,6 @@ dependencies = [ "slab", ] -[[package]] -name = "fxhash" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c31b6d751ae2c7f11320402d34e41349dd1016f8d5d45e48c4312bc8625af50c" -dependencies = [ - "byteorder", -] - [[package]] name = "generic-array" version = "0.14.7" @@ -1729,12 +1817,12 @@ dependencies = [ [[package]] name = "gimli" -version = "0.26.2" +version = "0.28.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22030e2c5a68ec659fde1e949a745124b48e6fa8b045b7ed5bd1fe4ccc5c4e5d" +checksum = "4271d37baee1b8c7e4b708028c57d816cf9d2434acb33a549475f78c181f6253" dependencies = [ "fallible-iterator", - "indexmap 1.9.3", + "indexmap 2.7.0", "stable_deref_trait", ] @@ -1762,7 +1850,7 @@ dependencies = [ "futures-core", "futures-sink", "http 1.1.0", - "indexmap 2.6.0", + "indexmap 2.7.0", "slab", "tokio", "tokio-util", @@ -1774,8 +1862,14 @@ name = "hashbrown" version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" + +[[package]] +name = "hashbrown" +version = "0.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "43a3c133739dddd0d2990f9a4bdf8eb4b21ef50e4851ca85ab661199821d510e" dependencies = [ - "ahash 0.7.8", + "ahash", ] [[package]] @@ -1784,7 +1878,7 @@ version = "0.14.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1" dependencies = [ - "ahash 0.8.11", + "ahash", "allocator-api2", ] @@ -1870,7 +1964,7 @@ dependencies = [ "rand", "rustls 0.21.12", "rustls-pemfile 1.0.4", - "thiserror", + "thiserror 1.0.69", "tinyvec", "tokio", "tokio-rustls 0.24.1", @@ -1895,7 +1989,7 @@ dependencies = [ "resolv-conf", "rustls 0.21.12", "smallvec", - "thiserror", + "thiserror 1.0.69", "tokio", "tokio-rustls 0.24.1", "tracing", @@ -2049,7 +2143,7 @@ dependencies = [ "http 1.1.0", "hyper", "hyper-util", - "rustls 0.23.18", + "rustls 0.23.20", "rustls-pki-types", "tokio", "tokio-rustls 0.26.0", @@ -2295,9 +2389,9 @@ dependencies = [ [[package]] name = "indexmap" -version = "2.6.0" +version = "2.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "707907fe3c25f5424cce2cb7e1cbcafee6bdbe735ca90ef77c29e84591e5b9da" +checksum = "62f822373a4fe84d4bb149bf54e584a7f4abec90e072ed49cda0edea5b95471f" dependencies = [ "equivalent", "hashbrown 0.15.1", @@ -2408,6 +2502,15 @@ dependencies = [ "waker-fn", ] +[[package]] +name = "itertools" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba291022dbbd398a455acf126c1e341954079855bc60dfdda641363bd6922569" +dependencies = [ + "either", +] + [[package]] name = "itertools" version = "0.13.0" @@ -2423,6 +2526,15 @@ version = "1.0.13" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "540654e97a3f4470a492cd30ff187bc95d89557a903a2bbf112e2fae98104ef2" +[[package]] +name = "jobserver" +version = "0.1.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "48d1dbcbbeb6a7fec7e059840aa538bd62aaccf972c7346c4d9d2059312853d0" +dependencies = [ + "libc", +] + [[package]] name = "js-sys" version = "0.3.72" @@ -2473,6 +2585,16 @@ version = "0.2.164" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "433bfe06b8c75da9b2e3fbea6e5329ff87748f0b144ef75306e674c3f6f7c13f" +[[package]] +name = "libloading" +version = "0.8.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fc2f4eb4bc735547cfed7c0a4922cbd04a4655978c09b54f1f7b228750664c34" +dependencies = [ + "cfg-if", + "windows-targets 0.52.6", +] + [[package]] name = "libm" version = "0.2.11" @@ -2541,6 +2663,12 @@ dependencies = [ "scopeguard", ] +[[package]] +name = "lockfree-object-pool" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9374ef4228402d4b7e403e5838cb880d9ee663314b0a900d5a6aabf0c213552e" + [[package]] name = "log" version = "0.4.22" @@ -2556,6 +2684,16 @@ dependencies = [ "linked-hash-map", ] +[[package]] +name = "lzma-rs" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "297e814c836ae64db86b36cf2a557ba54368d03f6afcd7d947c266692f71115e" +dependencies = [ + "byteorder", + "crc", +] + [[package]] name = "lzma-sys" version = "0.1.20" @@ -2702,6 +2840,26 @@ version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7843ec2de400bcbc6a6328c958dc38e5359da6e93e72e37bc5246bf1ae776389" +[[package]] +name = "munge" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "64142d38c84badf60abf06ff9bd80ad2174306a5b11bd4706535090a30a419df" +dependencies = [ + "munge_macro", +] + +[[package]] +name = "munge_macro" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1bb5c1d8184f13f7d0ccbeeca0def2f9a181bce2624302793005f5ca8aa62e5e" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.89", +] + [[package]] name = "nalgebra" version = "0.32.6" @@ -2891,6 +3049,20 @@ dependencies = [ "libc", ] +[[package]] +name = "object" +version = "0.32.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a6a622008b6e321afc04970976f62ee297fdbaa6f95318ca343e3eebb9648441" +dependencies = [ + "crc32fast", + "flate2", + "hashbrown 0.14.5", + "indexmap 2.7.0", + "memchr", + "ruzstd", +] + [[package]] name = "object" version = "0.36.5" @@ -2967,7 +3139,7 @@ dependencies = [ "js-sys", "once_cell", "pin-project-lite", - "thiserror", + "thiserror 1.0.69", ] [[package]] @@ -2981,7 +3153,7 @@ dependencies = [ "js-sys", "once_cell", "pin-project-lite", - "thiserror", + "thiserror 1.0.69", ] [[package]] @@ -2995,7 +3167,7 @@ dependencies = [ "js-sys", "once_cell", "pin-project-lite", - "thiserror", + "thiserror 1.0.69", ] [[package]] @@ -3042,7 +3214,7 @@ dependencies = [ "opentelemetry-proto", "opentelemetry_sdk 0.26.0", "prost", - "thiserror", + "thiserror 1.0.69", "tokio", "tonic", ] @@ -3081,7 +3253,7 @@ dependencies = [ "ordered-float 4.5.0", "percent-encoding", "rand", - "thiserror", + "thiserror 1.0.69", "tokio", "tokio-stream", ] @@ -3101,7 +3273,7 @@ dependencies = [ "opentelemetry 0.25.0", "percent-encoding", "rand", - "thiserror", + "thiserror 1.0.69", ] [[package]] @@ -3120,7 +3292,7 @@ dependencies = [ "percent-encoding", "rand", "serde_json", - "thiserror", + "thiserror 1.0.69", "tokio", "tokio-stream", ] @@ -3209,6 +3381,16 @@ dependencies = [ "serde", ] +[[package]] +name = "pbkdf2" +version = "0.12.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8ed6a7761f76e3b9f92dfb0a60a6a6477c61024b775147ff0973a02653abaf2" +dependencies = [ + "digest", + "hmac", +] + [[package]] name = "pem-rfc7468" version = "0.7.0" @@ -3373,6 +3555,16 @@ dependencies = [ "zerocopy", ] +[[package]] +name = "prettyplease" +version = "0.2.25" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "64d1ec885c64d0457d564db4ec299b2dae3f9c02808b8ad9c3a089c591b18033" +dependencies = [ + "proc-macro2", + "syn 2.0.89", +] + [[package]] name = "prettytable-rs" version = "0.10.0" @@ -3384,31 +3576,29 @@ dependencies = [ "is-terminal", "lazy_static", "term", - "unicode-width", + "unicode-width 0.1.14", ] [[package]] -name = "proc-macro-error" -version = "1.0.4" +name = "proc-macro-error-attr2" +version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c" +checksum = "96de42df36bb9bba5542fe9f1a054b8cc87e172759a1868aa05c1f3acc89dfc5" dependencies = [ - "proc-macro-error-attr", "proc-macro2", "quote", - "syn 1.0.109", - "version_check", ] [[package]] -name = "proc-macro-error-attr" -version = "1.0.4" +name = "proc-macro-error2" +version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869" +checksum = "11ec05c52be0a07b08061f7dd003e7d7092e0472bc731b4af7bb1ef876109802" dependencies = [ + "proc-macro-error-attr2", "proc-macro2", "quote", - "version_check", + "syn 2.0.89", ] [[package]] @@ -3437,7 +3627,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e9552f850d5f0964a4e4d0bf306459ac29323ddfbae05e35a7c0d35cb0803cc5" dependencies = [ "anyhow", - "itertools", + "itertools 0.13.0", "proc-macro2", "quote", "syn 2.0.89", @@ -3449,7 +3639,16 @@ version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0738ccf7ea06b608c10564b31debd4f5bc5e197fc8bfe088f68ae5ce81e7a4f1" dependencies = [ - "ptr_meta_derive", + "ptr_meta_derive 0.1.4", +] + +[[package]] +name = "ptr_meta" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fe9e76f66d3f9606f44e45598d155cb13ecf09f4a28199e48daf8c8fc937ea90" +dependencies = [ + "ptr_meta_derive 0.3.0", ] [[package]] @@ -3463,6 +3662,17 @@ dependencies = [ "syn 1.0.109", ] +[[package]] +name = "ptr_meta_derive" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ca414edb151b4c8d125c12566ab0d74dc9cdba36fb80eb7b848c15f495fd32d1" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.89", +] + [[package]] name = "quick-error" version = "1.2.3" @@ -3479,10 +3689,13 @@ dependencies = [ ] [[package]] -name = "radium" -version = "0.7.0" +name = "rancor" +version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc33ff2d4973d518d823d61aa239014831e521c75da58e3df4840d3f47749d09" +checksum = "caf5f7161924b9d1cea0e4cabc97c372cea92b5f927fc13c6bca67157a0ad947" +dependencies = [ + "ptr_meta 0.3.0", +] [[package]] name = "rand" @@ -3576,17 +3789,18 @@ checksum = "ba009ff324d1fc1b900bd1fdb31564febe58a8ccc8a6fdbb93b543d33b13ca43" dependencies = [ "getrandom", "libredox", - "thiserror", + "thiserror 1.0.69", ] [[package]] name = "regalloc2" -version = "0.5.1" +version = "0.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "300d4fbfb40c1c66a78ba3ddd41c1110247cf52f97b87d0f2fc9209bd49b030c" +checksum = "ad156d539c879b7a24a363a2016d77961786e71f48f2e2fc8302a92abd2429a6" dependencies = [ - "fxhash", + "hashbrown 0.13.2", "log", + "rustc-hash", "slice-group-by", "smallvec", ] @@ -3649,11 +3863,11 @@ dependencies = [ [[package]] name = "rend" -version = "0.4.2" +version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "71fe3824f5629716b1589be05dacd749f6aa084c87e00e016714a8cdfccc997c" +checksum = "a35e8a6bf28cd121053a66aa2e6a2e3eaffad4a60012179f0e864aa5ffeff215" dependencies = [ - "bytecheck", + "bytecheck 0.8.0", ] [[package]] @@ -3726,32 +3940,32 @@ dependencies = [ [[package]] name = "rkyv" -version = "0.7.45" +version = "0.8.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9008cd6385b9e161d8229e1f6549dd23c3d022f132a2ea37ac3a10ac4935779b" +checksum = "b11a153aec4a6ab60795f8ebe2923c597b16b05bb1504377451e705ef1a45323" dependencies = [ - "bitvec", - "bytecheck", + "bytecheck 0.8.0", "bytes", - "hashbrown 0.12.3", - "indexmap 1.9.3", - "ptr_meta", + "hashbrown 0.15.1", + "indexmap 2.7.0", + "munge", + "ptr_meta 0.3.0", + "rancor", "rend", "rkyv_derive", - "seahash", "tinyvec", "uuid", ] [[package]] name = "rkyv_derive" -version = "0.7.45" +version = "0.8.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "503d1d27590a2b0a3a4ca4c94755aa2875657196ecbf401a42eff41d7de532c0" +checksum = "beb382a4d9f53bd5c0be86b10d8179c3f8a14c30bf774ff77096ed6581e35981" dependencies = [ "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.89", ] [[package]] @@ -3781,6 +3995,12 @@ version = "0.1.24" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "719b953e2095829ee67db738b3bfa9fa368c94900df327b3f07fe6e794d2fe1f" +[[package]] +name = "rustc-hash" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" + [[package]] name = "rustc_version" version = "0.4.1" @@ -3817,10 +4037,11 @@ dependencies = [ [[package]] name = "rustls" -version = "0.23.18" +version = "0.23.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c9cc1d47e243d655ace55ed38201c19ae02c148ae56412ab8750e8f0166ab7f" +checksum = "5065c3f250cbd332cd894be57c40fa52387247659b14a2d6041d121547903b1b" dependencies = [ + "log", "once_cell", "ring", "rustls-pki-types", @@ -3880,6 +4101,17 @@ version = "1.0.18" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0e819f2bc632f285be6d7cd36e25940d45b2391dd6d9b939e79de557f7014248" +[[package]] +name = "ruzstd" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "58c4eb8a81997cf040a091d1f7e1938aeab6749d3a0dfa73af43cdc32393483d" +dependencies = [ + "byteorder", + "derive_more", + "twox-hash", +] + [[package]] name = "ryu" version = "1.0.18" @@ -4077,7 +4309,7 @@ dependencies = [ "chrono", "hex", "indexmap 1.9.3", - "indexmap 2.6.0", + "indexmap 2.7.0", "serde", "serde_derive", "serde_json", @@ -4176,6 +4408,12 @@ dependencies = [ "wide", ] +[[package]] +name = "simd-adler32" +version = "0.3.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d66dc143e6b11c1eddc06d5c423cfc97062865baf299914ab64caa38182078fe" + [[package]] name = "simdutf8" version = "0.1.5" @@ -4290,20 +4528,20 @@ dependencies = [ "hashbrown 0.14.5", "hashlink", "hex", - "indexmap 2.6.0", + "indexmap 2.7.0", "log", "memchr", "once_cell", "paste", "percent-encoding", - "rustls 0.23.18", + "rustls 0.23.20", "rustls-pemfile 2.2.0", "serde", "serde_json", "sha2", "smallvec", "sqlformat", - "thiserror", + "thiserror 1.0.69", "tokio", "tokio-stream", "tracing", @@ -4387,7 +4625,7 @@ dependencies = [ "smallvec", "sqlx-core", "stringprep", - "thiserror", + "thiserror 1.0.69", "tracing", "whoami", ] @@ -4425,7 +4663,7 @@ dependencies = [ "smallvec", "sqlx-core", "stringprep", - "thiserror", + "thiserror 1.0.69", "tracing", "whoami", ] @@ -4459,6 +4697,12 @@ version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3" +[[package]] +name = "static_assertions" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" + [[package]] name = "statrs" version = "0.17.1" @@ -4486,7 +4730,7 @@ dependencies = [ "parking_lot", "rand", "seahash", - "thiserror", + "thiserror 1.0.69", "tracing", "wg", "xxhash-rust", @@ -4584,12 +4828,6 @@ dependencies = [ "libc", ] -[[package]] -name = "tap" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "55937e1799185b12863d447f42597ed69d9928686b8d88a1df17376a097d8369" - [[package]] name = "tar" version = "0.4.43" @@ -4637,7 +4875,16 @@ version = "1.0.69" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b6aaf5339b578ea85b50e080feb250a3e8ae8cfcdff9a461c9ec2904bc923f52" dependencies = [ - "thiserror-impl", + "thiserror-impl 1.0.69", +] + +[[package]] +name = "thiserror" +version = "2.0.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f072643fd0190df67a8bab670c20ef5d8737177d6ac6b2e9a236cb096206b2cc" +dependencies = [ + "thiserror-impl 2.0.9", ] [[package]] @@ -4651,6 +4898,17 @@ dependencies = [ "syn 2.0.89", ] +[[package]] +name = "thiserror-impl" +version = "2.0.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7b50fa271071aae2e6ee85f842e2e28ba8cd2c5fb67f11fcb1fd70b276f9e7d4" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.89", +] + [[package]] name = "thread_local" version = "1.1.8" @@ -4794,7 +5052,7 @@ version = "0.26.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0c7bc40d0e5a97695bb96e27995cd3a08538541b0a846f65bba7a359f36700d4" dependencies = [ - "rustls 0.23.18", + "rustls 0.23.20", "rustls-pki-types", "tokio", ] @@ -4841,7 +5099,7 @@ version = "0.8.19" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a1ed1f98e3fdc28d6d910e6737ae6ab1a93bf1985935a1193e68f93eeb68d24e" dependencies = [ - "indexmap 2.6.0", + "indexmap 2.7.0", "serde", "serde_spanned", "toml_datetime", @@ -4863,7 +5121,7 @@ version = "0.22.22" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4ae48d6208a266e853d946088ed816055e556cc6028c5e8e2b84d9fa5dd7c7f5" dependencies = [ - "indexmap 2.6.0", + "indexmap 2.7.0", "serde", "serde_spanned", "toml_datetime", @@ -5093,10 +5351,20 @@ dependencies = [ "log", "rand", "sha1", - "thiserror", + "thiserror 1.0.69", "utf-8", ] +[[package]] +name = "twox-hash" +version = "1.6.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "97fee6b57c6a41524a810daee9286c02d7752c4253064d0b05472833a438f675" +dependencies = [ + "cfg-if", + "static_assertions", +] + [[package]] name = "typenum" version = "1.17.0" @@ -5154,6 +5422,12 @@ 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 = "unicode_categories" version = "0.1.1" @@ -5187,6 +5461,22 @@ version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" +[[package]] +name = "ureq" +version = "2.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "02d1a66277ed75f640d608235660df48c8e3c19f3b4edb6a263315626cc3c01d" +dependencies = [ + "base64 0.22.1", + "flate2", + "log", + "once_cell", + "rustls 0.23.20", + "rustls-pki-types", + "url", + "webpki-roots", +] + [[package]] name = "url" version = "2.5.4" @@ -5354,22 +5644,24 @@ checksum = "65fc09f10666a9f147042251e0dda9c18f166ff7de300607007e96bdebc1068d" [[package]] name = "wasm-encoder" -version = "0.32.0" +version = "0.222.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ba64e81215916eaeb48fee292f29401d69235d62d8b8fd92a7b2844ec5ae5f7" +checksum = "3432682105d7e994565ef928ccf5856cf6af4ba3dddebedb737f61caed70f956" dependencies = [ "leb128", + "wasmparser 0.222.0", ] [[package]] name = "wasmer" -version = "4.4.0" +version = "5.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d920d06243e9f456c336c428a34560357dedf59d9febaae14f1995ac120cff6" +checksum = "998dea47d6bb6a8fc7dd8a17b13bf8de277e007229f270c67105cb67fc2d9657" dependencies = [ + "bindgen", "bytes", "cfg-if", - "derivative", + "cmake", "indexmap 1.9.3", "js-sys", "more-asserts", @@ -5377,9 +5669,11 @@ dependencies = [ "serde", "serde-wasm-bindgen 0.4.5", "shared-buffer", + "tar", "target-lexicon", - "thiserror", + "thiserror 1.0.69", "tracing", + "ureq", "wasm-bindgen", "wasmer-compiler", "wasmer-compiler-cranelift", @@ -5388,13 +5682,15 @@ dependencies = [ "wasmer-vm", "wat", "windows-sys 0.59.0", + "xz", + "zip", ] [[package]] name = "wasmer-compiler" -version = "4.4.0" +version = "5.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0e01832173aa52345e480965f18c638a8a5a9e5e4d85a48675bdf1964147dc7f" +checksum = "082f48ba006cce2358f6c63d8dba732c9d12ba5833008c9ff2944290eb72c3dc" dependencies = [ "backtrace", "bytes", @@ -5406,29 +5702,32 @@ dependencies = [ "libc", "memmap2", "more-asserts", + "object 0.32.2", "region", "rkyv", "self_cell", "shared-buffer", "smallvec", - "thiserror", + "target-lexicon", + "thiserror 1.0.69", "wasmer-types", "wasmer-vm", - "wasmparser", + "wasmparser 0.216.0", "windows-sys 0.59.0", "xxhash-rust", ] [[package]] name = "wasmer-compiler-cranelift" -version = "4.4.0" +version = "5.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1c1618f53b492cf6649beeb372930e376e0f52d9842c0c5eb5aa2b548251dab6" +checksum = "0272ad7daf59d43419cda9ae58b9cf8df6a115c8632fbb91c600892dff52f7a8" dependencies = [ "cranelift-codegen", "cranelift-entity", "cranelift-frontend", - "gimli 0.26.2", + "gimli 0.28.1", + "itertools 0.12.1", "more-asserts", "rayon", "smallvec", @@ -5440,11 +5739,11 @@ dependencies = [ [[package]] name = "wasmer-derive" -version = "4.4.0" +version = "5.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c5875633aea92153b6a561cb07363785ca9e07792ca6cd7c1cc371761001d8f" +checksum = "87b16fa0b2199083143705698ea9fc2ffd0328d7061f54e0e20ccd0ec2020466" dependencies = [ - "proc-macro-error", + "proc-macro-error2", "proc-macro2", "quote", "syn 1.0.109", @@ -5452,29 +5751,29 @@ dependencies = [ [[package]] name = "wasmer-types" -version = "4.4.0" +version = "5.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8fb32f0d231b591e4c8a65e81d4647fa3180496d71a123d4948dba8551bba9c2" +checksum = "41b0b9b3242c1a6269e544401b1741a56502a5f79db8e1b318cacf1b34b2690d" dependencies = [ - "bytecheck", + "bytecheck 0.6.12", "enum-iterator", "enumset", "getrandom", "hex", - "indexmap 1.9.3", + "indexmap 2.7.0", "more-asserts", "rkyv", "sha2", "target-lexicon", - "thiserror", + "thiserror 1.0.69", "xxhash-rust", ] [[package]] name = "wasmer-vm" -version = "4.4.0" +version = "5.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e38e9301f5bb9f18da9cda4002d74d2cb6ac1f36dcf919fd77f91fca321fb1e5" +checksum = "92c7f8dbaceb0ab7901702e3c2bb43b09d2635aaa5ad39679c6560bcb9acde7c" dependencies = [ "backtrace", "cc", @@ -5482,10 +5781,9 @@ dependencies = [ "corosensei", "crossbeam-queue", "dashmap", - "derivative", "enum-iterator", "fnv", - "indexmap 1.9.3", + "indexmap 2.7.0", "lazy_static", "libc", "mach2", @@ -5493,39 +5791,53 @@ dependencies = [ "more-asserts", "region", "scopeguard", - "thiserror", + "thiserror 1.0.69", "wasmer-types", "windows-sys 0.59.0", ] [[package]] name = "wasmparser" -version = "0.121.2" +version = "0.216.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9dbe55c8f9d0dbd25d9447a5a889ff90c0cc3feaa7395310d3d826b2c703eaab" +checksum = "bcdee6bea3619d311fb4b299721e89a986c3470f804b6d534340e412589028e3" dependencies = [ + "ahash", "bitflags 2.6.0", - "indexmap 2.6.0", + "hashbrown 0.14.5", + "indexmap 2.7.0", + "semver", +] + +[[package]] +name = "wasmparser" +version = "0.222.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4adf50fde1b1a49c1add6a80d47aea500c88db70551805853aa8b88f3ea27ab5" +dependencies = [ + "bitflags 2.6.0", + "indexmap 2.7.0", "semver", ] [[package]] name = "wast" -version = "64.0.0" +version = "222.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a259b226fd6910225aa7baeba82f9d9933b6d00f2ce1b49b80fa4214328237cc" +checksum = "5ce7191f4b7da0dd300cc32476abae6457154e4625d9b1bc26890828a9a26f6e" dependencies = [ + "bumpalo", "leb128", "memchr", - "unicode-width", + "unicode-width 0.2.0", "wasm-encoder", ] [[package]] name = "wat" -version = "1.0.71" +version = "1.222.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53253d920ab413fca1c7dc2161d601c79b4fdf631d0ba51dd4343bf9b556c3f6" +checksum = "8fde61b4b52f9a84ae31b5e8902a2cd3162ea45d8bf564c729c3288fe52f4334" dependencies = [ "wast", ] @@ -5668,19 +5980,6 @@ dependencies = [ "windows-targets 0.52.6", ] -[[package]] -name = "windows-sys" -version = "0.33.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43dbb096663629518eb1dfa72d80243ca5a6aca764cae62a2df70af760a9be75" -dependencies = [ - "windows_aarch64_msvc 0.33.0", - "windows_i686_gnu 0.33.0", - "windows_i686_msvc 0.33.0", - "windows_x86_64_gnu 0.33.0", - "windows_x86_64_msvc 0.33.0", -] - [[package]] name = "windows-sys" version = "0.48.0" @@ -5751,12 +6050,6 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" -[[package]] -name = "windows_aarch64_msvc" -version = "0.33.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cd761fd3eb9ab8cc1ed81e56e567f02dd82c4c837e48ac3b2181b9ffc5060807" - [[package]] name = "windows_aarch64_msvc" version = "0.48.5" @@ -5769,12 +6062,6 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" -[[package]] -name = "windows_i686_gnu" -version = "0.33.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cab0cf703a96bab2dc0c02c0fa748491294bf9b7feb27e1f4f96340f208ada0e" - [[package]] name = "windows_i686_gnu" version = "0.48.5" @@ -5793,12 +6080,6 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" -[[package]] -name = "windows_i686_msvc" -version = "0.33.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8cfdbe89cc9ad7ce618ba34abc34bbb6c36d99e96cae2245b7943cd75ee773d0" - [[package]] name = "windows_i686_msvc" version = "0.48.5" @@ -5811,12 +6092,6 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" -[[package]] -name = "windows_x86_64_gnu" -version = "0.33.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4dd9b0c0e9ece7bb22e84d70d01b71c6d6248b81a3c60d11869451b4cb24784" - [[package]] name = "windows_x86_64_gnu" version = "0.48.5" @@ -5841,12 +6116,6 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" -[[package]] -name = "windows_x86_64_msvc" -version = "0.33.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff1e4aa646495048ec7f3ffddc411e1d829c026a2ec62b39da15c1055e406eaa" - [[package]] name = "windows_x86_64_msvc" version = "0.48.5" @@ -5890,15 +6159,6 @@ version = "0.5.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1e9df38ee2d2c3c5948ea468a8406ff0db0b29ae1ffde1bcf20ef305bcc95c51" -[[package]] -name = "wyz" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05f360fc0b24296329c78fda852a1e9ae82de9cf7b27dae4b7f62f118f77b9ed" -dependencies = [ - "tap", -] - [[package]] name = "xattr" version = "1.3.1" @@ -5916,6 +6176,15 @@ version = "0.8.12" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6a5cbf750400958819fb6178eaa83bee5cd9c29a26a40cc241df8c70fdd46984" +[[package]] +name = "xz" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3c887690ff2a2e233e8e49633461521f98ec57fbff9d59a884c9a4f04ec1da34" +dependencies = [ + "xz2", +] + [[package]] name = "xz2" version = "0.1.7" @@ -5996,6 +6265,20 @@ name = "zeroize" version = "1.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ced3678a2879b30306d323f4542626697a464a97c0a07c9aebf7ebca65cd4dde" +dependencies = [ + "zeroize_derive", +] + +[[package]] +name = "zeroize_derive" +version = "1.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.89", +] [[package]] name = "zerovec" @@ -6018,3 +6301,74 @@ dependencies = [ "quote", "syn 2.0.89", ] + +[[package]] +name = "zip" +version = "2.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ae9c1ea7b3a5e1f4b922ff856a129881167511563dc219869afe3787fc0c1a45" +dependencies = [ + "aes", + "arbitrary", + "bzip2", + "constant_time_eq", + "crc32fast", + "crossbeam-utils", + "deflate64", + "displaydoc", + "flate2", + "hmac", + "indexmap 2.7.0", + "lzma-rs", + "memchr", + "pbkdf2", + "rand", + "sha1", + "thiserror 2.0.9", + "time", + "zeroize", + "zopfli", + "zstd", +] + +[[package]] +name = "zopfli" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e5019f391bac5cf252e93bbcc53d039ffd62c7bfb7c150414d61369afe57e946" +dependencies = [ + "bumpalo", + "crc32fast", + "lockfree-object-pool", + "log", + "once_cell", + "simd-adler32", +] + +[[package]] +name = "zstd" +version = "0.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fcf2b778a664581e31e389454a7072dab1647606d44f7feea22cd5abb9c9f3f9" +dependencies = [ + "zstd-safe", +] + +[[package]] +name = "zstd-safe" +version = "7.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "54a3ab4db68cea366acc5c897c7b4d4d1b8994a9cd6e6f841f8964566a419059" +dependencies = [ + "zstd-sys", +] + +[[package]] +name = "zstd-sys" +version = "2.0.13+zstd.1.5.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "38ff0f21cfee8f97d94cef41359e0c89aa6113028ab0291aa8ca0038995a95aa" +dependencies = [ + "cc", + "pkg-config", +] diff --git a/Cargo.toml b/Cargo.toml index 7a3233331..3ed2ca875 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -27,7 +27,7 @@ serde_json = "1" serde_with = "3" tracing = "0.1" tracing-subscriber = "0.3" -wasmer = "4.3" +wasmer = "5.0.4" freenet-stdlib = { path = "./stdlib/rust/", features = ["unstable"] } # freenet-stdlib = { version = "0.0.8" } From 10a84601fe605a162c0fd4547045232db843a182 Mon Sep 17 00:00:00 2001 From: "Ian Clarke (aider)" Date: Thu, 26 Dec 2024 14:49:05 -0600 Subject: [PATCH 02/49] fix: Add type annotation for `req_pages` to resolve Rust type inference error --- crates/core/src/wasm_runtime/runtime.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/core/src/wasm_runtime/runtime.rs b/crates/core/src/wasm_runtime/runtime.rs index 0015c0bff..df25dfb32 100644 --- a/crates/core/src/wasm_runtime/runtime.rs +++ b/crates/core/src/wasm_runtime/runtime.rs @@ -230,7 +230,7 @@ impl Runtime { .as_ref() .map(Ok) .unwrap_or_else(|| instance.exports.get_memory("memory"))?; - let req_pages = Bytes::from(req_bytes).try_into().unwrap(); + let req_pages: wasmer::Pages = Bytes::from(req_bytes).try_into().unwrap(); if memory.view(&self.wasm_store).size() < req_pages { if let Err(err) = memory.grow(&mut self.wasm_store, req_pages) { tracing::error!("wasm runtime failed with memory error: {err}"); From d68eb073da020f6b4858340e3ccb11dbc68a73b7 Mon Sep 17 00:00:00 2001 From: Ian Clarke Date: Thu, 26 Dec 2024 14:53:37 -0600 Subject: [PATCH 03/49] attempt to fix CI --- .gitignore | 4 +- Cargo.lock | 836 ++++++++++++++++++++++++++++++++++++++--------------- Cargo.toml | 2 +- stdlib | 2 +- 4 files changed, 598 insertions(+), 246 deletions(-) diff --git a/.gitignore b/.gitignore index 6f147c2cd..ede5bc90f 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,3 @@ -# Aider AI coding tool -.aider.* - ### Rust ### # Generated by Cargo # will have compiled files and executables @@ -27,3 +24,4 @@ config.toml .rustc* rustc-ice*.txt +.aider* diff --git a/Cargo.lock b/Cargo.lock index 2a8330b1f..7eaf650de 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -52,17 +52,6 @@ dependencies = [ "subtle", ] -[[package]] -name = "ahash" -version = "0.7.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "891477e0c6a8957309ee5c45a6368af3ae14bb510732d2684ffa19af310920f9" -dependencies = [ - "getrandom", - "once_cell", - "version_check", -] - [[package]] name = "ahash" version = "0.8.11" @@ -391,7 +380,7 @@ dependencies = [ "cfg-if", "libc", "miniz_oxide", - "object", + "object 0.36.5", "rustc-demangle", "windows-targets 0.52.6", ] @@ -423,6 +412,26 @@ dependencies = [ "serde", ] +[[package]] +name = "bindgen" +version = "0.70.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f49d8fed880d473ea71efb9bf597651e77201bdd4893efe54c9e5d65ae04ce6f" +dependencies = [ + "bitflags 2.6.0", + "cexpr", + "clang-sys", + "itertools 0.13.0", + "log", + "prettyplease", + "proc-macro2", + "quote", + "regex", + "rustc-hash", + "shlex", + "syn 2.0.89", +] + [[package]] name = "bitflags" version = "1.3.2" @@ -438,18 +447,6 @@ dependencies = [ "serde", ] -[[package]] -name = "bitvec" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1bc2832c24239b0141d5674bb9174f9d68a8b5b3f2753311927c172ca46f7e9c" -dependencies = [ - "funty", - "radium", - "tap", - "wyz", -] - [[package]] name = "blake3" version = "1.5.4" @@ -494,8 +491,20 @@ version = "0.6.12" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "23cdc57ce23ac53c931e88a43d06d070a6fd142f2617be5855eb75efc9beb1c2" dependencies = [ - "bytecheck_derive", - "ptr_meta", + "bytecheck_derive 0.6.12", + "ptr_meta 0.1.4", + "simdutf8", +] + +[[package]] +name = "bytecheck" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "50c8f430744b23b54ad15161fcbc22d82a29b73eacbe425fea23ec822600bc6f" +dependencies = [ + "bytecheck_derive 0.8.0", + "ptr_meta 0.3.0", + "rancor", "simdutf8", ] @@ -510,6 +519,17 @@ dependencies = [ "syn 1.0.109", ] +[[package]] +name = "bytecheck_derive" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "523363cbe1df49b68215efdf500b103ac3b0fb4836aed6d15689a076eadb8fff" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.89", +] + [[package]] name = "bytemuck" version = "1.20.0" @@ -528,6 +548,27 @@ version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9ac0150caa2ae65ca5bd83f25c7de183dea78d4d366469f148435e2acfbad0da" +[[package]] +name = "bzip2" +version = "0.4.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bdb116a6ef3f6c3698828873ad02c3014b3c85cadb88496095628e3ef1e347f8" +dependencies = [ + "bzip2-sys", + "libc", +] + +[[package]] +name = "bzip2-sys" +version = "0.1.11+1.0.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "736a955f3fa7875102d57c82b8cac37ec45224a07fd32d58f9f7a186b6cd4cdc" +dependencies = [ + "cc", + "libc", + "pkg-config", +] + [[package]] name = "cache-padded" version = "1.3.0" @@ -546,9 +587,20 @@ version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fd9de9f2205d5ef3fd67e685b0df337994ddd4495e2a28d185500d0e1edfea47" dependencies = [ + "jobserver", + "libc", "shlex", ] +[[package]] +name = "cexpr" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6fac387a98bb7c37292057cffc56d62ecb629900026402633ae9160df93a8766" +dependencies = [ + "nom", +] + [[package]] name = "cfg-if" version = "1.0.0" @@ -612,6 +664,17 @@ dependencies = [ "zeroize", ] +[[package]] +name = "clang-sys" +version = "1.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b023947811758c97c59bf9d1c188fd619ad4718dcaa767947df1cadb14f39f4" +dependencies = [ + "glob", + "libc", + "libloading", +] + [[package]] name = "clap" version = "4.5.21" @@ -652,6 +715,15 @@ version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "afb84c814227b90d6895e01398aee0d8033c00e7466aca416fb6a8e0eb19d8a7" +[[package]] +name = "cmake" +version = "0.1.52" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c682c223677e0e5b6b7f63a64b9351844c3f1b1678a68b7ee617e30fb082620e" +dependencies = [ + "cc", +] + [[package]] name = "colorchoice" version = "1.0.3" @@ -708,15 +780,15 @@ checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b" [[package]] name = "corosensei" -version = "0.1.4" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "80128832c58ea9cbd041d2a759ec449224487b2c1e400453d99d244eead87a8e" +checksum = "ad067b451c08956709f8762dba86e049c124ea52858e3ab8d076ba2892caa437" dependencies = [ "autocfg", "cfg-if", "libc", "scopeguard", - "windows-sys 0.33.0", + "windows-sys 0.59.0", ] [[package]] @@ -730,74 +802,80 @@ dependencies = [ [[package]] name = "cranelift-bforest" -version = "0.91.1" +version = "0.110.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a2ab4512dfd3a6f4be184403a195f76e81a8a9f9e6c898e19d2dc3ce20e0115" +checksum = "305d51c180ebdc46ef61bc60c54ae6512db3bc9a05842a1f1e762e45977019ab" dependencies = [ "cranelift-entity", ] +[[package]] +name = "cranelift-bitset" +version = "0.110.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "690d8ae6c73748e5ce3d8fe59034dceadb8823e6c8994ba324141c5eae909b0e" + [[package]] name = "cranelift-codegen" -version = "0.91.1" +version = "0.110.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "98b022ed2a5913a38839dfbafe6cf135342661293b08049843362df4301261dc" +checksum = "bd7ca95e831c18d1356da783765c344207cbdffea91e13e47fa9327dbb2e0719" dependencies = [ - "arrayvec", "bumpalo", "cranelift-bforest", + "cranelift-bitset", "cranelift-codegen-meta", "cranelift-codegen-shared", - "cranelift-egraph", + "cranelift-control", "cranelift-entity", "cranelift-isle", - "gimli 0.26.2", + "gimli 0.28.1", + "hashbrown 0.14.5", "log", "regalloc2", + "rustc-hash", "smallvec", "target-lexicon", ] [[package]] name = "cranelift-codegen-meta" -version = "0.91.1" +version = "0.110.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "639307b45434ad112a98f8300c0f0ab085cbefcd767efcdef9ef19d4c0756e74" +checksum = "f0a2d2ab65e6cbf91f81781d8da65ec2005510f18300eff21a99526ed6785863" dependencies = [ "cranelift-codegen-shared", ] [[package]] name = "cranelift-codegen-shared" -version = "0.91.1" +version = "0.110.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "278e52e29c53fcf32431ef08406c295699a70306d05a0715c5b1bf50e33a9ab7" +checksum = "efcff860573cf3db9ae98fbd949240d78b319df686cc306872e7fab60e9c84d7" [[package]] -name = "cranelift-egraph" -version = "0.91.1" +name = "cranelift-control" +version = "0.110.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "624b54323b06e675293939311943ba82d323bb340468ce1889be5da7932c8d73" +checksum = "69d70e5b75c2d5541ef80a99966ccd97aaa54d2a6af19ea31759a28538e1685a" dependencies = [ - "cranelift-entity", - "fxhash", - "hashbrown 0.12.3", - "indexmap 1.9.3", - "log", - "smallvec", + "arbitrary", ] [[package]] name = "cranelift-entity" -version = "0.91.1" +version = "0.110.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a59bcbca89c3f1b70b93ab3cbba5e5e0cbf3e63dadb23c7525cb142e21a9d4c" +checksum = "a48cb0a194c9ba82fec35a1e492055388d89b2e3c03dee9dcf2488892be8004d" +dependencies = [ + "cranelift-bitset", +] [[package]] name = "cranelift-frontend" -version = "0.91.1" +version = "0.110.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d70abacb8cfef3dc8ff7e8836e9c1d70f7967dfdac824a4cd5e30223415aca6" +checksum = "8327afc6c1c05f4be62fefce5b439fa83521c65363a322e86ea32c85e7ceaf64" dependencies = [ "cranelift-codegen", "log", @@ -807,9 +885,9 @@ dependencies = [ [[package]] name = "cranelift-isle" -version = "0.91.1" +version = "0.110.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "393bc73c451830ff8dbb3a07f61843d6cb41a084f9996319917c0b291ed785bb" +checksum = "56b08621c00321efcfa3eee6a3179adc009e21ea8d24ca7adc3c326184bc3f48" [[package]] name = "crc" @@ -826,6 +904,15 @@ version = "2.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "19d374276b40fb8bbdee95aef7c7fa6b5316ec764510eb64b8dd0e2ed0d7e7f5" +[[package]] +name = "crc32fast" +version = "1.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a97769d94ddab943e4510d138150169a2758b5ef3eb191a9ee688de3e23ef7b3" +dependencies = [ + "cfg-if", +] + [[package]] name = "crossbeam" version = "0.8.4" @@ -1018,6 +1105,12 @@ version = "2.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e8566979429cf69b49a5c740c60791108e86440e8be149bbea4fe54d2c32d6e2" +[[package]] +name = "deflate64" +version = "0.1.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "da692b8d1080ea3045efaab14434d40468c3d8657e42abddfffca87b428f4c1b" + [[package]] name = "delegate" version = "0.13.1" @@ -1051,21 +1144,21 @@ dependencies = [ ] [[package]] -name = "derivative" -version = "2.2.0" +name = "derive_arbitrary" +version = "1.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fcc3dd5e9e9c0b295d6e1e4d811fb6f157d5ffd784b8d202fc62eac8035a770b" +checksum = "30542c1ad912e0e3d22a1935c290e12e8a29d704a420177a31faad4a601a0800" dependencies = [ "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.89", ] [[package]] -name = "derive_arbitrary" -version = "1.4.1" +name = "derive_more" +version = "0.99.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "30542c1ad912e0e3d22a1935c290e12e8a29d704a420177a31faad4a601a0800" +checksum = "5f33878137e4dafd7fa914ad4e259e18a4e8e532b9617a2d0150262bf53abfce" dependencies = [ "proc-macro2", "quote", @@ -1278,9 +1371,9 @@ dependencies = [ [[package]] name = "fallible-iterator" -version = "0.2.0" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4443176a9f2c162692bd3d352d745ef9413eec5782a80d8fd6f8a1ac692a07f7" +checksum = "2acce4a10f12dc2fb14a218589d4f1f62ef011b2d0cc4b3cb1bba8e94da14649" [[package]] name = "fastrand" @@ -1323,7 +1416,7 @@ dependencies = [ "serde_json", "serde_with", "tar", - "thiserror", + "thiserror 1.0.69", "tokio", "tokio-tungstenite", "toml", @@ -1354,6 +1447,16 @@ dependencies = [ "rustc_version", ] +[[package]] +name = "flate2" +version = "1.0.35" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c936bfdafb507ebbf50b8074c54fa31c5be9a1e7e5f467dd659697041407d07c" +dependencies = [ + "crc32fast", + "miniz_oxide", +] + [[package]] name = "flume" version = "0.11.1" @@ -1426,7 +1529,7 @@ dependencies = [ "futures", "headers", "hickory-resolver", - "itertools", + "itertools 0.13.0", "notify", "once_cell", "opentelemetry 0.26.0", @@ -1451,7 +1554,7 @@ dependencies = [ "stretto", "tar", "tempfile", - "thiserror", + "thiserror 1.0.69", "time", "tokio", "tokio-tungstenite", @@ -1535,7 +1638,7 @@ dependencies = [ "serde_bytes", "serde_json", "serde_with", - "thiserror", + "thiserror 1.0.69", "tokio", "tokio-tungstenite", "tracing", @@ -1554,12 +1657,6 @@ dependencies = [ "libc", ] -[[package]] -name = "funty" -version = "2.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6d5a32815ae3f33302d95fdcb2ce17862f8c65363dcfd29360480ba1001fc9c" - [[package]] name = "futures" version = "0.3.31" @@ -1685,15 +1782,6 @@ dependencies = [ "slab", ] -[[package]] -name = "fxhash" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c31b6d751ae2c7f11320402d34e41349dd1016f8d5d45e48c4312bc8625af50c" -dependencies = [ - "byteorder", -] - [[package]] name = "generic-array" version = "0.14.7" @@ -1729,12 +1817,12 @@ dependencies = [ [[package]] name = "gimli" -version = "0.26.2" +version = "0.28.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22030e2c5a68ec659fde1e949a745124b48e6fa8b045b7ed5bd1fe4ccc5c4e5d" +checksum = "4271d37baee1b8c7e4b708028c57d816cf9d2434acb33a549475f78c181f6253" dependencies = [ "fallible-iterator", - "indexmap 1.9.3", + "indexmap 2.7.0", "stable_deref_trait", ] @@ -1762,7 +1850,7 @@ dependencies = [ "futures-core", "futures-sink", "http 1.1.0", - "indexmap 2.6.0", + "indexmap 2.7.0", "slab", "tokio", "tokio-util", @@ -1774,8 +1862,14 @@ name = "hashbrown" version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" + +[[package]] +name = "hashbrown" +version = "0.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "43a3c133739dddd0d2990f9a4bdf8eb4b21ef50e4851ca85ab661199821d510e" dependencies = [ - "ahash 0.7.8", + "ahash", ] [[package]] @@ -1784,7 +1878,7 @@ version = "0.14.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1" dependencies = [ - "ahash 0.8.11", + "ahash", "allocator-api2", ] @@ -1870,7 +1964,7 @@ dependencies = [ "rand", "rustls 0.21.12", "rustls-pemfile 1.0.4", - "thiserror", + "thiserror 1.0.69", "tinyvec", "tokio", "tokio-rustls 0.24.1", @@ -1895,7 +1989,7 @@ dependencies = [ "resolv-conf", "rustls 0.21.12", "smallvec", - "thiserror", + "thiserror 1.0.69", "tokio", "tokio-rustls 0.24.1", "tracing", @@ -2049,7 +2143,7 @@ dependencies = [ "http 1.1.0", "hyper", "hyper-util", - "rustls 0.23.18", + "rustls 0.23.20", "rustls-pki-types", "tokio", "tokio-rustls 0.26.0", @@ -2295,9 +2389,9 @@ dependencies = [ [[package]] name = "indexmap" -version = "2.6.0" +version = "2.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "707907fe3c25f5424cce2cb7e1cbcafee6bdbe735ca90ef77c29e84591e5b9da" +checksum = "62f822373a4fe84d4bb149bf54e584a7f4abec90e072ed49cda0edea5b95471f" dependencies = [ "equivalent", "hashbrown 0.15.1", @@ -2408,6 +2502,15 @@ dependencies = [ "waker-fn", ] +[[package]] +name = "itertools" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba291022dbbd398a455acf126c1e341954079855bc60dfdda641363bd6922569" +dependencies = [ + "either", +] + [[package]] name = "itertools" version = "0.13.0" @@ -2423,6 +2526,15 @@ version = "1.0.13" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "540654e97a3f4470a492cd30ff187bc95d89557a903a2bbf112e2fae98104ef2" +[[package]] +name = "jobserver" +version = "0.1.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "48d1dbcbbeb6a7fec7e059840aa538bd62aaccf972c7346c4d9d2059312853d0" +dependencies = [ + "libc", +] + [[package]] name = "js-sys" version = "0.3.72" @@ -2473,6 +2585,16 @@ version = "0.2.164" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "433bfe06b8c75da9b2e3fbea6e5329ff87748f0b144ef75306e674c3f6f7c13f" +[[package]] +name = "libloading" +version = "0.8.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fc2f4eb4bc735547cfed7c0a4922cbd04a4655978c09b54f1f7b228750664c34" +dependencies = [ + "cfg-if", + "windows-targets 0.52.6", +] + [[package]] name = "libm" version = "0.2.11" @@ -2541,6 +2663,12 @@ dependencies = [ "scopeguard", ] +[[package]] +name = "lockfree-object-pool" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9374ef4228402d4b7e403e5838cb880d9ee663314b0a900d5a6aabf0c213552e" + [[package]] name = "log" version = "0.4.22" @@ -2556,6 +2684,16 @@ dependencies = [ "linked-hash-map", ] +[[package]] +name = "lzma-rs" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "297e814c836ae64db86b36cf2a557ba54368d03f6afcd7d947c266692f71115e" +dependencies = [ + "byteorder", + "crc", +] + [[package]] name = "lzma-sys" version = "0.1.20" @@ -2702,6 +2840,26 @@ version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7843ec2de400bcbc6a6328c958dc38e5359da6e93e72e37bc5246bf1ae776389" +[[package]] +name = "munge" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "64142d38c84badf60abf06ff9bd80ad2174306a5b11bd4706535090a30a419df" +dependencies = [ + "munge_macro", +] + +[[package]] +name = "munge_macro" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1bb5c1d8184f13f7d0ccbeeca0def2f9a181bce2624302793005f5ca8aa62e5e" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.89", +] + [[package]] name = "nalgebra" version = "0.32.6" @@ -2891,6 +3049,20 @@ dependencies = [ "libc", ] +[[package]] +name = "object" +version = "0.32.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a6a622008b6e321afc04970976f62ee297fdbaa6f95318ca343e3eebb9648441" +dependencies = [ + "crc32fast", + "flate2", + "hashbrown 0.14.5", + "indexmap 2.7.0", + "memchr", + "ruzstd", +] + [[package]] name = "object" version = "0.36.5" @@ -2967,7 +3139,7 @@ dependencies = [ "js-sys", "once_cell", "pin-project-lite", - "thiserror", + "thiserror 1.0.69", ] [[package]] @@ -2981,7 +3153,7 @@ dependencies = [ "js-sys", "once_cell", "pin-project-lite", - "thiserror", + "thiserror 1.0.69", ] [[package]] @@ -2995,7 +3167,7 @@ dependencies = [ "js-sys", "once_cell", "pin-project-lite", - "thiserror", + "thiserror 1.0.69", ] [[package]] @@ -3042,7 +3214,7 @@ dependencies = [ "opentelemetry-proto", "opentelemetry_sdk 0.26.0", "prost", - "thiserror", + "thiserror 1.0.69", "tokio", "tonic", ] @@ -3081,7 +3253,7 @@ dependencies = [ "ordered-float 4.5.0", "percent-encoding", "rand", - "thiserror", + "thiserror 1.0.69", "tokio", "tokio-stream", ] @@ -3101,7 +3273,7 @@ dependencies = [ "opentelemetry 0.25.0", "percent-encoding", "rand", - "thiserror", + "thiserror 1.0.69", ] [[package]] @@ -3120,7 +3292,7 @@ dependencies = [ "percent-encoding", "rand", "serde_json", - "thiserror", + "thiserror 1.0.69", "tokio", "tokio-stream", ] @@ -3209,6 +3381,16 @@ dependencies = [ "serde", ] +[[package]] +name = "pbkdf2" +version = "0.12.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8ed6a7761f76e3b9f92dfb0a60a6a6477c61024b775147ff0973a02653abaf2" +dependencies = [ + "digest", + "hmac", +] + [[package]] name = "pem-rfc7468" version = "0.7.0" @@ -3373,6 +3555,16 @@ dependencies = [ "zerocopy", ] +[[package]] +name = "prettyplease" +version = "0.2.25" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "64d1ec885c64d0457d564db4ec299b2dae3f9c02808b8ad9c3a089c591b18033" +dependencies = [ + "proc-macro2", + "syn 2.0.89", +] + [[package]] name = "prettytable-rs" version = "0.10.0" @@ -3384,31 +3576,29 @@ dependencies = [ "is-terminal", "lazy_static", "term", - "unicode-width", + "unicode-width 0.1.14", ] [[package]] -name = "proc-macro-error" -version = "1.0.4" +name = "proc-macro-error-attr2" +version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c" +checksum = "96de42df36bb9bba5542fe9f1a054b8cc87e172759a1868aa05c1f3acc89dfc5" dependencies = [ - "proc-macro-error-attr", "proc-macro2", "quote", - "syn 1.0.109", - "version_check", ] [[package]] -name = "proc-macro-error-attr" -version = "1.0.4" +name = "proc-macro-error2" +version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869" +checksum = "11ec05c52be0a07b08061f7dd003e7d7092e0472bc731b4af7bb1ef876109802" dependencies = [ + "proc-macro-error-attr2", "proc-macro2", "quote", - "version_check", + "syn 2.0.89", ] [[package]] @@ -3437,7 +3627,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e9552f850d5f0964a4e4d0bf306459ac29323ddfbae05e35a7c0d35cb0803cc5" dependencies = [ "anyhow", - "itertools", + "itertools 0.13.0", "proc-macro2", "quote", "syn 2.0.89", @@ -3449,7 +3639,16 @@ version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0738ccf7ea06b608c10564b31debd4f5bc5e197fc8bfe088f68ae5ce81e7a4f1" dependencies = [ - "ptr_meta_derive", + "ptr_meta_derive 0.1.4", +] + +[[package]] +name = "ptr_meta" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fe9e76f66d3f9606f44e45598d155cb13ecf09f4a28199e48daf8c8fc937ea90" +dependencies = [ + "ptr_meta_derive 0.3.0", ] [[package]] @@ -3463,6 +3662,17 @@ dependencies = [ "syn 1.0.109", ] +[[package]] +name = "ptr_meta_derive" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ca414edb151b4c8d125c12566ab0d74dc9cdba36fb80eb7b848c15f495fd32d1" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.89", +] + [[package]] name = "quick-error" version = "1.2.3" @@ -3479,10 +3689,13 @@ dependencies = [ ] [[package]] -name = "radium" -version = "0.7.0" +name = "rancor" +version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc33ff2d4973d518d823d61aa239014831e521c75da58e3df4840d3f47749d09" +checksum = "caf5f7161924b9d1cea0e4cabc97c372cea92b5f927fc13c6bca67157a0ad947" +dependencies = [ + "ptr_meta 0.3.0", +] [[package]] name = "rand" @@ -3576,17 +3789,18 @@ checksum = "ba009ff324d1fc1b900bd1fdb31564febe58a8ccc8a6fdbb93b543d33b13ca43" dependencies = [ "getrandom", "libredox", - "thiserror", + "thiserror 1.0.69", ] [[package]] name = "regalloc2" -version = "0.5.1" +version = "0.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "300d4fbfb40c1c66a78ba3ddd41c1110247cf52f97b87d0f2fc9209bd49b030c" +checksum = "ad156d539c879b7a24a363a2016d77961786e71f48f2e2fc8302a92abd2429a6" dependencies = [ - "fxhash", + "hashbrown 0.13.2", "log", + "rustc-hash", "slice-group-by", "smallvec", ] @@ -3649,11 +3863,11 @@ dependencies = [ [[package]] name = "rend" -version = "0.4.2" +version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "71fe3824f5629716b1589be05dacd749f6aa084c87e00e016714a8cdfccc997c" +checksum = "a35e8a6bf28cd121053a66aa2e6a2e3eaffad4a60012179f0e864aa5ffeff215" dependencies = [ - "bytecheck", + "bytecheck 0.8.0", ] [[package]] @@ -3726,32 +3940,32 @@ dependencies = [ [[package]] name = "rkyv" -version = "0.7.45" +version = "0.8.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9008cd6385b9e161d8229e1f6549dd23c3d022f132a2ea37ac3a10ac4935779b" +checksum = "b11a153aec4a6ab60795f8ebe2923c597b16b05bb1504377451e705ef1a45323" dependencies = [ - "bitvec", - "bytecheck", + "bytecheck 0.8.0", "bytes", - "hashbrown 0.12.3", - "indexmap 1.9.3", - "ptr_meta", + "hashbrown 0.15.1", + "indexmap 2.7.0", + "munge", + "ptr_meta 0.3.0", + "rancor", "rend", "rkyv_derive", - "seahash", "tinyvec", "uuid", ] [[package]] name = "rkyv_derive" -version = "0.7.45" +version = "0.8.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "503d1d27590a2b0a3a4ca4c94755aa2875657196ecbf401a42eff41d7de532c0" +checksum = "beb382a4d9f53bd5c0be86b10d8179c3f8a14c30bf774ff77096ed6581e35981" dependencies = [ "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.89", ] [[package]] @@ -3781,6 +3995,12 @@ version = "0.1.24" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "719b953e2095829ee67db738b3bfa9fa368c94900df327b3f07fe6e794d2fe1f" +[[package]] +name = "rustc-hash" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" + [[package]] name = "rustc_version" version = "0.4.1" @@ -3817,10 +4037,11 @@ dependencies = [ [[package]] name = "rustls" -version = "0.23.18" +version = "0.23.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c9cc1d47e243d655ace55ed38201c19ae02c148ae56412ab8750e8f0166ab7f" +checksum = "5065c3f250cbd332cd894be57c40fa52387247659b14a2d6041d121547903b1b" dependencies = [ + "log", "once_cell", "ring", "rustls-pki-types", @@ -3880,6 +4101,17 @@ version = "1.0.18" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0e819f2bc632f285be6d7cd36e25940d45b2391dd6d9b939e79de557f7014248" +[[package]] +name = "ruzstd" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "58c4eb8a81997cf040a091d1f7e1938aeab6749d3a0dfa73af43cdc32393483d" +dependencies = [ + "byteorder", + "derive_more", + "twox-hash", +] + [[package]] name = "ryu" version = "1.0.18" @@ -4077,7 +4309,7 @@ dependencies = [ "chrono", "hex", "indexmap 1.9.3", - "indexmap 2.6.0", + "indexmap 2.7.0", "serde", "serde_derive", "serde_json", @@ -4176,6 +4408,12 @@ dependencies = [ "wide", ] +[[package]] +name = "simd-adler32" +version = "0.3.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d66dc143e6b11c1eddc06d5c423cfc97062865baf299914ab64caa38182078fe" + [[package]] name = "simdutf8" version = "0.1.5" @@ -4290,20 +4528,20 @@ dependencies = [ "hashbrown 0.14.5", "hashlink", "hex", - "indexmap 2.6.0", + "indexmap 2.7.0", "log", "memchr", "once_cell", "paste", "percent-encoding", - "rustls 0.23.18", + "rustls 0.23.20", "rustls-pemfile 2.2.0", "serde", "serde_json", "sha2", "smallvec", "sqlformat", - "thiserror", + "thiserror 1.0.69", "tokio", "tokio-stream", "tracing", @@ -4387,7 +4625,7 @@ dependencies = [ "smallvec", "sqlx-core", "stringprep", - "thiserror", + "thiserror 1.0.69", "tracing", "whoami", ] @@ -4425,7 +4663,7 @@ dependencies = [ "smallvec", "sqlx-core", "stringprep", - "thiserror", + "thiserror 1.0.69", "tracing", "whoami", ] @@ -4459,6 +4697,12 @@ version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3" +[[package]] +name = "static_assertions" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" + [[package]] name = "statrs" version = "0.17.1" @@ -4486,7 +4730,7 @@ dependencies = [ "parking_lot", "rand", "seahash", - "thiserror", + "thiserror 1.0.69", "tracing", "wg", "xxhash-rust", @@ -4584,12 +4828,6 @@ dependencies = [ "libc", ] -[[package]] -name = "tap" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "55937e1799185b12863d447f42597ed69d9928686b8d88a1df17376a097d8369" - [[package]] name = "tar" version = "0.4.43" @@ -4637,7 +4875,16 @@ version = "1.0.69" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b6aaf5339b578ea85b50e080feb250a3e8ae8cfcdff9a461c9ec2904bc923f52" dependencies = [ - "thiserror-impl", + "thiserror-impl 1.0.69", +] + +[[package]] +name = "thiserror" +version = "2.0.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f072643fd0190df67a8bab670c20ef5d8737177d6ac6b2e9a236cb096206b2cc" +dependencies = [ + "thiserror-impl 2.0.9", ] [[package]] @@ -4651,6 +4898,17 @@ dependencies = [ "syn 2.0.89", ] +[[package]] +name = "thiserror-impl" +version = "2.0.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7b50fa271071aae2e6ee85f842e2e28ba8cd2c5fb67f11fcb1fd70b276f9e7d4" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.89", +] + [[package]] name = "thread_local" version = "1.1.8" @@ -4794,7 +5052,7 @@ version = "0.26.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0c7bc40d0e5a97695bb96e27995cd3a08538541b0a846f65bba7a359f36700d4" dependencies = [ - "rustls 0.23.18", + "rustls 0.23.20", "rustls-pki-types", "tokio", ] @@ -4841,7 +5099,7 @@ version = "0.8.19" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a1ed1f98e3fdc28d6d910e6737ae6ab1a93bf1985935a1193e68f93eeb68d24e" dependencies = [ - "indexmap 2.6.0", + "indexmap 2.7.0", "serde", "serde_spanned", "toml_datetime", @@ -4863,7 +5121,7 @@ version = "0.22.22" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4ae48d6208a266e853d946088ed816055e556cc6028c5e8e2b84d9fa5dd7c7f5" dependencies = [ - "indexmap 2.6.0", + "indexmap 2.7.0", "serde", "serde_spanned", "toml_datetime", @@ -5093,10 +5351,20 @@ dependencies = [ "log", "rand", "sha1", - "thiserror", + "thiserror 1.0.69", "utf-8", ] +[[package]] +name = "twox-hash" +version = "1.6.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "97fee6b57c6a41524a810daee9286c02d7752c4253064d0b05472833a438f675" +dependencies = [ + "cfg-if", + "static_assertions", +] + [[package]] name = "typenum" version = "1.17.0" @@ -5154,6 +5422,12 @@ 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 = "unicode_categories" version = "0.1.1" @@ -5187,6 +5461,22 @@ version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" +[[package]] +name = "ureq" +version = "2.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "02d1a66277ed75f640d608235660df48c8e3c19f3b4edb6a263315626cc3c01d" +dependencies = [ + "base64 0.22.1", + "flate2", + "log", + "once_cell", + "rustls 0.23.20", + "rustls-pki-types", + "url", + "webpki-roots", +] + [[package]] name = "url" version = "2.5.4" @@ -5354,22 +5644,24 @@ checksum = "65fc09f10666a9f147042251e0dda9c18f166ff7de300607007e96bdebc1068d" [[package]] name = "wasm-encoder" -version = "0.32.0" +version = "0.222.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ba64e81215916eaeb48fee292f29401d69235d62d8b8fd92a7b2844ec5ae5f7" +checksum = "3432682105d7e994565ef928ccf5856cf6af4ba3dddebedb737f61caed70f956" dependencies = [ "leb128", + "wasmparser 0.222.0", ] [[package]] name = "wasmer" -version = "4.4.0" +version = "5.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d920d06243e9f456c336c428a34560357dedf59d9febaae14f1995ac120cff6" +checksum = "998dea47d6bb6a8fc7dd8a17b13bf8de277e007229f270c67105cb67fc2d9657" dependencies = [ + "bindgen", "bytes", "cfg-if", - "derivative", + "cmake", "indexmap 1.9.3", "js-sys", "more-asserts", @@ -5377,9 +5669,11 @@ dependencies = [ "serde", "serde-wasm-bindgen 0.4.5", "shared-buffer", + "tar", "target-lexicon", - "thiserror", + "thiserror 1.0.69", "tracing", + "ureq", "wasm-bindgen", "wasmer-compiler", "wasmer-compiler-cranelift", @@ -5388,13 +5682,15 @@ dependencies = [ "wasmer-vm", "wat", "windows-sys 0.59.0", + "xz", + "zip", ] [[package]] name = "wasmer-compiler" -version = "4.4.0" +version = "5.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0e01832173aa52345e480965f18c638a8a5a9e5e4d85a48675bdf1964147dc7f" +checksum = "082f48ba006cce2358f6c63d8dba732c9d12ba5833008c9ff2944290eb72c3dc" dependencies = [ "backtrace", "bytes", @@ -5406,29 +5702,32 @@ dependencies = [ "libc", "memmap2", "more-asserts", + "object 0.32.2", "region", "rkyv", "self_cell", "shared-buffer", "smallvec", - "thiserror", + "target-lexicon", + "thiserror 1.0.69", "wasmer-types", "wasmer-vm", - "wasmparser", + "wasmparser 0.216.0", "windows-sys 0.59.0", "xxhash-rust", ] [[package]] name = "wasmer-compiler-cranelift" -version = "4.4.0" +version = "5.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1c1618f53b492cf6649beeb372930e376e0f52d9842c0c5eb5aa2b548251dab6" +checksum = "0272ad7daf59d43419cda9ae58b9cf8df6a115c8632fbb91c600892dff52f7a8" dependencies = [ "cranelift-codegen", "cranelift-entity", "cranelift-frontend", - "gimli 0.26.2", + "gimli 0.28.1", + "itertools 0.12.1", "more-asserts", "rayon", "smallvec", @@ -5440,11 +5739,11 @@ dependencies = [ [[package]] name = "wasmer-derive" -version = "4.4.0" +version = "5.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c5875633aea92153b6a561cb07363785ca9e07792ca6cd7c1cc371761001d8f" +checksum = "87b16fa0b2199083143705698ea9fc2ffd0328d7061f54e0e20ccd0ec2020466" dependencies = [ - "proc-macro-error", + "proc-macro-error2", "proc-macro2", "quote", "syn 1.0.109", @@ -5452,29 +5751,29 @@ dependencies = [ [[package]] name = "wasmer-types" -version = "4.4.0" +version = "5.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8fb32f0d231b591e4c8a65e81d4647fa3180496d71a123d4948dba8551bba9c2" +checksum = "41b0b9b3242c1a6269e544401b1741a56502a5f79db8e1b318cacf1b34b2690d" dependencies = [ - "bytecheck", + "bytecheck 0.6.12", "enum-iterator", "enumset", "getrandom", "hex", - "indexmap 1.9.3", + "indexmap 2.7.0", "more-asserts", "rkyv", "sha2", "target-lexicon", - "thiserror", + "thiserror 1.0.69", "xxhash-rust", ] [[package]] name = "wasmer-vm" -version = "4.4.0" +version = "5.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e38e9301f5bb9f18da9cda4002d74d2cb6ac1f36dcf919fd77f91fca321fb1e5" +checksum = "92c7f8dbaceb0ab7901702e3c2bb43b09d2635aaa5ad39679c6560bcb9acde7c" dependencies = [ "backtrace", "cc", @@ -5482,10 +5781,9 @@ dependencies = [ "corosensei", "crossbeam-queue", "dashmap", - "derivative", "enum-iterator", "fnv", - "indexmap 1.9.3", + "indexmap 2.7.0", "lazy_static", "libc", "mach2", @@ -5493,39 +5791,53 @@ dependencies = [ "more-asserts", "region", "scopeguard", - "thiserror", + "thiserror 1.0.69", "wasmer-types", "windows-sys 0.59.0", ] [[package]] name = "wasmparser" -version = "0.121.2" +version = "0.216.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9dbe55c8f9d0dbd25d9447a5a889ff90c0cc3feaa7395310d3d826b2c703eaab" +checksum = "bcdee6bea3619d311fb4b299721e89a986c3470f804b6d534340e412589028e3" dependencies = [ + "ahash", "bitflags 2.6.0", - "indexmap 2.6.0", + "hashbrown 0.14.5", + "indexmap 2.7.0", + "semver", +] + +[[package]] +name = "wasmparser" +version = "0.222.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4adf50fde1b1a49c1add6a80d47aea500c88db70551805853aa8b88f3ea27ab5" +dependencies = [ + "bitflags 2.6.0", + "indexmap 2.7.0", "semver", ] [[package]] name = "wast" -version = "64.0.0" +version = "222.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a259b226fd6910225aa7baeba82f9d9933b6d00f2ce1b49b80fa4214328237cc" +checksum = "5ce7191f4b7da0dd300cc32476abae6457154e4625d9b1bc26890828a9a26f6e" dependencies = [ + "bumpalo", "leb128", "memchr", - "unicode-width", + "unicode-width 0.2.0", "wasm-encoder", ] [[package]] name = "wat" -version = "1.0.71" +version = "1.222.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53253d920ab413fca1c7dc2161d601c79b4fdf631d0ba51dd4343bf9b556c3f6" +checksum = "8fde61b4b52f9a84ae31b5e8902a2cd3162ea45d8bf564c729c3288fe52f4334" dependencies = [ "wast", ] @@ -5668,19 +5980,6 @@ dependencies = [ "windows-targets 0.52.6", ] -[[package]] -name = "windows-sys" -version = "0.33.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43dbb096663629518eb1dfa72d80243ca5a6aca764cae62a2df70af760a9be75" -dependencies = [ - "windows_aarch64_msvc 0.33.0", - "windows_i686_gnu 0.33.0", - "windows_i686_msvc 0.33.0", - "windows_x86_64_gnu 0.33.0", - "windows_x86_64_msvc 0.33.0", -] - [[package]] name = "windows-sys" version = "0.48.0" @@ -5751,12 +6050,6 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" -[[package]] -name = "windows_aarch64_msvc" -version = "0.33.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cd761fd3eb9ab8cc1ed81e56e567f02dd82c4c837e48ac3b2181b9ffc5060807" - [[package]] name = "windows_aarch64_msvc" version = "0.48.5" @@ -5769,12 +6062,6 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" -[[package]] -name = "windows_i686_gnu" -version = "0.33.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cab0cf703a96bab2dc0c02c0fa748491294bf9b7feb27e1f4f96340f208ada0e" - [[package]] name = "windows_i686_gnu" version = "0.48.5" @@ -5793,12 +6080,6 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" -[[package]] -name = "windows_i686_msvc" -version = "0.33.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8cfdbe89cc9ad7ce618ba34abc34bbb6c36d99e96cae2245b7943cd75ee773d0" - [[package]] name = "windows_i686_msvc" version = "0.48.5" @@ -5811,12 +6092,6 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" -[[package]] -name = "windows_x86_64_gnu" -version = "0.33.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4dd9b0c0e9ece7bb22e84d70d01b71c6d6248b81a3c60d11869451b4cb24784" - [[package]] name = "windows_x86_64_gnu" version = "0.48.5" @@ -5841,12 +6116,6 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" -[[package]] -name = "windows_x86_64_msvc" -version = "0.33.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff1e4aa646495048ec7f3ffddc411e1d829c026a2ec62b39da15c1055e406eaa" - [[package]] name = "windows_x86_64_msvc" version = "0.48.5" @@ -5890,15 +6159,6 @@ version = "0.5.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1e9df38ee2d2c3c5948ea468a8406ff0db0b29ae1ffde1bcf20ef305bcc95c51" -[[package]] -name = "wyz" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05f360fc0b24296329c78fda852a1e9ae82de9cf7b27dae4b7f62f118f77b9ed" -dependencies = [ - "tap", -] - [[package]] name = "xattr" version = "1.3.1" @@ -5916,6 +6176,15 @@ version = "0.8.12" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6a5cbf750400958819fb6178eaa83bee5cd9c29a26a40cc241df8c70fdd46984" +[[package]] +name = "xz" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3c887690ff2a2e233e8e49633461521f98ec57fbff9d59a884c9a4f04ec1da34" +dependencies = [ + "xz2", +] + [[package]] name = "xz2" version = "0.1.7" @@ -5996,6 +6265,20 @@ name = "zeroize" version = "1.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ced3678a2879b30306d323f4542626697a464a97c0a07c9aebf7ebca65cd4dde" +dependencies = [ + "zeroize_derive", +] + +[[package]] +name = "zeroize_derive" +version = "1.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.89", +] [[package]] name = "zerovec" @@ -6018,3 +6301,74 @@ dependencies = [ "quote", "syn 2.0.89", ] + +[[package]] +name = "zip" +version = "2.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ae9c1ea7b3a5e1f4b922ff856a129881167511563dc219869afe3787fc0c1a45" +dependencies = [ + "aes", + "arbitrary", + "bzip2", + "constant_time_eq", + "crc32fast", + "crossbeam-utils", + "deflate64", + "displaydoc", + "flate2", + "hmac", + "indexmap 2.7.0", + "lzma-rs", + "memchr", + "pbkdf2", + "rand", + "sha1", + "thiserror 2.0.9", + "time", + "zeroize", + "zopfli", + "zstd", +] + +[[package]] +name = "zopfli" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e5019f391bac5cf252e93bbcc53d039ffd62c7bfb7c150414d61369afe57e946" +dependencies = [ + "bumpalo", + "crc32fast", + "lockfree-object-pool", + "log", + "once_cell", + "simd-adler32", +] + +[[package]] +name = "zstd" +version = "0.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fcf2b778a664581e31e389454a7072dab1647606d44f7feea22cd5abb9c9f3f9" +dependencies = [ + "zstd-safe", +] + +[[package]] +name = "zstd-safe" +version = "7.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "54a3ab4db68cea366acc5c897c7b4d4d1b8994a9cd6e6f841f8964566a419059" +dependencies = [ + "zstd-sys", +] + +[[package]] +name = "zstd-sys" +version = "2.0.13+zstd.1.5.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "38ff0f21cfee8f97d94cef41359e0c89aa6113028ab0291aa8ca0038995a95aa" +dependencies = [ + "cc", + "pkg-config", +] diff --git a/Cargo.toml b/Cargo.toml index 7a3233331..3ed2ca875 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -27,7 +27,7 @@ serde_json = "1" serde_with = "3" tracing = "0.1" tracing-subscriber = "0.3" -wasmer = "4.3" +wasmer = "5.0.4" freenet-stdlib = { path = "./stdlib/rust/", features = ["unstable"] } # freenet-stdlib = { version = "0.0.8" } diff --git a/stdlib b/stdlib index c5119c45f..e5ec41a18 160000 --- a/stdlib +++ b/stdlib @@ -1 +1 @@ -Subproject commit c5119c45f70bb934f6217966892e9ea4b1bea822 +Subproject commit e5ec41a1839a3187e3fce9abfa041291d782d146 From 7d7c8f15c99dd1af4ed100ec3e12cf8caacdcd89 Mon Sep 17 00:00:00 2001 From: Ian Clarke Date: Thu, 26 Dec 2024 15:08:06 -0600 Subject: [PATCH 04/49] fix clippy errors in stdlib --- stdlib | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stdlib b/stdlib index e5ec41a18..e9188560d 160000 --- a/stdlib +++ b/stdlib @@ -1 +1 @@ -Subproject commit e5ec41a1839a3187e3fce9abfa041291d782d146 +Subproject commit e9188560dea1b5ca55130ba3278a54c770aa8d55 From a984db6867cad892eb935b29745b134040521004 Mon Sep 17 00:00:00 2001 From: Ian Clarke Date: Thu, 26 Dec 2024 15:10:02 -0600 Subject: [PATCH 05/49] fix formatting in stdlib --- stdlib | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stdlib b/stdlib index e9188560d..e0c043189 160000 --- a/stdlib +++ b/stdlib @@ -1 +1 @@ -Subproject commit e9188560dea1b5ca55130ba3278a54c770aa8d55 +Subproject commit e0c04318995637dedc4c4605eff6ab2b26e51ec2 From 5c2ad85404f21538ab7286f28c583fa546afb007 Mon Sep 17 00:00:00 2001 From: Ian Clarke Date: Thu, 26 Dec 2024 15:22:17 -0600 Subject: [PATCH 06/49] another clippy fix in stdlib --- stdlib | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stdlib b/stdlib index e0c043189..270619011 160000 --- a/stdlib +++ b/stdlib @@ -1 +1 @@ -Subproject commit e0c04318995637dedc4c4605eff6ab2b26e51ec2 +Subproject commit 270619011c6444cf989757ec2ce60312d7b0fe83 From d85bfcb59ff679ec7c280bb2d748a6b4ef77543e Mon Sep 17 00:00:00 2001 From: "Ian Clarke (aider)" Date: Thu, 26 Dec 2024 15:34:58 -0600 Subject: [PATCH 07/49] refactor: Remove unnecessary `return` keyword in contract update method --- apps/freenet-ping/contracts/ping/src/lib.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/freenet-ping/contracts/ping/src/lib.rs b/apps/freenet-ping/contracts/ping/src/lib.rs index 8767d6713..daf6680d4 100644 --- a/apps/freenet-ping/contracts/ping/src/lib.rs +++ b/apps/freenet-ping/contracts/ping/src/lib.rs @@ -68,9 +68,9 @@ impl ContractInterface for Contract { _ => return Err(ContractError::InvalidUpdate), } } - return Ok(UpdateModification::valid(State::from( + Ok(UpdateModification::valid(State::from( serde_json::to_vec(&ping).map_err(|e| ContractError::Other(e.to_string()))?, - ))); + ))) } fn summarize_state( From eece6c9f5eb2db7ee97defbfa5aa7de8ce88345f Mon Sep 17 00:00:00 2001 From: "Ian Clarke (aider)" Date: Thu, 26 Dec 2024 15:56:44 -0600 Subject: [PATCH 08/49] refactor: Simplify lifetimes and reduce type complexity in core crates --- crates/core/src/config.rs | 2 +- .../core/src/transport/connection_handler.rs | 33 +++++++++++-------- crates/core/src/util.rs | 6 ++-- 3 files changed, 23 insertions(+), 18 deletions(-) diff --git a/crates/core/src/config.rs b/crates/core/src/config.rs index 7f90315e5..67d43ee6b 100644 --- a/crates/core/src/config.rs +++ b/crates/core/src/config.rs @@ -744,7 +744,7 @@ impl<'a> Iterator for ConfigPathsIter<'a> { } } -impl<'a> core::iter::FusedIterator for ConfigPathsIter<'a> {} +impl core::iter::FusedIterator for ConfigPathsIter<'_> {} impl Config { pub fn db_dir(&self) -> PathBuf { diff --git a/crates/core/src/transport/connection_handler.rs b/crates/core/src/transport/connection_handler.rs index d395a1c0e..90d93e492 100644 --- a/crates/core/src/transport/connection_handler.rs +++ b/crates/core/src/transport/connection_handler.rs @@ -361,22 +361,24 @@ impl UdpPacketsListener { } } + type GatewayConnFuture = impl Future< + Output = Result< + ( + RemoteConnection, + InboundRemoteConnection, + PacketData, + ), + TransportError, + >, + > + Send + + 'static; + fn gateway_connection( &mut self, remote_intro_packet: PacketData, remote_addr: SocketAddr, ) -> ( - impl Future< - Output = Result< - ( - RemoteConnection, - InboundRemoteConnection, - PacketData, - ), - TransportError, - >, - > + Send - + 'static, + Self::GatewayConnFuture, mpsc::Sender>, ) { let secret = self.this_peer_keypair.secret.clone(); @@ -493,14 +495,17 @@ impl UdpPacketsListener { #[cfg(test)] const NAT_TRAVERSAL_MAX_ATTEMPTS: usize = 10; + type TraverseNatFuture = impl Future< + Output = Result<(RemoteConnection, InboundRemoteConnection), TransportError> + > + Send + + 'static; + fn traverse_nat( &mut self, remote_addr: SocketAddr, remote_public_key: TransportPublicKey, ) -> ( - impl Future> - + Send - + 'static, + Self::TraverseNatFuture, mpsc::Sender>, ) { // Constants for exponential backoff diff --git a/crates/core/src/util.rs b/crates/core/src/util.rs index 1e0908bd3..5405ebfd2 100644 --- a/crates/core/src/util.rs +++ b/crates/core/src/util.rs @@ -262,19 +262,19 @@ pub(crate) trait Contains { fn has_element(&self, target: &T) -> bool; } -impl<'x> Contains for &'x [PeerId] { +impl Contains for &[PeerId] { fn has_element(&self, target: &PeerId) -> bool { self.contains(target) } } -impl<'x> Contains for &'x [&PeerId] { +impl Contains for &[&PeerId] { fn has_element(&self, target: &PeerId) -> bool { self.contains(&target) } } -impl<'x> Contains for &'x Vec<&PeerId> { +impl Contains for &Vec<&PeerId> { fn has_element(&self, target: &PeerId) -> bool { self.contains(&target) } From 4530b4894dc2b900a3058897b81104e82a9f15fa Mon Sep 17 00:00:00 2001 From: Ian Clarke Date: Thu, 26 Dec 2024 16:00:16 -0600 Subject: [PATCH 09/49] fix formatting --- crates/core/src/transport/connection_handler.rs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/crates/core/src/transport/connection_handler.rs b/crates/core/src/transport/connection_handler.rs index 90d93e492..0ec08c721 100644 --- a/crates/core/src/transport/connection_handler.rs +++ b/crates/core/src/transport/connection_handler.rs @@ -495,9 +495,8 @@ impl UdpPacketsListener { #[cfg(test)] const NAT_TRAVERSAL_MAX_ATTEMPTS: usize = 10; - type TraverseNatFuture = impl Future< - Output = Result<(RemoteConnection, InboundRemoteConnection), TransportError> - > + Send + type TraverseNatFuture = impl Future> + + Send + 'static; fn traverse_nat( From f2b8eb4ec6fa8aaee432c94d1bd4b75e9f327fa5 Mon Sep 17 00:00:00 2001 From: "Ian Clarke (aider)" Date: Thu, 26 Dec 2024 16:04:20 -0600 Subject: [PATCH 10/49] fix: Remove unstable associated types and unused imports in connection handler --- .../core/src/transport/connection_handler.rs | 20 +++++++++---------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/crates/core/src/transport/connection_handler.rs b/crates/core/src/transport/connection_handler.rs index 0ec08c721..c31ddc9d9 100644 --- a/crates/core/src/transport/connection_handler.rs +++ b/crates/core/src/transport/connection_handler.rs @@ -13,11 +13,11 @@ use futures::{ stream::{FuturesUnordered, StreamExt}, Future, }; -use futures::{FutureExt, TryFutureExt}; +use futures::FutureExt; use tokio::net::UdpSocket; use tokio::sync::{mpsc, oneshot}; use tokio::task; -use tracing::{span, Instrument}; +use tracing::span; use super::{ crypto::{TransportKeypair, TransportPublicKey}, @@ -361,7 +361,12 @@ impl UdpPacketsListener { } } - type GatewayConnFuture = impl Future< + fn gateway_connection( + &mut self, + remote_intro_packet: PacketData, + remote_addr: SocketAddr, + ) -> ( + impl Future< Output = Result< ( RemoteConnection, @@ -371,14 +376,7 @@ impl UdpPacketsListener { TransportError, >, > + Send - + 'static; - - fn gateway_connection( - &mut self, - remote_intro_packet: PacketData, - remote_addr: SocketAddr, - ) -> ( - Self::GatewayConnFuture, + + 'static, mpsc::Sender>, ) { let secret = self.this_peer_keypair.secret.clone(); From 50b89af3e153f4cfe500546865ee99041c43c869 Mon Sep 17 00:00:00 2001 From: "Ian Clarke (aider)" Date: Thu, 26 Dec 2024 16:04:36 -0600 Subject: [PATCH 11/49] refactor: Remove explicit TraverseNatFuture type and inline return type --- crates/core/src/transport/connection_handler.rs | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/crates/core/src/transport/connection_handler.rs b/crates/core/src/transport/connection_handler.rs index c31ddc9d9..aceff3d10 100644 --- a/crates/core/src/transport/connection_handler.rs +++ b/crates/core/src/transport/connection_handler.rs @@ -493,16 +493,14 @@ impl UdpPacketsListener { #[cfg(test)] const NAT_TRAVERSAL_MAX_ATTEMPTS: usize = 10; - type TraverseNatFuture = impl Future> - + Send - + 'static; - fn traverse_nat( &mut self, remote_addr: SocketAddr, remote_public_key: TransportPublicKey, ) -> ( - Self::TraverseNatFuture, + impl Future> + + Send + + 'static, mpsc::Sender>, ) { // Constants for exponential backoff From 7ddcf09212b523c0cae4d6fa89142bb95d41fd55 Mon Sep 17 00:00:00 2001 From: Ian Clarke Date: Thu, 26 Dec 2024 16:06:37 -0600 Subject: [PATCH 12/49] fix formatting --- .../core/src/transport/connection_handler.rs | 22 +++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/crates/core/src/transport/connection_handler.rs b/crates/core/src/transport/connection_handler.rs index aceff3d10..5a05063c5 100644 --- a/crates/core/src/transport/connection_handler.rs +++ b/crates/core/src/transport/connection_handler.rs @@ -9,11 +9,11 @@ use crate::transport::crypto::TransportSecretKey; use crate::transport::packet_data::{AssymetricRSA, UnknownEncryption}; use crate::transport::symmetric_message::OutboundConnection; use aes_gcm::{Aes128Gcm, KeyInit}; +use futures::FutureExt; use futures::{ stream::{FuturesUnordered, StreamExt}, Future, }; -use futures::FutureExt; use tokio::net::UdpSocket; use tokio::sync::{mpsc, oneshot}; use tokio::task; @@ -367,16 +367,16 @@ impl UdpPacketsListener { remote_addr: SocketAddr, ) -> ( impl Future< - Output = Result< - ( - RemoteConnection, - InboundRemoteConnection, - PacketData, - ), - TransportError, - >, - > + Send - + 'static, + Output = Result< + ( + RemoteConnection, + InboundRemoteConnection, + PacketData, + ), + TransportError, + >, + > + Send + + 'static, mpsc::Sender>, ) { let secret = self.this_peer_keypair.secret.clone(); From 9b6d5e5376da32760a87fe95c84e1e89162598da Mon Sep 17 00:00:00 2001 From: "Ian Clarke (aider)" Date: Thu, 26 Dec 2024 16:12:11 -0600 Subject: [PATCH 13/49] fix: Add missing trait imports for futures and tracing --- crates/core/src/transport/connection_handler.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/crates/core/src/transport/connection_handler.rs b/crates/core/src/transport/connection_handler.rs index 5a05063c5..a34001bc5 100644 --- a/crates/core/src/transport/connection_handler.rs +++ b/crates/core/src/transport/connection_handler.rs @@ -12,8 +12,9 @@ use aes_gcm::{Aes128Gcm, KeyInit}; use futures::FutureExt; use futures::{ stream::{FuturesUnordered, StreamExt}, - Future, + Future, TryFutureExt, }; +use tracing::Instrument; use tokio::net::UdpSocket; use tokio::sync::{mpsc, oneshot}; use tokio::task; From 2309082134eb64fa476b6e17028a0f1ad177e68c Mon Sep 17 00:00:00 2001 From: Ian Clarke Date: Thu, 26 Dec 2024 16:14:51 -0600 Subject: [PATCH 14/49] fix formatting again --- crates/core/src/transport/connection_handler.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/core/src/transport/connection_handler.rs b/crates/core/src/transport/connection_handler.rs index a34001bc5..20e5752ba 100644 --- a/crates/core/src/transport/connection_handler.rs +++ b/crates/core/src/transport/connection_handler.rs @@ -14,11 +14,11 @@ use futures::{ stream::{FuturesUnordered, StreamExt}, Future, TryFutureExt, }; -use tracing::Instrument; use tokio::net::UdpSocket; use tokio::sync::{mpsc, oneshot}; use tokio::task; use tracing::span; +use tracing::Instrument; use super::{ crypto::{TransportKeypair, TransportPublicKey}, From 88ad938a2cc524047b01e32769bfd70934e8085a Mon Sep 17 00:00:00 2001 From: "Ian Clarke (aider)" Date: Thu, 26 Dec 2024 16:23:03 -0600 Subject: [PATCH 15/49] refactor: Remove unnecessary lifetimes and simplify complex types --- crates/core/src/contract.rs | 2 +- .../src/contract/executor/mock_runtime.rs | 4 +- crates/core/src/contract/executor/runtime.rs | 12 +++--- .../core/src/transport/connection_handler.rs | 39 +++++++++---------- 4 files changed, 28 insertions(+), 29 deletions(-) diff --git a/crates/core/src/contract.rs b/crates/core/src/contract.rs index a8de9ee93..89cbd7c37 100644 --- a/crates/core/src/contract.rs +++ b/crates/core/src/contract.rs @@ -24,7 +24,7 @@ pub use executor::{Executor, ExecutorError, OperationMode}; use executor::ContractExecutor; use tracing::Instrument; -pub(crate) async fn contract_handling<'a, CH>(mut contract_handler: CH) -> Result<(), ContractError> +pub(crate) async fn contract_handling(mut contract_handler: CH) -> Result<(), ContractError> where CH: ContractHandler + Send + 'static, { diff --git a/crates/core/src/contract/executor/mock_runtime.rs b/crates/core/src/contract/executor/mock_runtime.rs index efe649733..f3addfb8e 100644 --- a/crates/core/src/contract/executor/mock_runtime.rs +++ b/crates/core/src/contract/executor/mock_runtime.rs @@ -35,10 +35,10 @@ impl Executor { Ok(executor) } - pub async fn handle_request<'a>( + pub async fn handle_request( &mut self, _id: ClientId, - _req: ClientRequest<'a>, + _req: ClientRequest<'_>, _updates: Option>>, ) -> Response { unreachable!() diff --git a/crates/core/src/contract/executor/runtime.rs b/crates/core/src/contract/executor/runtime.rs index 5fa11e1c0..9382b5a12 100644 --- a/crates/core/src/contract/executor/runtime.rs +++ b/crates/core/src/contract/executor/runtime.rs @@ -250,10 +250,10 @@ impl Executor { } } - pub async fn handle_request<'a>( + pub async fn handle_request( &mut self, id: ClientId, - req: ClientRequest<'a>, + req: ClientRequest<'_>, updates: Option>>, ) -> Response { match req { @@ -666,11 +666,11 @@ impl Executor { Ok(State::from(state)) } - async fn verify_and_store_contract<'a>( + async fn verify_and_store_contract( &mut self, state: WrappedState, trying_container: ContractContainer, - mut related_contracts: RelatedContracts<'a>, + mut related_contracts: RelatedContracts<'_>, ) -> Result<(), ExecutorError> { let key = trying_container.key(); let params = trying_container.params(); @@ -768,10 +768,10 @@ impl Executor { Ok(()) } - async fn send_update_notification<'a>( + async fn send_update_notification( &mut self, key: &ContractKey, - params: &Parameters<'a>, + params: &Parameters<'_>, new_state: &WrappedState, ) -> Result<(), ExecutorError> { tracing::debug!(contract = %key, "notify of contract update"); diff --git a/crates/core/src/transport/connection_handler.rs b/crates/core/src/transport/connection_handler.rs index 20e5752ba..1ca370824 100644 --- a/crates/core/src/transport/connection_handler.rs +++ b/crates/core/src/transport/connection_handler.rs @@ -1,4 +1,21 @@ use std::collections::BTreeMap; + +type GatewayConnectionFuture = impl Future< + Output = Result< + ( + RemoteConnection, + InboundRemoteConnection, + PacketData, + ), + TransportError, + >, +> + Send + + 'static; + +type TraverseNatFuture = impl Future< + Output = Result<(RemoteConnection, InboundRemoteConnection), TransportError>, +> + Send + + 'static; use std::net::{IpAddr, SocketAddr}; use std::pin::Pin; use std::sync::atomic::AtomicU32; @@ -366,20 +383,7 @@ impl UdpPacketsListener { &mut self, remote_intro_packet: PacketData, remote_addr: SocketAddr, - ) -> ( - impl Future< - Output = Result< - ( - RemoteConnection, - InboundRemoteConnection, - PacketData, - ), - TransportError, - >, - > + Send - + 'static, - mpsc::Sender>, - ) { + ) -> (GatewayConnectionFuture, mpsc::Sender>) { let secret = self.this_peer_keypair.secret.clone(); let outbound_packets = self.outbound_packets.clone(); @@ -498,12 +502,7 @@ impl UdpPacketsListener { &mut self, remote_addr: SocketAddr, remote_public_key: TransportPublicKey, - ) -> ( - impl Future> - + Send - + 'static, - mpsc::Sender>, - ) { + ) -> (TraverseNatFuture, mpsc::Sender>) { // Constants for exponential backoff const INITIAL_TIMEOUT: Duration = Duration::from_millis(15); const TIMEOUT_MULTIPLIER: f64 = 1.2; From 8d10037493e9ab247a9dd22e0e8fdedca838a2f2 Mon Sep 17 00:00:00 2001 From: "Ian Clarke (aider)" Date: Thu, 26 Dec 2024 16:24:02 -0600 Subject: [PATCH 16/49] fix: Replace unstable `impl Trait` type aliases with `Box` --- .../core/src/transport/connection_handler.rs | 38 ++++++++++--------- 1 file changed, 21 insertions(+), 17 deletions(-) diff --git a/crates/core/src/transport/connection_handler.rs b/crates/core/src/transport/connection_handler.rs index 1ca370824..a17ca03f0 100644 --- a/crates/core/src/transport/connection_handler.rs +++ b/crates/core/src/transport/connection_handler.rs @@ -1,21 +1,25 @@ use std::collections::BTreeMap; -type GatewayConnectionFuture = impl Future< - Output = Result< - ( - RemoteConnection, - InboundRemoteConnection, - PacketData, - ), - TransportError, - >, -> + Send - + 'static; +type GatewayConnectionFuture = Box< + dyn Future< + Output = Result< + ( + RemoteConnection, + InboundRemoteConnection, + PacketData, + ), + TransportError, + >, + > + Send + + 'static, +>; -type TraverseNatFuture = impl Future< - Output = Result<(RemoteConnection, InboundRemoteConnection), TransportError>, -> + Send - + 'static; +type TraverseNatFuture = Box< + dyn Future< + Output = Result<(RemoteConnection, InboundRemoteConnection), TransportError>, + > + Send + + 'static, +>; use std::net::{IpAddr, SocketAddr}; use std::pin::Pin; use std::sync::atomic::AtomicU32; @@ -488,7 +492,7 @@ impl UdpPacketsListener { tracing::debug!("returning connection at gw"); Ok((remote_conn, inbound_conn, outbound_ack_packet)) }; - (f, inbound_from_remote) + (Box::new(f), inbound_from_remote) } // TODO: this value should be set given exponential backoff and max timeout @@ -786,7 +790,7 @@ impl UdpPacketsListener { cause: "max connection attempts reached".into(), }) }; - (f, inbound_from_remote) + (Box::new(f), inbound_from_remote) } } From 5e1ff085f2458f839af21a4d3825e6a202383dc5 Mon Sep 17 00:00:00 2001 From: "Ian Clarke (aider)" Date: Thu, 26 Dec 2024 16:32:00 -0600 Subject: [PATCH 17/49] fix: Resolve future mapping and instrumentation type issues --- .../core/src/transport/connection_handler.rs | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/crates/core/src/transport/connection_handler.rs b/crates/core/src/transport/connection_handler.rs index a17ca03f0..5d5961467 100644 --- a/crates/core/src/transport/connection_handler.rs +++ b/crates/core/src/transport/connection_handler.rs @@ -288,11 +288,11 @@ impl UdpPacketsListener { } let packet_data = PacketData::from_buf(&buf[..size]); let (gw_ongoing_connection, packets_sender) = self.gateway_connection(packet_data, remote_addr); - let task = tokio::spawn(gw_ongoing_connection - .instrument(tracing::span!(tracing::Level::DEBUG, "gateway_connection")) - .map_err(move |error| { - (error, remote_addr) - })); + let task = tokio::spawn( + gw_ongoing_connection + .map_err(move |error| (error, remote_addr)) + .instrument(tracing::span!(tracing::Level::DEBUG, "gateway_connection")) + ); ongoing_gw_connections.insert(remote_addr, packets_sender); gw_connection_tasks.push(task); } @@ -373,9 +373,11 @@ impl UdpPacketsListener { let (ongoing_connection, packets_sender) = self.traverse_nat( remote_addr, remote_public_key, ); - let task = tokio::spawn(ongoing_connection.map_err(move |error| { - (error, remote_addr) - }).instrument(span!(tracing::Level::DEBUG, "traverse_nat"))); + let task = tokio::spawn( + ongoing_connection + .map_err(move |error| (error, remote_addr)) + .instrument(span!(tracing::Level::DEBUG, "traverse_nat")) + ); connection_tasks.push(task); ongoing_connections.insert(remote_addr, (packets_sender, open_connection)); }, From 44f1d9afdf7c77c87c6abf91a81b127b127f800e Mon Sep 17 00:00:00 2001 From: "Ian Clarke (aider)" Date: Thu, 26 Dec 2024 16:34:03 -0600 Subject: [PATCH 18/49] fix: Resolve future boxing and instrumentation issues in connection handler --- .../core/src/transport/connection_handler.rs | 24 +++++++++++-------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/crates/core/src/transport/connection_handler.rs b/crates/core/src/transport/connection_handler.rs index 5d5961467..231cd2aa4 100644 --- a/crates/core/src/transport/connection_handler.rs +++ b/crates/core/src/transport/connection_handler.rs @@ -288,11 +288,13 @@ impl UdpPacketsListener { } let packet_data = PacketData::from_buf(&buf[..size]); let (gw_ongoing_connection, packets_sender) = self.gateway_connection(packet_data, remote_addr); - let task = tokio::spawn( - gw_ongoing_connection - .map_err(move |error| (error, remote_addr)) - .instrument(tracing::span!(tracing::Level::DEBUG, "gateway_connection")) - ); + let task = tokio::spawn({ + let span = tracing::span!(tracing::Level::DEBUG, "gateway_connection"); + async move { + gw_ongoing_connection.await.map_err(|error| (error, remote_addr)) + } + .instrument(span) + }); ongoing_gw_connections.insert(remote_addr, packets_sender); gw_connection_tasks.push(task); } @@ -373,11 +375,13 @@ impl UdpPacketsListener { let (ongoing_connection, packets_sender) = self.traverse_nat( remote_addr, remote_public_key, ); - let task = tokio::spawn( - ongoing_connection - .map_err(move |error| (error, remote_addr)) - .instrument(span!(tracing::Level::DEBUG, "traverse_nat")) - ); + let task = tokio::spawn({ + let span = span!(tracing::Level::DEBUG, "traverse_nat"); + async move { + ongoing_connection.await.map_err(|error| (error, remote_addr)) + } + .instrument(span) + }); connection_tasks.push(task); ongoing_connections.insert(remote_addr, (packets_sender, open_connection)); }, From 80e2108b897aab9ab7096426a68544188e14443b Mon Sep 17 00:00:00 2001 From: "Ian Clarke (aider)" Date: Thu, 26 Dec 2024 16:34:42 -0600 Subject: [PATCH 19/49] fix: Resolve future pinning and error handling in connection handler --- crates/core/src/transport/connection_handler.rs | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/crates/core/src/transport/connection_handler.rs b/crates/core/src/transport/connection_handler.rs index 231cd2aa4..a7b2c445a 100644 --- a/crates/core/src/transport/connection_handler.rs +++ b/crates/core/src/transport/connection_handler.rs @@ -33,7 +33,7 @@ use aes_gcm::{Aes128Gcm, KeyInit}; use futures::FutureExt; use futures::{ stream::{FuturesUnordered, StreamExt}, - Future, TryFutureExt, + Future, }; use tokio::net::UdpSocket; use tokio::sync::{mpsc, oneshot}; @@ -291,7 +291,12 @@ impl UdpPacketsListener { let task = tokio::spawn({ let span = tracing::span!(tracing::Level::DEBUG, "gateway_connection"); async move { - gw_ongoing_connection.await.map_err(|error| (error, remote_addr)) + async move { + match gw_ongoing_connection.await { + Ok(result) => Ok(result), + Err(error) => Err((error, remote_addr)) + } + } } .instrument(span) }); @@ -378,7 +383,12 @@ impl UdpPacketsListener { let task = tokio::spawn({ let span = span!(tracing::Level::DEBUG, "traverse_nat"); async move { - ongoing_connection.await.map_err(|error| (error, remote_addr)) + async move { + match ongoing_connection.await { + Ok(result) => Ok(result), + Err(error) => Err((error, remote_addr)) + } + } } .instrument(span) }); From 7949b2e72a630a9aa904e0b539ab6a32af8452b8 Mon Sep 17 00:00:00 2001 From: "Ian Clarke (aider)" Date: Thu, 26 Dec 2024 16:37:15 -0600 Subject: [PATCH 20/49] fix: Pin boxed futures and simplify async blocks in connection handler --- crates/core/src/transport/connection_handler.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/crates/core/src/transport/connection_handler.rs b/crates/core/src/transport/connection_handler.rs index a7b2c445a..8dac5ac43 100644 --- a/crates/core/src/transport/connection_handler.rs +++ b/crates/core/src/transport/connection_handler.rs @@ -292,6 +292,7 @@ impl UdpPacketsListener { let span = tracing::span!(tracing::Level::DEBUG, "gateway_connection"); async move { async move { + let gw_ongoing_connection = Box::pin(gw_ongoing_connection); match gw_ongoing_connection.await { Ok(result) => Ok(result), Err(error) => Err((error, remote_addr)) @@ -384,6 +385,7 @@ impl UdpPacketsListener { let span = span!(tracing::Level::DEBUG, "traverse_nat"); async move { async move { + let ongoing_connection = Box::pin(ongoing_connection); match ongoing_connection.await { Ok(result) => Ok(result), Err(error) => Err((error, remote_addr)) From 1d8535bba927de766661dd971e3a24c85f3e56dc Mon Sep 17 00:00:00 2001 From: "Ian Clarke (aider)" Date: Thu, 26 Dec 2024 16:37:31 -0600 Subject: [PATCH 21/49] refactor: Remove redundant async move block in connection handler --- crates/core/src/transport/connection_handler.rs | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/crates/core/src/transport/connection_handler.rs b/crates/core/src/transport/connection_handler.rs index 8dac5ac43..2d7a9694d 100644 --- a/crates/core/src/transport/connection_handler.rs +++ b/crates/core/src/transport/connection_handler.rs @@ -291,12 +291,10 @@ impl UdpPacketsListener { let task = tokio::spawn({ let span = tracing::span!(tracing::Level::DEBUG, "gateway_connection"); async move { - async move { - let gw_ongoing_connection = Box::pin(gw_ongoing_connection); - match gw_ongoing_connection.await { - Ok(result) => Ok(result), - Err(error) => Err((error, remote_addr)) - } + let gw_ongoing_connection = Box::pin(gw_ongoing_connection); + match gw_ongoing_connection.await { + Ok(result) => Ok(result), + Err(error) => Err((error, remote_addr)) } } .instrument(span) From 5c2968752bbda7f6fd3ad649d7065c52268a3f94 Mon Sep 17 00:00:00 2001 From: "Ian Clarke (aider)" Date: Thu, 26 Dec 2024 16:40:11 -0600 Subject: [PATCH 22/49] fix: Pin futures correctly in connection handler --- crates/core/src/transport/connection_handler.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/crates/core/src/transport/connection_handler.rs b/crates/core/src/transport/connection_handler.rs index 2d7a9694d..38c88fc01 100644 --- a/crates/core/src/transport/connection_handler.rs +++ b/crates/core/src/transport/connection_handler.rs @@ -291,8 +291,8 @@ impl UdpPacketsListener { let task = tokio::spawn({ let span = tracing::span!(tracing::Level::DEBUG, "gateway_connection"); async move { - let gw_ongoing_connection = Box::pin(gw_ongoing_connection); - match gw_ongoing_connection.await { + let mut gw_ongoing_connection = Box::pin(gw_ongoing_connection); + match Pin::new(&mut gw_ongoing_connection).await { Ok(result) => Ok(result), Err(error) => Err((error, remote_addr)) } @@ -383,8 +383,8 @@ impl UdpPacketsListener { let span = span!(tracing::Level::DEBUG, "traverse_nat"); async move { async move { - let ongoing_connection = Box::pin(ongoing_connection); - match ongoing_connection.await { + let mut ongoing_connection = Box::pin(ongoing_connection); + match Pin::new(&mut ongoing_connection).await { Ok(result) => Ok(result), Err(error) => Err((error, remote_addr)) } From 07f2ee45015bb72f21ff9237847a07c982f7fb70 Mon Sep 17 00:00:00 2001 From: "Ian Clarke (aider)" Date: Thu, 26 Dec 2024 16:40:46 -0600 Subject: [PATCH 23/49] fix: Simplify future pinning in connection handler --- crates/core/src/transport/connection_handler.rs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/crates/core/src/transport/connection_handler.rs b/crates/core/src/transport/connection_handler.rs index 38c88fc01..c205eb36a 100644 --- a/crates/core/src/transport/connection_handler.rs +++ b/crates/core/src/transport/connection_handler.rs @@ -291,8 +291,7 @@ impl UdpPacketsListener { let task = tokio::spawn({ let span = tracing::span!(tracing::Level::DEBUG, "gateway_connection"); async move { - let mut gw_ongoing_connection = Box::pin(gw_ongoing_connection); - match Pin::new(&mut gw_ongoing_connection).await { + match gw_ongoing_connection.await { Ok(result) => Ok(result), Err(error) => Err((error, remote_addr)) } @@ -383,8 +382,7 @@ impl UdpPacketsListener { let span = span!(tracing::Level::DEBUG, "traverse_nat"); async move { async move { - let mut ongoing_connection = Box::pin(ongoing_connection); - match Pin::new(&mut ongoing_connection).await { + match ongoing_connection.await { Ok(result) => Ok(result), Err(error) => Err((error, remote_addr)) } From 9584e139e7d55fec1aad8661d695e0b6ef00ba2e Mon Sep 17 00:00:00 2001 From: "Ian Clarke (aider)" Date: Thu, 26 Dec 2024 16:41:58 -0600 Subject: [PATCH 24/49] fix: Pin futures in connection handler to resolve async type errors --- crates/core/src/transport/connection_handler.rs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/crates/core/src/transport/connection_handler.rs b/crates/core/src/transport/connection_handler.rs index c205eb36a..56365f9b7 100644 --- a/crates/core/src/transport/connection_handler.rs +++ b/crates/core/src/transport/connection_handler.rs @@ -291,7 +291,8 @@ impl UdpPacketsListener { let task = tokio::spawn({ let span = tracing::span!(tracing::Level::DEBUG, "gateway_connection"); async move { - match gw_ongoing_connection.await { + let pinned = Box::pin(gw_ongoing_connection); + match pinned.await { Ok(result) => Ok(result), Err(error) => Err((error, remote_addr)) } @@ -381,11 +382,10 @@ impl UdpPacketsListener { let task = tokio::spawn({ let span = span!(tracing::Level::DEBUG, "traverse_nat"); async move { - async move { - match ongoing_connection.await { - Ok(result) => Ok(result), - Err(error) => Err((error, remote_addr)) - } + let pinned = Box::pin(ongoing_connection); + match pinned.await { + Ok(result) => Ok(result), + Err(error) => Err((error, remote_addr)) } } .instrument(span) From eac013f8669157e2af32a37982562192c1d9c9b1 Mon Sep 17 00:00:00 2001 From: "Ian Clarke (aider)" Date: Thu, 26 Dec 2024 16:42:33 -0600 Subject: [PATCH 25/49] fix: Resolve future pinning issues in connection handler --- crates/core/src/transport/connection_handler.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/crates/core/src/transport/connection_handler.rs b/crates/core/src/transport/connection_handler.rs index 56365f9b7..991c1fb0b 100644 --- a/crates/core/src/transport/connection_handler.rs +++ b/crates/core/src/transport/connection_handler.rs @@ -291,8 +291,8 @@ impl UdpPacketsListener { let task = tokio::spawn({ let span = tracing::span!(tracing::Level::DEBUG, "gateway_connection"); async move { - let pinned = Box::pin(gw_ongoing_connection); - match pinned.await { + let future = Box::pin(gw_ongoing_connection); + match futures::Future::poll(Pin::new(&future), &mut std::task::Context::from_waker(futures::task::noop_waker_ref())) { Ok(result) => Ok(result), Err(error) => Err((error, remote_addr)) } @@ -382,8 +382,8 @@ impl UdpPacketsListener { let task = tokio::spawn({ let span = span!(tracing::Level::DEBUG, "traverse_nat"); async move { - let pinned = Box::pin(ongoing_connection); - match pinned.await { + let future = Box::pin(ongoing_connection); + match futures::Future::poll(Pin::new(&future), &mut std::task::Context::from_waker(futures::task::noop_waker_ref())) { Ok(result) => Ok(result), Err(error) => Err((error, remote_addr)) } From 6b7ccbe44297cb99f5128b5b5709134e57efd18d Mon Sep 17 00:00:00 2001 From: "Ian Clarke (aider)" Date: Thu, 26 Dec 2024 16:43:59 -0600 Subject: [PATCH 26/49] fix: Resolve future polling type mismatches in connection handler --- crates/core/src/transport/connection_handler.rs | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/crates/core/src/transport/connection_handler.rs b/crates/core/src/transport/connection_handler.rs index 991c1fb0b..d5903fe5d 100644 --- a/crates/core/src/transport/connection_handler.rs +++ b/crates/core/src/transport/connection_handler.rs @@ -292,9 +292,10 @@ impl UdpPacketsListener { let span = tracing::span!(tracing::Level::DEBUG, "gateway_connection"); async move { let future = Box::pin(gw_ongoing_connection); - match futures::Future::poll(Pin::new(&future), &mut std::task::Context::from_waker(futures::task::noop_waker_ref())) { - Ok(result) => Ok(result), - Err(error) => Err((error, remote_addr)) + match futures::Future::poll(unsafe { Pin::new_unchecked(&mut future) }, &mut std::task::Context::from_waker(futures::task::noop_waker_ref())) { + std::task::Poll::Ready(Ok(result)) => Ok(result), + std::task::Poll::Ready(Err(error)) => Err((error, remote_addr)), + std::task::Poll::Pending => Ok(result) } } .instrument(span) @@ -383,9 +384,10 @@ impl UdpPacketsListener { let span = span!(tracing::Level::DEBUG, "traverse_nat"); async move { let future = Box::pin(ongoing_connection); - match futures::Future::poll(Pin::new(&future), &mut std::task::Context::from_waker(futures::task::noop_waker_ref())) { - Ok(result) => Ok(result), - Err(error) => Err((error, remote_addr)) + match futures::Future::poll(unsafe { Pin::new_unchecked(&mut future) }, &mut std::task::Context::from_waker(futures::task::noop_waker_ref())) { + std::task::Poll::Ready(Ok(result)) => Ok(result), + std::task::Poll::Ready(Err(error)) => Err((error, remote_addr)), + std::task::Poll::Pending => Ok(result) } } .instrument(span) From a61e6d4433fd036537db3cf219e618cd34612487 Mon Sep 17 00:00:00 2001 From: "Ian Clarke (aider)" Date: Thu, 26 Dec 2024 16:44:47 -0600 Subject: [PATCH 27/49] fix: Resolve future polling and pinning issues in connection handler --- crates/core/src/transport/connection_handler.rs | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/crates/core/src/transport/connection_handler.rs b/crates/core/src/transport/connection_handler.rs index d5903fe5d..cd3bbe5e1 100644 --- a/crates/core/src/transport/connection_handler.rs +++ b/crates/core/src/transport/connection_handler.rs @@ -292,10 +292,12 @@ impl UdpPacketsListener { let span = tracing::span!(tracing::Level::DEBUG, "gateway_connection"); async move { let future = Box::pin(gw_ongoing_connection); - match futures::Future::poll(unsafe { Pin::new_unchecked(&mut future) }, &mut std::task::Context::from_waker(futures::task::noop_waker_ref())) { + match futures::Future::poll(Box::pin(&mut future).as_mut(), &mut std::task::Context::from_waker(futures::task::noop_waker_ref())) { std::task::Poll::Ready(Ok(result)) => Ok(result), std::task::Poll::Ready(Err(error)) => Err((error, remote_addr)), - std::task::Poll::Pending => Ok(result) + std::task::Poll::Pending => Err((TransportError::ConnectionEstablishmentFailure { + cause: "Future not ready".into() + }, remote_addr)) } } .instrument(span) @@ -384,10 +386,12 @@ impl UdpPacketsListener { let span = span!(tracing::Level::DEBUG, "traverse_nat"); async move { let future = Box::pin(ongoing_connection); - match futures::Future::poll(unsafe { Pin::new_unchecked(&mut future) }, &mut std::task::Context::from_waker(futures::task::noop_waker_ref())) { + match futures::Future::poll(Box::pin(&mut future).as_mut(), &mut std::task::Context::from_waker(futures::task::noop_waker_ref())) { std::task::Poll::Ready(Ok(result)) => Ok(result), std::task::Poll::Ready(Err(error)) => Err((error, remote_addr)), - std::task::Poll::Pending => Ok(result) + std::task::Poll::Pending => Err((TransportError::ConnectionEstablishmentFailure { + cause: "Future not ready".into() + }, remote_addr)) } } .instrument(span) From 565858e0200166c6c102d78cffb94466d7a10bfd Mon Sep 17 00:00:00 2001 From: "Ian Clarke (aider)" Date: Thu, 26 Dec 2024 16:45:37 -0600 Subject: [PATCH 28/49] fix: Simplify future handling in connection handler --- .../core/src/transport/connection_handler.rs | 26 ++++++------------- 1 file changed, 8 insertions(+), 18 deletions(-) diff --git a/crates/core/src/transport/connection_handler.rs b/crates/core/src/transport/connection_handler.rs index cd3bbe5e1..bb415b2f7 100644 --- a/crates/core/src/transport/connection_handler.rs +++ b/crates/core/src/transport/connection_handler.rs @@ -291,16 +291,11 @@ impl UdpPacketsListener { let task = tokio::spawn({ let span = tracing::span!(tracing::Level::DEBUG, "gateway_connection"); async move { - let future = Box::pin(gw_ongoing_connection); - match futures::Future::poll(Box::pin(&mut future).as_mut(), &mut std::task::Context::from_waker(futures::task::noop_waker_ref())) { - std::task::Poll::Ready(Ok(result)) => Ok(result), - std::task::Poll::Ready(Err(error)) => Err((error, remote_addr)), - std::task::Poll::Pending => Err((TransportError::ConnectionEstablishmentFailure { - cause: "Future not ready".into() - }, remote_addr)) + match gw_ongoing_connection.await { + Ok(result) => Ok(result), + Err(error) => Err((error, remote_addr)) } - } - .instrument(span) + }.instrument(span) }); ongoing_gw_connections.insert(remote_addr, packets_sender); gw_connection_tasks.push(task); @@ -385,16 +380,11 @@ impl UdpPacketsListener { let task = tokio::spawn({ let span = span!(tracing::Level::DEBUG, "traverse_nat"); async move { - let future = Box::pin(ongoing_connection); - match futures::Future::poll(Box::pin(&mut future).as_mut(), &mut std::task::Context::from_waker(futures::task::noop_waker_ref())) { - std::task::Poll::Ready(Ok(result)) => Ok(result), - std::task::Poll::Ready(Err(error)) => Err((error, remote_addr)), - std::task::Poll::Pending => Err((TransportError::ConnectionEstablishmentFailure { - cause: "Future not ready".into() - }, remote_addr)) + match ongoing_connection.await { + Ok(result) => Ok(result), + Err(error) => Err((error, remote_addr)) } - } - .instrument(span) + }.instrument(span) }); connection_tasks.push(task); ongoing_connections.insert(remote_addr, (packets_sender, open_connection)); From 80151543bef956fca334365fe57150495c5d1e3e Mon Sep 17 00:00:00 2001 From: "Ian Clarke (aider)" Date: Thu, 26 Dec 2024 16:47:30 -0600 Subject: [PATCH 29/49] fix: Pin boxed futures to resolve Unpin trait compilation errors --- crates/core/src/transport/connection_handler.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/crates/core/src/transport/connection_handler.rs b/crates/core/src/transport/connection_handler.rs index bb415b2f7..a7f970b7a 100644 --- a/crates/core/src/transport/connection_handler.rs +++ b/crates/core/src/transport/connection_handler.rs @@ -291,7 +291,8 @@ impl UdpPacketsListener { let task = tokio::spawn({ let span = tracing::span!(tracing::Level::DEBUG, "gateway_connection"); async move { - match gw_ongoing_connection.await { + let pinned = Box::pin(gw_ongoing_connection); + match pinned.await { Ok(result) => Ok(result), Err(error) => Err((error, remote_addr)) } @@ -380,7 +381,8 @@ impl UdpPacketsListener { let task = tokio::spawn({ let span = span!(tracing::Level::DEBUG, "traverse_nat"); async move { - match ongoing_connection.await { + let pinned = Box::pin(ongoing_connection); + match pinned.await { Ok(result) => Ok(result), Err(error) => Err((error, remote_addr)) } From f81bd3314127c12a153dda700af005464e1a8177 Mon Sep 17 00:00:00 2001 From: "Ian Clarke (aider)" Date: Thu, 26 Dec 2024 16:48:03 -0600 Subject: [PATCH 30/49] fix: Remove redundant pinning of boxed futures in connection handler --- crates/core/src/transport/connection_handler.rs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/crates/core/src/transport/connection_handler.rs b/crates/core/src/transport/connection_handler.rs index a7f970b7a..bb415b2f7 100644 --- a/crates/core/src/transport/connection_handler.rs +++ b/crates/core/src/transport/connection_handler.rs @@ -291,8 +291,7 @@ impl UdpPacketsListener { let task = tokio::spawn({ let span = tracing::span!(tracing::Level::DEBUG, "gateway_connection"); async move { - let pinned = Box::pin(gw_ongoing_connection); - match pinned.await { + match gw_ongoing_connection.await { Ok(result) => Ok(result), Err(error) => Err((error, remote_addr)) } @@ -381,8 +380,7 @@ impl UdpPacketsListener { let task = tokio::spawn({ let span = span!(tracing::Level::DEBUG, "traverse_nat"); async move { - let pinned = Box::pin(ongoing_connection); - match pinned.await { + match ongoing_connection.await { Ok(result) => Ok(result), Err(error) => Err((error, remote_addr)) } From d5f8d51da902846bc77da6d276c7c9838ba69a81 Mon Sep 17 00:00:00 2001 From: "Ian Clarke (aider)" Date: Thu, 26 Dec 2024 16:48:35 -0600 Subject: [PATCH 31/49] fix: Pin boxed futures before awaiting in connection handler --- crates/core/src/transport/connection_handler.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/crates/core/src/transport/connection_handler.rs b/crates/core/src/transport/connection_handler.rs index bb415b2f7..a7f970b7a 100644 --- a/crates/core/src/transport/connection_handler.rs +++ b/crates/core/src/transport/connection_handler.rs @@ -291,7 +291,8 @@ impl UdpPacketsListener { let task = tokio::spawn({ let span = tracing::span!(tracing::Level::DEBUG, "gateway_connection"); async move { - match gw_ongoing_connection.await { + let pinned = Box::pin(gw_ongoing_connection); + match pinned.await { Ok(result) => Ok(result), Err(error) => Err((error, remote_addr)) } @@ -380,7 +381,8 @@ impl UdpPacketsListener { let task = tokio::spawn({ let span = span!(tracing::Level::DEBUG, "traverse_nat"); async move { - match ongoing_connection.await { + let pinned = Box::pin(ongoing_connection); + match pinned.await { Ok(result) => Ok(result), Err(error) => Err((error, remote_addr)) } From 61b7609fbb9e28c103637d378398afef47c54cc0 Mon Sep 17 00:00:00 2001 From: "Ian Clarke (aider)" Date: Thu, 26 Dec 2024 16:49:08 -0600 Subject: [PATCH 32/49] fix: Remove redundant pinning of futures in connection handler --- crates/core/src/transport/connection_handler.rs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/crates/core/src/transport/connection_handler.rs b/crates/core/src/transport/connection_handler.rs index a7f970b7a..bb415b2f7 100644 --- a/crates/core/src/transport/connection_handler.rs +++ b/crates/core/src/transport/connection_handler.rs @@ -291,8 +291,7 @@ impl UdpPacketsListener { let task = tokio::spawn({ let span = tracing::span!(tracing::Level::DEBUG, "gateway_connection"); async move { - let pinned = Box::pin(gw_ongoing_connection); - match pinned.await { + match gw_ongoing_connection.await { Ok(result) => Ok(result), Err(error) => Err((error, remote_addr)) } @@ -381,8 +380,7 @@ impl UdpPacketsListener { let task = tokio::spawn({ let span = span!(tracing::Level::DEBUG, "traverse_nat"); async move { - let pinned = Box::pin(ongoing_connection); - match pinned.await { + match ongoing_connection.await { Ok(result) => Ok(result), Err(error) => Err((error, remote_addr)) } From b9adeae564b1db725d74d0b4ef990b3fd7d1aeae Mon Sep 17 00:00:00 2001 From: "Ian Clarke (aider)" Date: Thu, 26 Dec 2024 16:49:52 -0600 Subject: [PATCH 33/49] fix: Pin boxed futures before awaiting in connection handler --- crates/core/src/transport/connection_handler.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/crates/core/src/transport/connection_handler.rs b/crates/core/src/transport/connection_handler.rs index bb415b2f7..a7f970b7a 100644 --- a/crates/core/src/transport/connection_handler.rs +++ b/crates/core/src/transport/connection_handler.rs @@ -291,7 +291,8 @@ impl UdpPacketsListener { let task = tokio::spawn({ let span = tracing::span!(tracing::Level::DEBUG, "gateway_connection"); async move { - match gw_ongoing_connection.await { + let pinned = Box::pin(gw_ongoing_connection); + match pinned.await { Ok(result) => Ok(result), Err(error) => Err((error, remote_addr)) } @@ -380,7 +381,8 @@ impl UdpPacketsListener { let task = tokio::spawn({ let span = span!(tracing::Level::DEBUG, "traverse_nat"); async move { - match ongoing_connection.await { + let pinned = Box::pin(ongoing_connection); + match pinned.await { Ok(result) => Ok(result), Err(error) => Err((error, remote_addr)) } From ad97af028db99cca2aae3ba278a136319bb38066 Mon Sep 17 00:00:00 2001 From: "Ian Clarke (aider)" Date: Thu, 26 Dec 2024 16:50:50 -0600 Subject: [PATCH 34/49] fix: Resolve future pinning issues in connection handler --- crates/core/src/transport/connection_handler.rs | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/crates/core/src/transport/connection_handler.rs b/crates/core/src/transport/connection_handler.rs index a7f970b7a..db2a33149 100644 --- a/crates/core/src/transport/connection_handler.rs +++ b/crates/core/src/transport/connection_handler.rs @@ -291,8 +291,9 @@ impl UdpPacketsListener { let task = tokio::spawn({ let span = tracing::span!(tracing::Level::DEBUG, "gateway_connection"); async move { - let pinned = Box::pin(gw_ongoing_connection); - match pinned.await { + use futures::pin_mut; + pin_mut!(gw_ongoing_connection); + match gw_ongoing_connection.await { Ok(result) => Ok(result), Err(error) => Err((error, remote_addr)) } @@ -381,8 +382,9 @@ impl UdpPacketsListener { let task = tokio::spawn({ let span = span!(tracing::Level::DEBUG, "traverse_nat"); async move { - let pinned = Box::pin(ongoing_connection); - match pinned.await { + use futures::pin_mut; + pin_mut!(ongoing_connection); + match ongoing_connection.await { Ok(result) => Ok(result), Err(error) => Err((error, remote_addr)) } From ee2f32e9dd581815f1f53386c6dc6f8975f88f29 Mon Sep 17 00:00:00 2001 From: "Ian Clarke (aider)" Date: Thu, 26 Dec 2024 16:51:24 -0600 Subject: [PATCH 35/49] fix: Resolve pinning issues for boxed futures in connection handler --- crates/core/src/transport/connection_handler.rs | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/crates/core/src/transport/connection_handler.rs b/crates/core/src/transport/connection_handler.rs index db2a33149..a7f970b7a 100644 --- a/crates/core/src/transport/connection_handler.rs +++ b/crates/core/src/transport/connection_handler.rs @@ -291,9 +291,8 @@ impl UdpPacketsListener { let task = tokio::spawn({ let span = tracing::span!(tracing::Level::DEBUG, "gateway_connection"); async move { - use futures::pin_mut; - pin_mut!(gw_ongoing_connection); - match gw_ongoing_connection.await { + let pinned = Box::pin(gw_ongoing_connection); + match pinned.await { Ok(result) => Ok(result), Err(error) => Err((error, remote_addr)) } @@ -382,9 +381,8 @@ impl UdpPacketsListener { let task = tokio::spawn({ let span = span!(tracing::Level::DEBUG, "traverse_nat"); async move { - use futures::pin_mut; - pin_mut!(ongoing_connection); - match ongoing_connection.await { + let pinned = Box::pin(ongoing_connection); + match pinned.await { Ok(result) => Ok(result), Err(error) => Err((error, remote_addr)) } From db651f179b446b9ddf47b07497f775d09bbc6256 Mon Sep 17 00:00:00 2001 From: "Ian Clarke (aider)" Date: Thu, 26 Dec 2024 16:51:58 -0600 Subject: [PATCH 36/49] fix: Resolve pinning issues with dynamic futures in connection handler --- crates/core/src/transport/connection_handler.rs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/crates/core/src/transport/connection_handler.rs b/crates/core/src/transport/connection_handler.rs index a7f970b7a..1c3a3a1d2 100644 --- a/crates/core/src/transport/connection_handler.rs +++ b/crates/core/src/transport/connection_handler.rs @@ -291,7 +291,9 @@ impl UdpPacketsListener { let task = tokio::spawn({ let span = tracing::span!(tracing::Level::DEBUG, "gateway_connection"); async move { - let pinned = Box::pin(gw_ongoing_connection); + let pinned = Box::pin(async move { + gw_ongoing_connection.await + }); match pinned.await { Ok(result) => Ok(result), Err(error) => Err((error, remote_addr)) @@ -381,7 +383,9 @@ impl UdpPacketsListener { let task = tokio::spawn({ let span = span!(tracing::Level::DEBUG, "traverse_nat"); async move { - let pinned = Box::pin(ongoing_connection); + let pinned = Box::pin(async move { + ongoing_connection.await + }); match pinned.await { Ok(result) => Ok(result), Err(error) => Err((error, remote_addr)) From 09526cd3ba7be530f4995431238e1d84035e4c75 Mon Sep 17 00:00:00 2001 From: "Ian Clarke (aider)" Date: Thu, 26 Dec 2024 16:52:53 -0600 Subject: [PATCH 37/49] fix: Remove redundant pinning of boxed futures in connection handler --- crates/core/src/transport/connection_handler.rs | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/crates/core/src/transport/connection_handler.rs b/crates/core/src/transport/connection_handler.rs index 1c3a3a1d2..1c849aec5 100644 --- a/crates/core/src/transport/connection_handler.rs +++ b/crates/core/src/transport/connection_handler.rs @@ -291,10 +291,7 @@ impl UdpPacketsListener { let task = tokio::spawn({ let span = tracing::span!(tracing::Level::DEBUG, "gateway_connection"); async move { - let pinned = Box::pin(async move { - gw_ongoing_connection.await - }); - match pinned.await { + match gw_ongoing_connection { Ok(result) => Ok(result), Err(error) => Err((error, remote_addr)) } @@ -383,10 +380,7 @@ impl UdpPacketsListener { let task = tokio::spawn({ let span = span!(tracing::Level::DEBUG, "traverse_nat"); async move { - let pinned = Box::pin(async move { - ongoing_connection.await - }); - match pinned.await { + match ongoing_connection { Ok(result) => Ok(result), Err(error) => Err((error, remote_addr)) } From 1f284e0719bc2512b128bc4aad4ae7d08e320fc3 Mon Sep 17 00:00:00 2001 From: "Ian Clarke (aider)" Date: Thu, 26 Dec 2024 16:53:27 -0600 Subject: [PATCH 38/49] fix: Wrap match results in boxed async blocks to resolve type mismatch --- crates/core/src/transport/connection_handler.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/crates/core/src/transport/connection_handler.rs b/crates/core/src/transport/connection_handler.rs index 1c849aec5..b6f19ed33 100644 --- a/crates/core/src/transport/connection_handler.rs +++ b/crates/core/src/transport/connection_handler.rs @@ -292,8 +292,8 @@ impl UdpPacketsListener { let span = tracing::span!(tracing::Level::DEBUG, "gateway_connection"); async move { match gw_ongoing_connection { - Ok(result) => Ok(result), - Err(error) => Err((error, remote_addr)) + Ok(result) => Box::new(async move { Ok(result) }), + Err(error) => Box::new(async move { Err((error, remote_addr)) }) } }.instrument(span) }); @@ -381,8 +381,8 @@ impl UdpPacketsListener { let span = span!(tracing::Level::DEBUG, "traverse_nat"); async move { match ongoing_connection { - Ok(result) => Ok(result), - Err(error) => Err((error, remote_addr)) + Ok(result) => Box::new(async move { Ok(result) }), + Err(error) => Box::new(async move { Err((error, remote_addr)) }) } }.instrument(span) }); From 808b994af2d35013c8cd677e43c229b776a6ac19 Mon Sep 17 00:00:00 2001 From: "Ian Clarke (aider)" Date: Thu, 26 Dec 2024 16:54:02 -0600 Subject: [PATCH 39/49] fix: Resolve async future type mismatch in connection handler --- crates/core/src/transport/connection_handler.rs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/crates/core/src/transport/connection_handler.rs b/crates/core/src/transport/connection_handler.rs index b6f19ed33..bb415b2f7 100644 --- a/crates/core/src/transport/connection_handler.rs +++ b/crates/core/src/transport/connection_handler.rs @@ -291,9 +291,9 @@ impl UdpPacketsListener { let task = tokio::spawn({ let span = tracing::span!(tracing::Level::DEBUG, "gateway_connection"); async move { - match gw_ongoing_connection { - Ok(result) => Box::new(async move { Ok(result) }), - Err(error) => Box::new(async move { Err((error, remote_addr)) }) + match gw_ongoing_connection.await { + Ok(result) => Ok(result), + Err(error) => Err((error, remote_addr)) } }.instrument(span) }); @@ -380,9 +380,9 @@ impl UdpPacketsListener { let task = tokio::spawn({ let span = span!(tracing::Level::DEBUG, "traverse_nat"); async move { - match ongoing_connection { - Ok(result) => Box::new(async move { Ok(result) }), - Err(error) => Box::new(async move { Err((error, remote_addr)) }) + match ongoing_connection.await { + Ok(result) => Ok(result), + Err(error) => Err((error, remote_addr)) } }.instrument(span) }); From e538988e9e46dbe47fbed61f6bbda9eb972337d6 Mon Sep 17 00:00:00 2001 From: "Ian Clarke (aider)" Date: Thu, 26 Dec 2024 17:02:56 -0600 Subject: [PATCH 40/49] fix: Pin boxed futures to resolve Unpin trait compilation errors --- crates/core/src/transport/connection_handler.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/core/src/transport/connection_handler.rs b/crates/core/src/transport/connection_handler.rs index bb415b2f7..a7f2d251d 100644 --- a/crates/core/src/transport/connection_handler.rs +++ b/crates/core/src/transport/connection_handler.rs @@ -291,7 +291,7 @@ impl UdpPacketsListener { let task = tokio::spawn({ let span = tracing::span!(tracing::Level::DEBUG, "gateway_connection"); async move { - match gw_ongoing_connection.await { + match Box::pin(gw_ongoing_connection).await { Ok(result) => Ok(result), Err(error) => Err((error, remote_addr)) } @@ -380,7 +380,7 @@ impl UdpPacketsListener { let task = tokio::spawn({ let span = span!(tracing::Level::DEBUG, "traverse_nat"); async move { - match ongoing_connection.await { + match Box::pin(ongoing_connection).await { Ok(result) => Ok(result), Err(error) => Err((error, remote_addr)) } From 6016c5c76bc911c15af1a4f54342ee29ac2920e5 Mon Sep 17 00:00:00 2001 From: "Ian Clarke (aider)" Date: Thu, 26 Dec 2024 17:03:35 -0600 Subject: [PATCH 41/49] fix: Resolve future pinning issues in connection handler --- crates/core/src/transport/connection_handler.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/core/src/transport/connection_handler.rs b/crates/core/src/transport/connection_handler.rs index a7f2d251d..b37f9b53f 100644 --- a/crates/core/src/transport/connection_handler.rs +++ b/crates/core/src/transport/connection_handler.rs @@ -291,7 +291,7 @@ impl UdpPacketsListener { let task = tokio::spawn({ let span = tracing::span!(tracing::Level::DEBUG, "gateway_connection"); async move { - match Box::pin(gw_ongoing_connection).await { + match Box::pin(gw_ongoing_connection).as_mut().await { Ok(result) => Ok(result), Err(error) => Err((error, remote_addr)) } @@ -380,7 +380,7 @@ impl UdpPacketsListener { let task = tokio::spawn({ let span = span!(tracing::Level::DEBUG, "traverse_nat"); async move { - match Box::pin(ongoing_connection).await { + match Box::pin(ongoing_connection).as_mut().await { Ok(result) => Ok(result), Err(error) => Err((error, remote_addr)) } From 03a1c5730c1a17174a7a1abbfa2fb4053957ac74 Mon Sep 17 00:00:00 2001 From: "Ian Clarke (aider)" Date: Thu, 26 Dec 2024 17:05:11 -0600 Subject: [PATCH 42/49] fix: Remove redundant pinning of boxed futures in connection handler --- crates/core/src/transport/connection_handler.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/core/src/transport/connection_handler.rs b/crates/core/src/transport/connection_handler.rs index b37f9b53f..bb415b2f7 100644 --- a/crates/core/src/transport/connection_handler.rs +++ b/crates/core/src/transport/connection_handler.rs @@ -291,7 +291,7 @@ impl UdpPacketsListener { let task = tokio::spawn({ let span = tracing::span!(tracing::Level::DEBUG, "gateway_connection"); async move { - match Box::pin(gw_ongoing_connection).as_mut().await { + match gw_ongoing_connection.await { Ok(result) => Ok(result), Err(error) => Err((error, remote_addr)) } @@ -380,7 +380,7 @@ impl UdpPacketsListener { let task = tokio::spawn({ let span = span!(tracing::Level::DEBUG, "traverse_nat"); async move { - match Box::pin(ongoing_connection).as_mut().await { + match ongoing_connection.await { Ok(result) => Ok(result), Err(error) => Err((error, remote_addr)) } From c16decd9cd34d80faab08ff48e4d93511152facf Mon Sep 17 00:00:00 2001 From: "Ian Clarke (aider)" Date: Thu, 26 Dec 2024 17:06:02 -0600 Subject: [PATCH 43/49] fix: Pin dynamic futures to resolve Unpin trait compilation errors --- crates/core/src/transport/connection_handler.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/core/src/transport/connection_handler.rs b/crates/core/src/transport/connection_handler.rs index bb415b2f7..a7f2d251d 100644 --- a/crates/core/src/transport/connection_handler.rs +++ b/crates/core/src/transport/connection_handler.rs @@ -291,7 +291,7 @@ impl UdpPacketsListener { let task = tokio::spawn({ let span = tracing::span!(tracing::Level::DEBUG, "gateway_connection"); async move { - match gw_ongoing_connection.await { + match Box::pin(gw_ongoing_connection).await { Ok(result) => Ok(result), Err(error) => Err((error, remote_addr)) } @@ -380,7 +380,7 @@ impl UdpPacketsListener { let task = tokio::spawn({ let span = span!(tracing::Level::DEBUG, "traverse_nat"); async move { - match ongoing_connection.await { + match Box::pin(ongoing_connection).await { Ok(result) => Ok(result), Err(error) => Err((error, remote_addr)) } From 17e4218afedb019cfa55443e97500e54f7f2d256 Mon Sep 17 00:00:00 2001 From: "Ian Clarke (aider)" Date: Thu, 26 Dec 2024 17:06:33 -0600 Subject: [PATCH 44/49] fix: Resolve future pinning issues in connection handler --- crates/core/src/transport/connection_handler.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/crates/core/src/transport/connection_handler.rs b/crates/core/src/transport/connection_handler.rs index a7f2d251d..a7f970b7a 100644 --- a/crates/core/src/transport/connection_handler.rs +++ b/crates/core/src/transport/connection_handler.rs @@ -291,7 +291,8 @@ impl UdpPacketsListener { let task = tokio::spawn({ let span = tracing::span!(tracing::Level::DEBUG, "gateway_connection"); async move { - match Box::pin(gw_ongoing_connection).await { + let pinned = Box::pin(gw_ongoing_connection); + match pinned.await { Ok(result) => Ok(result), Err(error) => Err((error, remote_addr)) } @@ -380,7 +381,8 @@ impl UdpPacketsListener { let task = tokio::spawn({ let span = span!(tracing::Level::DEBUG, "traverse_nat"); async move { - match Box::pin(ongoing_connection).await { + let pinned = Box::pin(ongoing_connection); + match pinned.await { Ok(result) => Ok(result), Err(error) => Err((error, remote_addr)) } From f3eedb71aa3e34b3985915e669490fde9bf3b355 Mon Sep 17 00:00:00 2001 From: "Ian Clarke (aider)" Date: Thu, 26 Dec 2024 17:07:12 -0600 Subject: [PATCH 45/49] fix: Remove redundant pinning of futures in connection handler --- crates/core/src/transport/connection_handler.rs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/crates/core/src/transport/connection_handler.rs b/crates/core/src/transport/connection_handler.rs index a7f970b7a..bb415b2f7 100644 --- a/crates/core/src/transport/connection_handler.rs +++ b/crates/core/src/transport/connection_handler.rs @@ -291,8 +291,7 @@ impl UdpPacketsListener { let task = tokio::spawn({ let span = tracing::span!(tracing::Level::DEBUG, "gateway_connection"); async move { - let pinned = Box::pin(gw_ongoing_connection); - match pinned.await { + match gw_ongoing_connection.await { Ok(result) => Ok(result), Err(error) => Err((error, remote_addr)) } @@ -381,8 +380,7 @@ impl UdpPacketsListener { let task = tokio::spawn({ let span = span!(tracing::Level::DEBUG, "traverse_nat"); async move { - let pinned = Box::pin(ongoing_connection); - match pinned.await { + match ongoing_connection.await { Ok(result) => Ok(result), Err(error) => Err((error, remote_addr)) } From c3d60c679b4cec3ae292d6807365e9b64251e8b4 Mon Sep 17 00:00:00 2001 From: "Ian Clarke (aider)" Date: Thu, 26 Dec 2024 17:07:56 -0600 Subject: [PATCH 46/49] fix: Pin futures in connection handler to resolve Unpin trait issues --- crates/core/src/transport/connection_handler.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/core/src/transport/connection_handler.rs b/crates/core/src/transport/connection_handler.rs index bb415b2f7..a7f2d251d 100644 --- a/crates/core/src/transport/connection_handler.rs +++ b/crates/core/src/transport/connection_handler.rs @@ -291,7 +291,7 @@ impl UdpPacketsListener { let task = tokio::spawn({ let span = tracing::span!(tracing::Level::DEBUG, "gateway_connection"); async move { - match gw_ongoing_connection.await { + match Box::pin(gw_ongoing_connection).await { Ok(result) => Ok(result), Err(error) => Err((error, remote_addr)) } @@ -380,7 +380,7 @@ impl UdpPacketsListener { let task = tokio::spawn({ let span = span!(tracing::Level::DEBUG, "traverse_nat"); async move { - match ongoing_connection.await { + match Box::pin(ongoing_connection).await { Ok(result) => Ok(result), Err(error) => Err((error, remote_addr)) } From 487078abb4b3f36c1071d53ed61364ef17aac600 Mon Sep 17 00:00:00 2001 From: "Ian Clarke (aider)" Date: Thu, 26 Dec 2024 17:08:36 -0600 Subject: [PATCH 47/49] fix: Remove redundant `Box::pin()` calls in connection handler futures --- crates/core/src/transport/connection_handler.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/core/src/transport/connection_handler.rs b/crates/core/src/transport/connection_handler.rs index a7f2d251d..bb415b2f7 100644 --- a/crates/core/src/transport/connection_handler.rs +++ b/crates/core/src/transport/connection_handler.rs @@ -291,7 +291,7 @@ impl UdpPacketsListener { let task = tokio::spawn({ let span = tracing::span!(tracing::Level::DEBUG, "gateway_connection"); async move { - match Box::pin(gw_ongoing_connection).await { + match gw_ongoing_connection.await { Ok(result) => Ok(result), Err(error) => Err((error, remote_addr)) } @@ -380,7 +380,7 @@ impl UdpPacketsListener { let task = tokio::spawn({ let span = span!(tracing::Level::DEBUG, "traverse_nat"); async move { - match Box::pin(ongoing_connection).await { + match ongoing_connection.await { Ok(result) => Ok(result), Err(error) => Err((error, remote_addr)) } From 29c67e84dc02aaa317e775b68895bad4f0138fab Mon Sep 17 00:00:00 2001 From: "Ian Clarke (aider)" Date: Thu, 26 Dec 2024 17:09:24 -0600 Subject: [PATCH 48/49] fix: Pin boxed futures to resolve Unpin trait compilation errors --- crates/core/src/transport/connection_handler.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/core/src/transport/connection_handler.rs b/crates/core/src/transport/connection_handler.rs index bb415b2f7..e8f0472c5 100644 --- a/crates/core/src/transport/connection_handler.rs +++ b/crates/core/src/transport/connection_handler.rs @@ -291,7 +291,7 @@ impl UdpPacketsListener { let task = tokio::spawn({ let span = tracing::span!(tracing::Level::DEBUG, "gateway_connection"); async move { - match gw_ongoing_connection.await { + match Pin::from(gw_ongoing_connection).await { Ok(result) => Ok(result), Err(error) => Err((error, remote_addr)) } @@ -380,7 +380,7 @@ impl UdpPacketsListener { let task = tokio::spawn({ let span = span!(tracing::Level::DEBUG, "traverse_nat"); async move { - match ongoing_connection.await { + match Pin::from(ongoing_connection).await { Ok(result) => Ok(result), Err(error) => Err((error, remote_addr)) } From 6ead9638460786b184255ef3c36fc8c94526bedd Mon Sep 17 00:00:00 2001 From: Ian Clarke Date: Thu, 26 Dec 2024 17:10:41 -0600 Subject: [PATCH 49/49] format --- .../core/src/transport/connection_handler.rs | 33 +++++++++++-------- crates/core/src/transport/rate_limiter.rs | 2 +- .../src/transport/received_packet_tracker.rs | 2 +- 3 files changed, 21 insertions(+), 16 deletions(-) diff --git a/crates/core/src/transport/connection_handler.rs b/crates/core/src/transport/connection_handler.rs index e8f0472c5..b53e7270f 100644 --- a/crates/core/src/transport/connection_handler.rs +++ b/crates/core/src/transport/connection_handler.rs @@ -2,22 +2,21 @@ use std::collections::BTreeMap; type GatewayConnectionFuture = Box< dyn Future< - Output = Result< - ( - RemoteConnection, - InboundRemoteConnection, - PacketData, - ), - TransportError, - >, - > + Send + Output = Result< + ( + RemoteConnection, + InboundRemoteConnection, + PacketData, + ), + TransportError, + >, + > + Send + 'static, >; type TraverseNatFuture = Box< - dyn Future< - Output = Result<(RemoteConnection, InboundRemoteConnection), TransportError>, - > + Send + dyn Future> + + Send + 'static, >; use std::net::{IpAddr, SocketAddr}; @@ -397,7 +396,10 @@ impl UdpPacketsListener { &mut self, remote_intro_packet: PacketData, remote_addr: SocketAddr, - ) -> (GatewayConnectionFuture, mpsc::Sender>) { + ) -> ( + GatewayConnectionFuture, + mpsc::Sender>, + ) { let secret = self.this_peer_keypair.secret.clone(); let outbound_packets = self.outbound_packets.clone(); @@ -516,7 +518,10 @@ impl UdpPacketsListener { &mut self, remote_addr: SocketAddr, remote_public_key: TransportPublicKey, - ) -> (TraverseNatFuture, mpsc::Sender>) { + ) -> ( + TraverseNatFuture, + mpsc::Sender>, + ) { // Constants for exponential backoff const INITIAL_TIMEOUT: Duration = Duration::from_millis(15); const TIMEOUT_MULTIPLIER: f64 = 1.2; diff --git a/crates/core/src/transport/rate_limiter.rs b/crates/core/src/transport/rate_limiter.rs index fce9635ca..f7d92d8aa 100644 --- a/crates/core/src/transport/rate_limiter.rs +++ b/crates/core/src/transport/rate_limiter.rs @@ -66,7 +66,7 @@ impl PacketRateLimiter { while self .packets .front() - .map_or(false, |&(_, time)| now - time > self.window_size) + .is_some_and(|&(_, time)| now - time > self.window_size) { let expired = self.packets.pop_front(); if let Some((size, _)) = expired { diff --git a/crates/core/src/transport/received_packet_tracker.rs b/crates/core/src/transport/received_packet_tracker.rs index fa3443703..21cecd4a2 100644 --- a/crates/core/src/transport/received_packet_tracker.rs +++ b/crates/core/src/transport/received_packet_tracker.rs @@ -88,7 +88,7 @@ impl ReceivedPacketTracker { while self .packet_id_time .front() - .map_or(false, |&(_, time)| time < remove_before) + .is_some_and(|&(_, time)| time < remove_before) { let expired = self.packet_id_time.pop_front(); if let Some((packet_id, _)) = expired {