diff --git a/Cargo.lock b/Cargo.lock index a53db661..f5f0e4a1 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2,6 +2,41 @@ # It is not intended for manual editing. version = 4 +[[package]] +name = "aead" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d122413f284cf2d62fb1b7db97e02edb8cda96d769b16e443a4f6195e35662b0" +dependencies = [ + "crypto-common 0.1.7", + "generic-array", +] + +[[package]] +name = "aes" +version = "0.8.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b169f7a6d4742236a0a00c541b845991d0ac43e546831af1249753ab4c3aa3a0" +dependencies = [ + "cfg-if", + "cipher", + "cpufeatures", +] + +[[package]] +name = "aes-gcm" +version = "0.10.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "831010a0f742e1209b3bcea8fab6a8e149051ba6099432c8cb2cc117dec3ead1" +dependencies = [ + "aead", + "aes", + "cipher", + "ctr", + "ghash", + "subtle", +] + [[package]] name = "aho-corasick" version = "1.1.4" @@ -28,9 +63,9 @@ dependencies = [ [[package]] name = "anstream" -version = "0.6.21" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43d5b281e737544384e969a5ccad3f1cdd24b48086a0fc1b2a5262a26b8f4f4a" +checksum = "824a212faf96e9acacdbd09febd34438f8f711fb84e09a8916013cd7815ca28d" dependencies = [ "anstyle", "anstyle-parse", @@ -43,15 +78,15 @@ dependencies = [ [[package]] name = "anstyle" -version = "1.0.13" +version = "1.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5192cca8006f1fd4f7237516f40fa183bb07f8fbdfedaa0036de5ea9b0b45e78" +checksum = "940b3a0ca603d1eade50a4846a2afffd5ef57a9feac2c0e2ec2e14f9ead76000" [[package]] name = "anstyle-parse" -version = "0.2.7" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4e7644824f0aa2c7b9384579234ef10eb7efb6a0deb83f9630a49594dd9c15c2" +checksum = "52ce7f38b242319f7cabaa6813055467063ecdc9d355bbb4ce0c68908cd8130e" dependencies = [ "utf8parse", ] @@ -78,9 +113,9 @@ dependencies = [ [[package]] name = "anyhow" -version = "1.0.100" +version = "1.0.102" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a23eb6b1614318a8071c9b2521f36b424b2c83db5eb3a0fead4a6c0809af6e61" +checksum = "7f202df86484c868dbad7eaa557ef785d5c66295e41b460ef922eca0723b842c" [[package]] name = "arrayref" @@ -133,19 +168,6 @@ dependencies = [ "syn", ] -[[package]] -name = "async-compat" -version = "0.2.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1ba85bc55464dcbf728b56d97e119d673f4cf9062be330a9a26f3acf504a590" -dependencies = [ - "futures-core", - "futures-io", - "once_cell", - "pin-project-lite", - "tokio", -] - [[package]] name = "async-trait" version = "0.1.89" @@ -232,9 +254,9 @@ checksum = "2af50177e190e07a26ab74f8b1efbfe2ef87da2116221318cb1c2e82baf7de06" [[package]] name = "bitflags" -version = "2.10.0" +version = "2.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "812e12b5285cc515a9c72a5c1d3b6d46a19dac5acfef5265968c166106e31dd3" +checksum = "843867be96c8daad0d758b57df9392b6d8d271134fce549de6ce169ff98a92af" [[package]] name = "blake3" @@ -270,9 +292,9 @@ dependencies = [ [[package]] name = "bumpalo" -version = "3.19.1" +version = "3.20.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5dd9dc738b7a8311c7ade152424974d8115f2cdad61e8dab8dac9f2362298510" +checksum = "5d20789868f4b01b2f2caec9f5c4e0213b41e3e5702a50157d699ae31ced2fcb" [[package]] name = "byteorder" @@ -282,15 +304,15 @@ checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" [[package]] name = "bytes" -version = "1.11.0" +version = "1.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b35204fbdc0b3f4446b89fc1ac2cf84a8a68971995d0bf2e925ec7cd960f9cb3" +checksum = "1e748733b7cbc798e1434b6ac524f0c1ff2ab456fe201501e6497c8417a4fc33" [[package]] name = "cc" -version = "1.2.54" +version = "1.2.57" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6354c81bbfd62d9cfa9cb3c773c2b7b2a3a482d569de977fd0e961f6e7c00583" +checksum = "7a0dd1ca384932ff3641c8718a02769f1698e7563dc6974ffd03346116310423" dependencies = [ "find-msvc-tools", "shlex", @@ -310,9 +332,9 @@ checksum = "613afe47fcd5fac7ccf1db93babcb082c5994d996f20b8b159f2ad1658eb5724" [[package]] name = "chrono" -version = "0.4.43" +version = "0.4.44" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fac4744fb15ae8337dc853fee7fb3f4e48c0fbaa23d0afe49c447b4fab126118" +checksum = "c673075a2e0e5f4a1dde27ce9dee1ea4558c7ffe648f576438a20ca1d2acc4b0" dependencies = [ "iana-time-zone", "num-traits", @@ -320,11 +342,21 @@ dependencies = [ "windows-link", ] +[[package]] +name = "cipher" +version = "0.4.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "773f3b9af64447d2ce9850330c473515014aa235e6a783b02db81ff39e4a3dad" +dependencies = [ + "crypto-common 0.1.7", + "inout", +] + [[package]] name = "clap" -version = "4.5.55" +version = "4.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3e34525d5bbbd55da2bb745d34b36121baac88d07619a9a09cfcf4a6c0832785" +checksum = "b193af5b67834b676abd72466a96c1024e6a6ad978a1f484bd90b85c94041351" dependencies = [ "clap_builder", "clap_derive", @@ -332,9 +364,9 @@ dependencies = [ [[package]] name = "clap_builder" -version = "4.5.55" +version = "4.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "59a20016a20a3da95bef50ec7238dbd09baeef4311dcdd38ec15aba69812fb61" +checksum = "714a53001bf66416adb0e2ef5ac857140e7dc3a0c48fb28b2f10762fc4b5069f" dependencies = [ "anstream", "anstyle", @@ -344,9 +376,9 @@ dependencies = [ [[package]] name = "clap_derive" -version = "4.5.55" +version = "4.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a92793da1a46a5f2a02a6f4c46c6496b28c43638adea8306fcb0caa1634f24e5" +checksum = "1110bd8a634a1ab8cb04345d8d878267d57c3cf1b38d91b71af6686408bbca6a" dependencies = [ "heck", "proc-macro2", @@ -356,9 +388,9 @@ dependencies = [ [[package]] name = "clap_lex" -version = "0.7.7" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3e64b0cc0439b12df2fa678eae89a1c56a529fd067a9115f7827f1fffd22b32" +checksum = "c8d4a3bb8b1e0c1050499d1815f5ab16d04f0959b233085fb31653fbfc9d98f9" [[package]] name = "cobs" @@ -371,9 +403,9 @@ dependencies = [ [[package]] name = "colorchoice" -version = "1.0.4" +version = "1.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b05b61dc5112cbb17e4b6cd61790d9845d13888356391624cbe7e41efeac1e75" +checksum = "1d07550c9036bf2ae0c684c4297d503f838287c83c53686d05370d0e139ae570" [[package]] name = "const-oid" @@ -453,13 +485,32 @@ checksum = "d0a5c400df2834b80a4c3327b3aad3a4c4cd4de0629063962b03235697506a28" [[package]] name = "crypto-common" -version = "0.2.0-rc.13" +version = "0.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c7722afd27468475c9b6063dc03a57ef2ca833816981619f8ebe64d38d207eef" +checksum = "78c8292055d1c1df0cce5d180393dc8cce0abec0a7102adb6c7b1eef6016d60a" +dependencies = [ + "generic-array", + "typenum", +] + +[[package]] +name = "crypto-common" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77727bb15fa921304124b128af125e7e3b968275d1b108b379190264f4423710" dependencies = [ "hybrid-array", ] +[[package]] +name = "ctr" +version = "0.9.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0369ee1ad671834580515889b80f2ea915f23b8be8d0daa4bbaf2ac5c7590835" +dependencies = [ + "cipher", +] + [[package]] name = "curve25519-dalek" version = "5.0.0-pre.1" @@ -532,9 +583,9 @@ checksum = "d7a1e2f27636f116493b8b860f5546edb47c8d8f8ea73e1d2a20be88e28d1fea" [[package]] name = "der" -version = "0.8.0-rc.10" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "02c1d73e9668ea6b6a28172aa55f3ebec38507131ce179051c8033b5c6037653" +checksum = "71fd89660b2dc699704064e59e9dba0147b903e85319429e131620d022be411b" dependencies = [ "const-oid", "pem-rfc7468", @@ -557,9 +608,9 @@ dependencies = [ [[package]] name = "deranged" -version = "0.5.5" +version = "0.5.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ececcb659e7ba858fb4f10388c250a7252eb0a27373f1a72b8748afdd248e587" +checksum = "7cd812cc2bc1d69d4764bd80df88b4317eaef9e773c75226407d9bc0876b211c" dependencies = [ "powerfmt", ] @@ -626,19 +677,20 @@ checksum = "ab03c107fafeb3ee9f5925686dbb7a73bc76e3932abb0d2b365cb64b169cf04c" [[package]] name = "digest" -version = "0.11.0-rc.9" +version = "0.11.0-rc.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bff8de092798697546237a3a701e4174fe021579faec9b854379af9bf1e31962" +checksum = "afa94b64bfc6549e6e4b5a3216f22593224174083da7a90db47e951c4fb31725" dependencies = [ "block-buffer", - "crypto-common", + "const-oid", + "crypto-common 0.2.1", ] [[package]] name = "dispatch2" -version = "0.3.0" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89a09f22a6c6069a18470eb92d2298acf25463f14256d24778e1230d789a2aec" +checksum = "1e0e367e4e7da84520dedcac1901e4da967309406d1e51017ae1abfb97adbd38" dependencies = [ "bitflags", "block2", @@ -677,17 +729,11 @@ dependencies = [ "litrs", ] -[[package]] -name = "dyn-clone" -version = "1.0.20" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d0881ea181b1df73ff77ffaaf9c7544ecc11e82fba9b5f27b262a3c73a332555" - [[package]] name = "ed25519" -version = "3.0.0-rc.3" +version = "3.0.0-rc.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d058004dae83c9cf58f3d81612d0296bbf0a52dd7d7b6afa30ab7228bb6119f" +checksum = "c6e914c7c52decb085cea910552e24c63ac019e3ab8bf001ff736da9a9d9d890" dependencies = [ "pkcs8", "serde", @@ -787,9 +833,9 @@ checksum = "64cd1e32ddd350061ae6edb1b082d7c54915b5c672c389143b9a63403a109f24" [[package]] name = "find-msvc-tools" -version = "0.1.8" +version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8591b0bcc8a98a64310a2fae1bb3e9b8564dd10e381e6e28010fde8e8e8568db" +checksum = "5baebc0774151f905a1a2cc41989300b1e6fbb29aff0ceffa1064fdd3088d582" [[package]] name = "fnv" @@ -797,6 +843,12 @@ version = "1.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" +[[package]] +name = "foldhash" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d9c4f5dac5e15c24eb999c26181a6ca40b39fe946cbe4c263c7209467bc83af2" + [[package]] name = "foldhash" version = "0.2.0" @@ -814,9 +866,9 @@ dependencies = [ [[package]] name = "futures" -version = "0.3.31" +version = "0.3.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "65bc07b1a8bc7c85c5f2e110c476c7389b4554ba72af57d8445ea63a576b0876" +checksum = "8b147ee9d1f6d097cef9ce628cd2ee62288d963e16fb287bd9286455b241382d" dependencies = [ "futures-channel", "futures-core", @@ -829,9 +881,9 @@ dependencies = [ [[package]] name = "futures-buffered" -version = "0.2.12" +version = "0.2.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a8e0e1f38ec07ba4abbde21eed377082f17ccb988be9d988a5adbf4bafc118fd" +checksum = "4421cb78ee172b6b06080093479d3c50f058e7c81b7d577bbb8d118d551d4cd5" dependencies = [ "cordyceps", "diatomic-waker", @@ -842,9 +894,9 @@ dependencies = [ [[package]] name = "futures-channel" -version = "0.3.31" +version = "0.3.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2dff15bf788c671c1934e366d07e30c1814a8ef514e1af724a602e8a2fbe1b10" +checksum = "07bbe89c50d7a535e539b8c17bc0b49bdb77747034daa8087407d655f3f7cc1d" dependencies = [ "futures-core", "futures-sink", @@ -852,15 +904,15 @@ dependencies = [ [[package]] name = "futures-core" -version = "0.3.31" +version = "0.3.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05f29059c0c2090612e8d742178b0580d2dc940c837851ad723096f87af6663e" +checksum = "7e3450815272ef58cec6d564423f6e755e25379b217b0bc688e295ba24df6b1d" [[package]] name = "futures-executor" -version = "0.3.31" +version = "0.3.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e28d1d997f585e54aebc3f97d39e72338912123a67330d723fdbb564d646c9f" +checksum = "baf29c38818342a3b26b5b923639e7b1f4a61fc5e76102d4b1981c6dc7a7579d" dependencies = [ "futures-core", "futures-task", @@ -869,9 +921,9 @@ dependencies = [ [[package]] name = "futures-io" -version = "0.3.31" +version = "0.3.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e5c1b78ca4aae1ac06c48a526a655760685149f0d465d21f37abfe57ce075c6" +checksum = "cecba35d7ad927e23624b22ad55235f2239cfa44fd10428eecbeba6d6a717718" [[package]] name = "futures-lite" @@ -888,9 +940,9 @@ dependencies = [ [[package]] name = "futures-macro" -version = "0.3.31" +version = "0.3.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "162ee34ebcb7c64a8abebc059ce0fee27c2262618d7b60ed8faf72fef13c3650" +checksum = "e835b70203e41293343137df5c0664546da5745f82ec9b84d40be8336958447b" dependencies = [ "proc-macro2", "quote", @@ -899,21 +951,21 @@ dependencies = [ [[package]] name = "futures-sink" -version = "0.3.31" +version = "0.3.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e575fab7d1e0dcb8d0c7bcf9a63ee213816ab51902e6d244a95819acacf1d4f7" +checksum = "c39754e157331b013978ec91992bde1ac089843443c49cbc7f46150b0fad0893" [[package]] name = "futures-task" -version = "0.3.31" +version = "0.3.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f90f7dce0722e95104fcb095585910c0977252f286e354b5e3bd38902cd99988" +checksum = "037711b3d59c33004d3856fbdc83b99d4ff37a24768fa1be9ce3538a1cde4393" [[package]] name = "futures-util" -version = "0.3.31" +version = "0.3.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9fa08315bb612088cc391249efdc3bc77536f16c91f6cf495e6fbe85b20a4a81" +checksum = "389ca41296e6190b48053de0321d02a77f32f8a5d2461dd38762c0593805c6d6" dependencies = [ "futures-channel", "futures-core", @@ -923,7 +975,6 @@ dependencies = [ "futures-task", "memchr", "pin-project-lite", - "pin-utils", "slab", ] @@ -942,6 +993,16 @@ dependencies = [ "windows-result", ] +[[package]] +name = "generic-array" +version = "0.14.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" +dependencies = [ + "typenum", + "version_check", +] + [[package]] name = "getrandom" version = "0.2.17" @@ -964,11 +1025,36 @@ dependencies = [ "cfg-if", "js-sys", "libc", - "r-efi", + "r-efi 5.3.0", "wasip2", "wasm-bindgen", ] +[[package]] +name = "getrandom" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0de51e6874e94e7bf76d726fc5d13ba782deca734ff60d5bb2fb2607c7406555" +dependencies = [ + "cfg-if", + "js-sys", + "libc", + "r-efi 6.0.0", + "wasip2", + "wasip3", + "wasm-bindgen", +] + +[[package]] +name = "ghash" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0d8a4362ccb29cb0b265253fb0a2728f592895ee6854fd9bc13f2ffda266ff1" +dependencies = [ + "opaque-debug", + "polyval", +] + [[package]] name = "glob" version = "0.3.3" @@ -1015,6 +1101,15 @@ dependencies = [ "byteorder", ] +[[package]] +name = "hashbrown" +version = "0.15.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9229cfe53dfd69f0609a49f65461bd93001ea1ef889cd5529dd176593f5338a1" +dependencies = [ + "foldhash 0.1.5", +] + [[package]] name = "hashbrown" version = "0.16.1" @@ -1023,7 +1118,7 @@ checksum = "841d1cc9bed7f9236f321df977030373f4a4163ae1a7dbfe1a51a2c1a51d9100" dependencies = [ "allocator-api2", "equivalent", - "foldhash", + "foldhash 0.2.0", ] [[package]] @@ -1152,9 +1247,9 @@ checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9" [[package]] name = "hybrid-array" -version = "0.4.6" +version = "0.4.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b41fb3dc24fe72c2e3a4685eed55917c2fb228851257f4a8f2d985da9443c3e5" +checksum = "8655f91cd07f2b9d0c24137bd650fe69617773435ee5ec83022377777ce65ef1" dependencies = [ "typenum", ] @@ -1201,14 +1296,13 @@ dependencies = [ [[package]] name = "hyper-util" -version = "0.1.19" +version = "0.1.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "727805d60e7938b76b826a6ef209eb70eaa1812794f9424d4a4e2d740662df5f" +checksum = "96547c2556ec9d12fb1578c4eaf448b04993e7fb79cbaad930a656880a6bdfa0" dependencies = [ "base64", "bytes", "futures-channel", - "futures-core", "futures-util", "http", "http-body", @@ -1217,7 +1311,7 @@ dependencies = [ "libc", "percent-encoding", "pin-project-lite", - "socket2 0.6.2", + "socket2 0.6.3", "tokio", "tower-service", "tracing", @@ -1328,6 +1422,12 @@ dependencies = [ "zerovec", ] +[[package]] +name = "id-arena" +version = "2.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3d3067d79b975e8844ca9eb072e16b31c3c1c36928edf9c6789548c524d0d954" + [[package]] name = "ident_case" version = "1.0.1" @@ -1389,7 +1489,18 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7714e70437a7dc3ac8eb7e6f8df75fd8eb422675fc7678aff7364301092b1017" dependencies = [ "equivalent", - "hashbrown", + "hashbrown 0.16.1", + "serde", + "serde_core", +] + +[[package]] +name = "inout" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "879f10e63c20629ecabbb64a8010319738c66a5cd0c29b02d63d272b03751d01" +dependencies = [ + "generic-array", ] [[package]] @@ -1406,9 +1517,9 @@ dependencies = [ [[package]] name = "ipnet" -version = "2.11.0" +version = "2.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "469fb0b9cefa57e3ef31275ee7cacb78f2fdca44e4765491884a2b119d4eb130" +checksum = "d98f6fed1fde3f8c21bc40a1abb88dd75e67924f9cffc3ef95607bad8017f8e2" [[package]] name = "iri-string" @@ -1422,9 +1533,9 @@ dependencies = [ [[package]] name = "iroh" -version = "0.96.0" +version = "0.97.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3790cc3a5ef6a89a1e30b64de54de31e692958e2dc8a37cf2831d52c76805de9" +checksum = "feb56e7e4b0ec7fba7efa6a236b016a52b5d927d50244aceb9e20566159b1a32" dependencies = [ "backon", "bytes", @@ -1436,22 +1547,22 @@ dependencies = [ "getrandom 0.3.4", "hickory-resolver", "http", - "igd-next", + "ipnet", "iroh-base", "iroh-metrics", - "iroh-quinn", - "iroh-quinn-proto", - "iroh-quinn-udp 0.8.0", "iroh-relay", "n0-error", "n0-future", "n0-watcher", - "netdev", - "netwatch 0.14.0", + "netwatch", + "noq", + "noq-proto", + "noq-udp", "papaya", "pin-project", "pkarr", "pkcs8", + "portable-atomic", "portmapper", "rand", "reqwest", @@ -1475,17 +1586,19 @@ dependencies = [ [[package]] name = "iroh-base" -version = "0.96.0" +version = "0.97.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4c3fc0440c8775bf2677a58550fcef7e544346add01bf1b163f9fc0cedd436e" +checksum = "55a354e3396b62c14717ee807dfee9a7f43f6dad47e4ac0fd1d49f1ffad14ef0" dependencies = [ "curve25519-dalek", "data-encoding", "derive_more", + "digest", "ed25519-dalek", "n0-error", "rand_core", "serde", + "sha2", "url", "zeroize", "zeroize_derive", @@ -1493,13 +1606,14 @@ dependencies = [ [[package]] name = "iroh-metrics" -version = "0.38.2" +version = "0.38.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c946095f060e6e59b9ff30cc26c75cdb758e7fb0cde8312c89e2144654989fcb" +checksum = "761b45ba046134b11eb3e432fa501616b45c4bf3a30c21717578bc07aa6461dd" dependencies = [ "iroh-metrics-derive", "itoa", "n0-error", + "portable-atomic", "postcard", "ryu", "serde", @@ -1518,84 +1632,11 @@ dependencies = [ "syn", ] -[[package]] -name = "iroh-quinn" -version = "0.16.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d8a207ea77da14b683e8d454088795b6ac38e5d5cf26ded6868b9d80392cf8c1" -dependencies = [ - "bytes", - "cfg_aliases", - "iroh-quinn-proto", - "iroh-quinn-udp 0.8.0", - "pin-project-lite", - "rustc-hash", - "rustls", - "socket2 0.6.2", - "thiserror", - "tokio", - "tokio-stream", - "tracing", - "web-time", -] - -[[package]] -name = "iroh-quinn-proto" -version = "0.15.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f66e567aa8b052c5632b8fc902fbb503891eda705553494ccddf3505257be40" -dependencies = [ - "bytes", - "derive_more", - "enum-assoc", - "fastbloom", - "getrandom 0.3.4", - "identity-hash", - "lru-slab", - "rand", - "ring", - "rustc-hash", - "rustls", - "rustls-pki-types", - "slab", - "sorted-index-buffer", - "thiserror", - "tinyvec", - "tracing", - "web-time", -] - -[[package]] -name = "iroh-quinn-udp" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a91fe9ec3db6615d7ab1b303717f3b98fc40b96955a4ea25b113b1b879f7481f" -dependencies = [ - "cfg_aliases", - "libc", - "socket2 0.6.2", - "tracing", - "windows-sys 0.61.2", -] - -[[package]] -name = "iroh-quinn-udp" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f981dadd5a072a9e0efcd24bdcc388e570073f7e51b33505ceb1ef4668c80c86" -dependencies = [ - "cfg_aliases", - "libc", - "socket2 0.6.2", - "tracing", - "windows-sys 0.61.2", -] - [[package]] name = "iroh-relay" -version = "0.96.0" +version = "0.97.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "236c6f131ce774f7cc7548f467890c313b09f7849b8d703360d6602bc8c5184c" +checksum = "d786b260cadfe82ae0b6a9e372e8c78949096a06c857d1c3521355cefced0f55" dependencies = [ "blake3", "bytes", @@ -1610,11 +1651,11 @@ dependencies = [ "hyper-util", "iroh-base", "iroh-metrics", - "iroh-quinn", - "iroh-quinn-proto", "lru", "n0-error", "n0-future", + "noq", + "noq-proto", "num_enum", "pin-project", "pkarr", @@ -1646,10 +1687,10 @@ dependencies = [ "derive_more", "futures-buffered", "futures-util", - "iroh-quinn", "irpc-derive", "n0-error", "n0-future", + "noq", "postcard", "rcgen", "rustls", @@ -1710,9 +1751,9 @@ checksum = "92ecc6618181def0457392ccd0ee51198e065e016d1d527a7ac1b6dc7c1f09d2" [[package]] name = "js-sys" -version = "0.3.85" +version = "0.3.91" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c942ebf8e95485ca0d52d97da7c5a2c387d0e7f0ba4c35e93bfcaee045955b3" +checksum = "b49715b7073f385ba4bc528e5747d02e66cb39c6146efb66b781f131f0fb399c" dependencies = [ "once_cell", "wasm-bindgen", @@ -1724,11 +1765,17 @@ version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" +[[package]] +name = "leb128fmt" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09edd9e8b54e49e587e4f6295a7d29c3ea94d469cb40ab8ca70b288248a81db2" + [[package]] name = "libc" -version = "0.2.180" +version = "0.2.183" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bcc35a38544a891a5f7c865aca548a982ccb3b8650a5b06d0fd33a10283c56fc" +checksum = "b5b646652bf6661599e1da8901b3b9522896f01e736bad5f723fe7a3a27f899d" [[package]] name = "libm" @@ -1782,7 +1829,7 @@ version = "0.16.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a1dc47f592c06f33f8e3aea9591776ec7c9f9e4124778ff8a3c3b87159f7e593" dependencies = [ - "hashbrown", + "hashbrown 0.16.1", ] [[package]] @@ -1808,9 +1855,9 @@ dependencies = [ [[package]] name = "memchr" -version = "2.7.6" +version = "2.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f52b00d39961fc5b2736ea853c9cc86238e165017a493d1d5c8eac6bdc4cc273" +checksum = "f8ca58f447f06ed17d5fc4043ce1b10dd205e060fb3ce5b979b8ed8e59ff3f79" [[package]] name = "minimal-lexical" @@ -1831,9 +1878,9 @@ dependencies = [ [[package]] name = "moka" -version = "0.12.13" +version = "0.12.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4ac832c50ced444ef6be0767a008b02c106a909ba79d1d830501e94b96f6b7e" +checksum = "85f8024e1c8e71c778968af91d43700ce1d11b219d127d79fb2934153b82b42b" dependencies = [ "crossbeam-channel", "crossbeam-epoch", @@ -1890,9 +1937,9 @@ dependencies = [ [[package]] name = "n0-watcher" -version = "0.6.0" +version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba717c22ceec021ace0ff7674bf8fd60c9394605740a8201678fc1cb3a7398f6" +checksum = "38795f7932e6e9d1c6e989270ef5b3ff24ebb910e2c9d4bed2d28d8bae3007dc" dependencies = [ "derive_more", "n0-error", @@ -1901,9 +1948,9 @@ dependencies = [ [[package]] name = "netdev" -version = "0.40.0" +version = "0.40.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc9815643a243856e7bd84524e1ff739e901e846cfb06ad9627cd2b6d59bd737" +checksum = "1b0a0096d9613ee878dba89bbe595f079d373e3f1960d882e4f2f78ff9c30a0a" dependencies = [ "block2", "dispatch2", @@ -1912,7 +1959,7 @@ dependencies = [ "libc", "mac-addr", "netlink-packet-core", - "netlink-packet-route 0.25.1", + "netlink-packet-route", "netlink-sys", "objc2-core-foundation", "objc2-system-configuration", @@ -1932,21 +1979,9 @@ dependencies = [ [[package]] name = "netlink-packet-route" -version = "0.25.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3ec2f5b6839be2a19d7fa5aab5bc444380f6311c2b693551cb80f45caaa7b5ef" -dependencies = [ - "bitflags", - "libc", - "log", - "netlink-packet-core", -] - -[[package]] -name = "netlink-packet-route" -version = "0.28.0" +version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ce3636fa715e988114552619582b530481fd5ef176a1e5c1bf024077c2c9445" +checksum = "df9854ea6ad14e3f4698a7f03b65bce0833dd2d81d594a0e4a984170537146b6" dependencies = [ "bitflags", "libc", @@ -1983,15 +2018,14 @@ dependencies = [ [[package]] name = "netwatch" -version = "0.13.0" +version = "0.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "970729c08dbe7987d698f996c6b4945cbfdcdd6ee627df6de51d5469cec13b99" +checksum = "3b1b27babe89ef9f2237bc6c028bea24fa84163a1b6f8f17ff93573ebd7d861f" dependencies = [ "atomic-waker", "bytes", "cfg_aliases", "derive_more", - "iroh-quinn-udp 0.7.0", "js-sys", "libc", "n0-error", @@ -1999,14 +2033,15 @@ dependencies = [ "n0-watcher", "netdev", "netlink-packet-core", - "netlink-packet-route 0.28.0", + "netlink-packet-route", "netlink-proto", "netlink-sys", + "noq-udp", "objc2-core-foundation", "objc2-system-configuration", "pin-project-lite", "serde", - "socket2 0.6.2", + "socket2 0.6.3", "time", "tokio", "tokio-util", @@ -2018,49 +2053,74 @@ dependencies = [ ] [[package]] -name = "netwatch" -version = "0.14.0" +name = "nom" +version = "7.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "454b8c0759b2097581f25ed5180b4a1d14c324fde6d0734932a288e044d06232" +checksum = "d273983c5a657a70a3e8f2a01329822f3b8c8172b73826411a55751e404a0a4a" +dependencies = [ + "memchr", + "minimal-lexical", +] + +[[package]] +name = "noq" +version = "0.17.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8df966fb44ac763bc86da97fa6c811c54ae82ef656575949f93c6dae0c9f09bf" dependencies = [ - "atomic-waker", "bytes", "cfg_aliases", - "derive_more", - "iroh-quinn-udp 0.8.0", - "js-sys", - "libc", - "n0-error", - "n0-future", - "n0-watcher", - "netdev", - "netlink-packet-core", - "netlink-packet-route 0.28.0", - "netlink-proto", - "netlink-sys", - "objc2-core-foundation", - "objc2-system-configuration", + "noq-proto", + "noq-udp", "pin-project-lite", - "serde", - "socket2 0.6.2", - "time", + "rustc-hash", + "rustls", + "socket2 0.6.3", + "thiserror", "tokio", - "tokio-util", + "tokio-stream", "tracing", - "web-sys", - "windows", - "windows-result", - "wmi", + "web-time", ] [[package]] -name = "nom" -version = "7.1.3" +name = "noq-proto" +version = "0.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d273983c5a657a70a3e8f2a01329822f3b8c8172b73826411a55751e404a0a4a" +checksum = "5c61b72abd670eebc05b5cf720e077b04a3ef3354bc7bc19f1c3524cb424db7b" dependencies = [ - "memchr", - "minimal-lexical", + "aes-gcm", + "bytes", + "derive_more", + "enum-assoc", + "fastbloom", + "getrandom 0.3.4", + "identity-hash", + "lru-slab", + "rand", + "ring", + "rustc-hash", + "rustls", + "rustls-pki-types", + "slab", + "sorted-index-buffer", + "thiserror", + "tinyvec", + "tracing", + "web-time", +] + +[[package]] +name = "noq-udp" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bb9be4fedd6b98f3ba82ccd3506f4d0219fb723c3f97c67e12fe1494aa020e44" +dependencies = [ + "cfg_aliases", + "libc", + "socket2 0.6.3", + "tracing", + "windows-sys 0.61.2", ] [[package]] @@ -2123,9 +2183,9 @@ dependencies = [ [[package]] name = "num_enum" -version = "0.7.5" +version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1207a7e20ad57b847bbddc6776b968420d38292bbfe2089accff5e19e82454c" +checksum = "5d0bca838442ec211fa11de3a8b0e0e8f3a4522575b5c4c06ed722e005036f26" dependencies = [ "num_enum_derive", "rustversion", @@ -2133,9 +2193,9 @@ dependencies = [ [[package]] name = "num_enum_derive" -version = "0.7.5" +version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff32365de1b6743cb203b710788263c44a03de03802daf96092f2da4fe6ba4d7" +checksum = "680998035259dcfcafe653688bf2aa6d3e2dc05e98be6ab46afb089dc84f1df8" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -2154,9 +2214,9 @@ dependencies = [ [[package]] name = "objc2" -version = "0.6.3" +version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b7c2599ce0ec54857b29ce62166b0ed9b4f6f1a70ccc9a71165b6154caca8c05" +checksum = "3a12a8ed07aefc768292f076dc3ac8c48f3781c8f2d5851dd3d98950e8c5a89f" dependencies = [ "objc2-encode", ] @@ -2216,9 +2276,9 @@ dependencies = [ [[package]] name = "once_cell" -version = "1.21.3" +version = "1.21.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "42f5e15c9953c5e4ccceeb2e7382a716482c34515315f7b03532b8b4e8393d2d" +checksum = "9f7c3e4beb33f85d45ae3e3a1792185706c8e16d043238c593331cc7cd313b50" dependencies = [ "critical-section", "portable-atomic", @@ -2230,6 +2290,12 @@ version = "1.70.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "384b8ab6d37215f3c5301a95a4accb5d64aa607f1fcb26a11b5303878451b4fe" +[[package]] +name = "opaque-debug" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c08d65885ee38876c4f86fa503fb49d7b507c2b62552df7c70b2fce627e06381" + [[package]] name = "papaya" version = "0.2.3" @@ -2312,18 +2378,18 @@ dependencies = [ [[package]] name = "pin-project" -version = "1.1.10" +version = "1.1.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "677f1add503faace112b9f1373e43e9e054bfdd22ff1a63c1bc485eaec6a6a8a" +checksum = "f1749c7ed4bcaf4c3d0a3efc28538844fb29bcdd7d2b67b2be7e20ba861ff517" dependencies = [ "pin-project-internal", ] [[package]] name = "pin-project-internal" -version = "1.1.10" +version = "1.1.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e918e4ff8c4549eb882f14b3a4bc8c8bc93de829416eacf579f1207a8fbf861" +checksum = "d9b20ed30f105399776b9c883e68e536ef602a16ae6f596d2c473591d6ad64c6" dependencies = [ "proc-macro2", "quote", @@ -2332,9 +2398,9 @@ dependencies = [ [[package]] name = "pin-project-lite" -version = "0.2.16" +version = "0.2.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b3cff922bd51709b605d9ead9aa71031d81447142d828eb4a6eba76fe619f9b" +checksum = "a89322df9ebe1c1578d689c92318e070967d1042b512afbe49518723f4e6d5cd" [[package]] name = "pin-utils" @@ -2344,40 +2410,28 @@ checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" [[package]] name = "pkarr" -version = "5.0.2" +version = "5.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e1d346b545765a0ef58b6a7e160e17ddaa7427f439b7b9a287df6c88c9e04bf2" +checksum = "2f950360d31be432c0c9467fba5024a94f55128e7f32bc9d32db140369f24c77" dependencies = [ - "async-compat", "base32", "bytes", "cfg_aliases", "document-features", - "dyn-clone", "ed25519-dalek", - "futures-buffered", - "futures-lite", - "getrandom 0.3.4", - "log", - "lru", + "getrandom 0.4.2", "ntimestamp", - "reqwest", "self_cell", "serde", - "sha1_smol", "simple-dns", "thiserror", - "tokio", - "tracing", - "url", - "wasm-bindgen-futures", ] [[package]] name = "pkcs8" -version = "0.11.0-rc.10" +version = "0.11.0-rc.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b226d2cc389763951db8869584fd800cbbe2962bf454e2edeb5172b31ee99774" +checksum = "12922b6296c06eb741b02d7b5161e3aaa22864af38dfa025a1a3ba3f68c84577" dependencies = [ "der", "spki", @@ -2396,17 +2450,32 @@ dependencies = [ "time", ] +[[package]] +name = "polyval" +version = "0.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9d1fe60d06143b2430aa532c94cfe9e29783047f06c0d7fd359a9a51b729fa25" +dependencies = [ + "cfg-if", + "cpufeatures", + "opaque-debug", + "universal-hash", +] + [[package]] name = "portable-atomic" -version = "1.13.0" +version = "1.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f89776e4d69bb58bc6993e99ffa1d11f228b839984854c7daeb5d37f87cbe950" +checksum = "c33a9471896f1c69cecef8d20cbe2f7accd12527ce60845ff44c153bb2a21b49" +dependencies = [ + "serde", +] [[package]] name = "portmapper" -version = "0.13.0" +version = "0.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f29fb522a166045a35b507dea30e3eb69bca1c5a53669d252744d5a0d8474ffa" +checksum = "74748bc706fa6b6aebac6bbe0bbe0de806b384cb5c557ea974f771360a4e3858" dependencies = [ "base64", "bytes", @@ -2418,12 +2487,12 @@ dependencies = [ "iroh-metrics", "libc", "n0-error", - "netwatch 0.13.0", + "netwatch", "num_enum", "rand", "serde", "smallvec", - "socket2 0.6.2", + "socket2 0.6.3", "time", "tokio", "tokio-util", @@ -2481,11 +2550,21 @@ dependencies = [ "zerocopy", ] +[[package]] +name = "prettyplease" +version = "0.2.37" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "479ca8adacdd7ce8f1fb39ce9ecccbfe93a3f1344b3d0d97f20bc0196208f62b" +dependencies = [ + "proc-macro2", + "syn", +] + [[package]] name = "proc-macro-crate" -version = "3.4.0" +version = "3.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "219cb19e96be00ab2e37d6e299658a0cfa83e52429179969b0f0121b4ac46983" +checksum = "e67ba7e9b2b56446f1d419b1d807906278ffa1a658a8a5d8a39dcb1f5a78614f" dependencies = [ "toml_edit", ] @@ -2521,7 +2600,7 @@ dependencies = [ "quinn-udp", "rustc-hash", "rustls", - "socket2 0.6.2", + "socket2 0.6.3", "thiserror", "tokio", "tracing", @@ -2530,9 +2609,9 @@ dependencies = [ [[package]] name = "quinn-proto" -version = "0.11.13" +version = "0.11.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1906b49b0c3bc04b5fe5d86a77925ae6524a19b816ae38ce1e426255f1d8a31" +checksum = "434b42fec591c96ef50e21e886936e66d3cc3f737104fdb9b737c40ffb94c098" dependencies = [ "bytes", "getrandom 0.3.4", @@ -2558,16 +2637,16 @@ dependencies = [ "cfg_aliases", "libc", "once_cell", - "socket2 0.6.2", + "socket2 0.6.3", "tracing", "windows-sys 0.60.2", ] [[package]] name = "quote" -version = "1.0.44" +version = "1.0.45" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "21b2ebcf727b7760c461f091f9f0f539b77b8e87f2fd88131e7f1b433b3cece4" +checksum = "41f2619966050689382d2b44f664f4bc593e129785a36d6ee376ddf37259b924" dependencies = [ "proc-macro2", ] @@ -2578,6 +2657,12 @@ version = "5.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "69cdb34c158ceb288df11e18b4bd39de994f6657d83847bdffdbd7f346754b0f" +[[package]] +name = "r-efi" +version = "6.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8dcc9c7d52a811697d2151c701e0d08956f92b0e24136cf4cf27b57a6a0d9bf" + [[package]] name = "rand" version = "0.9.2" @@ -2632,9 +2717,9 @@ dependencies = [ [[package]] name = "regex-automata" -version = "0.4.13" +version = "0.4.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5276caf25ac86c8d810222b3dbb938e512c55c6831a10f3e6ed1c93b84041f1c" +checksum = "6e1dd4122fc1595e8162618945476892eefca7b88c52820e74af6262213cae8f" dependencies = [ "aho-corasick", "memchr", @@ -2643,9 +2728,9 @@ dependencies = [ [[package]] name = "regex-syntax" -version = "0.8.8" +version = "0.8.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a2d987857b319362043e95f5353c0535c1f58eec5336fdfcf626430af7def58" +checksum = "dc897dd8d9e8bd1ed8cdad82b5966c3e0ecae09fb1907d58efaa013543185d0a" [[package]] name = "reqwest" @@ -2734,9 +2819,9 @@ dependencies = [ [[package]] name = "rustls" -version = "0.23.36" +version = "0.23.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c665f33d38cea657d9614f766881e4d510e0eda4239891eea56b4cadcf01801b" +checksum = "758025cb5fccfd3bc2fd74708fd4682be41d99e5dff73c377c0646c6012c73a4" dependencies = [ "log", "once_cell", @@ -2776,9 +2861,9 @@ checksum = "b39cdef0fa800fc44525c84ccb54a029961a8215f9619753635a9c0d2538d46d" [[package]] name = "ryu" -version = "1.0.22" +version = "1.0.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a50f4cf475b65d88e057964e0e9bb1f0aa9bbb2036dc65c64596b42932536984" +checksum = "9774ba4a74de5f7b1c1451ed6cd5285a32eddb5cccb8cc655a4e50009e06477f" [[package]] name = "scoped-tls" @@ -2894,17 +2979,11 @@ dependencies = [ "serde", ] -[[package]] -name = "sha1_smol" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bbfa15b3dddfee50a0fff136974b3e1bde555604ba463834a7eb7deb6417705d" - [[package]] name = "sha2" -version = "0.11.0-rc.4" +version = "0.11.0-rc.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7535f94fa3339fe9e5e9be6260a909e62af97f6e14b32345ccf79b92b8b81233" +checksum = "d1e3878ab0f98e35b2df35fe53201d088299b41a6bb63e3e34dada2ac4abd924" dependencies = [ "cfg-if", "cpufeatures", @@ -2938,9 +3017,9 @@ dependencies = [ [[package]] name = "signature" -version = "3.0.0-rc.9" +version = "3.0.0-rc.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ad0ce3b3f8efd7406f22e2ca5d02be21cdf3b3d1d53ab141f784de8965c7c7e" +checksum = "7f1880df446116126965eeec169136b2e0251dba37c6223bcc819569550edea3" [[package]] name = "simdutf8" @@ -2965,9 +3044,9 @@ checksum = "b2aa850e253778c88a04c3d7323b043aeda9d3e30d5971937c1855769763678e" [[package]] name = "slab" -version = "0.4.11" +version = "0.4.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a2ae44ef20feb57a68b23d846850f861394c2e02dc425a50098ae8c90267589" +checksum = "0c790de23124f9ab44544d7ac05d60440adc586479ce501c1d6d7da3cd8c9cf5" [[package]] name = "smallvec" @@ -2987,12 +3066,12 @@ dependencies = [ [[package]] name = "socket2" -version = "0.6.2" +version = "0.6.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "86f4aa3ad99f2088c990dfa82d367e19cb29268ed67c574d10d0a4bfe71f07e0" +checksum = "3a766e1110788c36f4fa1c2b71b387a7815aa65f88ce0229841826633d93723e" dependencies = [ "libc", - "windows-sys 0.60.2", + "windows-sys 0.61.2", ] [[package]] @@ -3051,18 +3130,18 @@ checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f" [[package]] name = "strum" -version = "0.27.2" +version = "0.28.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af23d6f6c1a224baef9d3f61e287d2761385a5b88fdab4eb4c6f11aeb54c4bcf" +checksum = "9628de9b8791db39ceda2b119bbe13134770b56c138ec1d3af810d045c04f9bd" dependencies = [ "strum_macros", ] [[package]] name = "strum_macros" -version = "0.27.2" +version = "0.28.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7695ce3845ea4b33927c055a39dc438a45b059f7c1b3d91d38d10355fb8cbca7" +checksum = "ab85eea0270ee17587ed4156089e10b9e6880ee688791d45a905f5b1ca36f664" dependencies = [ "heck", "proc-macro2", @@ -3078,9 +3157,9 @@ checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292" [[package]] name = "syn" -version = "2.0.114" +version = "2.0.117" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d4d107df263a3013ef9b1879b0df87d706ff80f65a86ea879bd9c31f9b307c2a" +checksum = "e665b8803e7b1d2a727f4023456bbbbe74da67099c585258af0ad9c5013b9b99" dependencies = [ "proc-macro2", "quote", @@ -3171,9 +3250,9 @@ dependencies = [ [[package]] name = "time" -version = "0.3.46" +version = "0.3.47" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9da98b7d9b7dad93488a84b8248efc35352b0b2657397d4167e7ad67e5d535e5" +checksum = "743bd48c283afc0388f9b8827b976905fb217ad9e647fae3a379a9283c4def2c" dependencies = [ "deranged", "itoa", @@ -3195,9 +3274,9 @@ checksum = "7694e1cfe791f8d31026952abf09c69ca6f6fa4e1a1229e18988f06a04a12dca" [[package]] name = "time-macros" -version = "0.2.26" +version = "0.2.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "78cc610bac2dcee56805c99642447d4c5dbde4d01f752ffea0199aee1f601dc4" +checksum = "2e70e4c5a0e0a8a4823ad65dfe1a6930e4f4d756dcd9dd7939022b5e8c501215" dependencies = [ "num-conv", "time-core", @@ -3215,9 +3294,9 @@ dependencies = [ [[package]] name = "tinyvec" -version = "1.10.0" +version = "1.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bfa5fdc3bce6191a1dbc8c02d5c8bffcf557bafa17c124c5264a458f1b0613fa" +checksum = "3e61e67053d25a4e82c844e8424039d9745781b3fc4f32b8d55ed50f5f667ef3" dependencies = [ "tinyvec_macros", ] @@ -3230,9 +3309,9 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.49.0" +version = "1.50.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72a2903cd7736441aac9df9d7688bd0ce48edccaadf181c3b90be801e81d3d86" +checksum = "27ad5e34374e03cfffefc301becb44e9dc3c17584f414349ebe29ed26661822d" dependencies = [ "bytes", "libc", @@ -3240,16 +3319,16 @@ dependencies = [ "parking_lot", "pin-project-lite", "signal-hook-registry", - "socket2 0.6.2", + "socket2 0.6.3", "tokio-macros", "windows-sys 0.61.2", ] [[package]] name = "tokio-macros" -version = "2.6.0" +version = "2.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af407857209536a95c8e56f8231ef2c2e2aff839b22e07a1ffcbc617e9db9fa5" +checksum = "5c55a2eff8b69ce66c84f85e1da1c233edc36ceb85a2058d11b0d6a3c7e7569c" dependencies = [ "proc-macro2", "quote", @@ -3316,9 +3395,9 @@ dependencies = [ [[package]] name = "toml" -version = "0.9.11+spec-1.1.0" +version = "1.0.6+spec-1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f3afc9a848309fe1aaffaed6e1546a7a14de1f935dc9d89d32afd9a44bab7c46" +checksum = "399b1124a3c9e16766831c6bba21e50192572cdd98706ea114f9502509686ffc" dependencies = [ "indexmap", "serde_core", @@ -3331,18 +3410,18 @@ dependencies = [ [[package]] name = "toml_datetime" -version = "0.7.5+spec-1.1.0" +version = "1.0.0+spec-1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "92e1cfed4a3038bc5a127e35a2d360f145e1f4b971b551a2ba5fd7aedf7e1347" +checksum = "32c2555c699578a4f59f0cc68e5116c8d7cabbd45e1409b989d4be085b53f13e" dependencies = [ "serde_core", ] [[package]] name = "toml_edit" -version = "0.23.10+spec-1.0.0" +version = "0.25.4+spec-1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "84c8b9f757e028cee9fa244aea147aab2a9ec09d5325a9b01e0a49730c2b5269" +checksum = "7193cbd0ce53dc966037f54351dbbcf0d5a642c7f0038c382ef9e677ce8c13f2" dependencies = [ "indexmap", "toml_datetime", @@ -3352,9 +3431,9 @@ dependencies = [ [[package]] name = "toml_parser" -version = "1.0.6+spec-1.1.0" +version = "1.0.9+spec-1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a3198b4b0a8e11f09dd03e133c0280504d0801269e9afa46362ffde1cbeebf44" +checksum = "702d4415e08923e7e1ef96cd5727c0dfed80b4d2fa25db9647fe5eb6f7c5a4c4" dependencies = [ "winnow", ] @@ -3456,9 +3535,9 @@ dependencies = [ [[package]] name = "tracing-subscriber" -version = "0.3.22" +version = "0.3.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2f30143827ddab0d256fd843b7a66d164e9f271cfa0dde49142c5ca0ca291f1e" +checksum = "cb7f578e5945fb242538965c2d0b04418d38ec25c79d160cd279bf0731c8d319" dependencies = [ "matchers", "nu-ansi-term", @@ -3480,9 +3559,9 @@ checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b" [[package]] name = "trybuild" -version = "1.0.114" +version = "1.0.116" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3e17e807bff86d2a06b52bca4276746584a78375055b6e45843925ce2802b335" +checksum = "47c635f0191bd3a2941013e5062667100969f8c4e9cd787c14f977265d73616e" dependencies = [ "glob", "serde", @@ -3501,9 +3580,9 @@ checksum = "562d481066bde0658276a35467c4af00bdc6ee726305698a55b86e61d7ad82bb" [[package]] name = "unicode-ident" -version = "1.0.22" +version = "1.0.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9312f7c4f6ff9069b165498234ce8be658059c6728633667c526e27dc2cf1df5" +checksum = "e6e4313cd5fcd3dad5cafa179702e2b244f760991f45397d14d4ebf38247da75" [[package]] name = "unicode-segmentation" @@ -3517,6 +3596,16 @@ version = "0.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ebc1c04c71510c7f702b52b7c350734c9ff1295c464a03335b00bb84fc54f853" +[[package]] +name = "universal-hash" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fc1de2c688dc15305988b563c3854064043356019f97a4b46276fe734c4f07ea" +dependencies = [ + "crypto-common 0.1.7", + "subtle", +] + [[package]] name = "untrusted" version = "0.9.0" @@ -3550,11 +3639,11 @@ checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821" [[package]] name = "uuid" -version = "1.20.0" +version = "1.22.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee48d38b119b0cd71fe4141b30f5ba9c7c5d9f4e7a3a8b4a674e4b6ef789976f" +checksum = "a68d3c8f01c0cfa54a75291d83601161799e4a89a39e0929f4b0354d88757a37" dependencies = [ - "getrandom 0.3.4", + "getrandom 0.4.2", "js-sys", "wasm-bindgen", ] @@ -3613,6 +3702,12 @@ dependencies = [ "rustversion", ] +[[package]] +name = "version_check" +version = "0.9.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a" + [[package]] name = "want" version = "0.3.1" @@ -3637,11 +3732,20 @@ dependencies = [ "wit-bindgen", ] +[[package]] +name = "wasip3" +version = "0.4.0+wasi-0.3.0-rc-2026-01-06" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5428f8bf88ea5ddc08faddef2ac4a67e390b88186c703ce6dbd955e1c145aca5" +dependencies = [ + "wit-bindgen", +] + [[package]] name = "wasm-bindgen" -version = "0.2.108" +version = "0.2.114" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "64024a30ec1e37399cf85a7ffefebdb72205ca1c972291c51512360d90bd8566" +checksum = "6532f9a5c1ece3798cb1c2cfdba640b9b3ba884f5db45973a6f442510a87d38e" dependencies = [ "cfg-if", "once_cell", @@ -3652,9 +3756,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-futures" -version = "0.4.58" +version = "0.4.64" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70a6e77fd0ae8029c9ea0063f87c46fde723e7d887703d74ad2616d792e51e6f" +checksum = "e9c5522b3a28661442748e09d40924dfb9ca614b21c00d3fd135720e48b67db8" dependencies = [ "cfg-if", "futures-util", @@ -3666,9 +3770,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.108" +version = "0.2.114" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "008b239d9c740232e71bd39e8ef6429d27097518b6b30bdf9086833bd5b6d608" +checksum = "18a2d50fcf105fb33bb15f00e7a77b772945a2ee45dcf454961fd843e74c18e6" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -3676,9 +3780,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.108" +version = "0.2.114" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5256bae2d58f54820e6490f9839c49780dff84c65aeab9e772f15d5f0e913a55" +checksum = "03ce4caeaac547cdf713d280eda22a730824dd11e6b8c3ca9e42247b25c631e3" dependencies = [ "bumpalo", "proc-macro2", @@ -3689,13 +3793,35 @@ dependencies = [ [[package]] name = "wasm-bindgen-shared" -version = "0.2.108" +version = "0.2.114" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f01b580c9ac74c8d8f0c0e4afb04eeef2acf145458e52c03845ee9cd23e3d12" +checksum = "75a326b8c223ee17883a4251907455a2431acc2791c98c26279376490c378c16" dependencies = [ "unicode-ident", ] +[[package]] +name = "wasm-encoder" +version = "0.244.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "990065f2fe63003fe337b932cfb5e3b80e0b4d0f5ff650e6985b1048f62c8319" +dependencies = [ + "leb128fmt", + "wasmparser", +] + +[[package]] +name = "wasm-metadata" +version = "0.244.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bb0e353e6a2fbdc176932bbaab493762eb1255a7900fe0fea1a2f96c296cc909" +dependencies = [ + "anyhow", + "indexmap", + "wasm-encoder", + "wasmparser", +] + [[package]] name = "wasm-streams" version = "0.4.2" @@ -3709,11 +3835,23 @@ dependencies = [ "web-sys", ] +[[package]] +name = "wasmparser" +version = "0.244.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "47b807c72e1bac69382b3a6fb3dbe8ea4c0ed87ff5629b8685ae6b9a611028fe" +dependencies = [ + "bitflags", + "hashbrown 0.15.5", + "indexmap", + "semver", +] + [[package]] name = "web-sys" -version = "0.3.85" +version = "0.3.91" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "312e32e551d92129218ea9a2452120f4aabc03529ef03e4d0d82fb2780608598" +checksum = "854ba17bb104abfb26ba36da9729addc7ce7f06f5c0f90f3c391f8461cca21f9" dependencies = [ "js-sys", "wasm-bindgen", @@ -3731,9 +3869,9 @@ dependencies = [ [[package]] name = "webpki-roots" -version = "1.0.5" +version = "1.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "12bed680863276c63889429bfd6cab3b99943659923822de1c8a39c49e4d722c" +checksum = "22cfaf3c063993ff62e73cb4311efde4db1efb31ab78a3e5c457939ad5cc0bed" dependencies = [ "rustls-pki-types", ] @@ -4118,9 +4256,9 @@ checksum = "d6bbff5f0aada427a1e5a6da5f1f98158182f26556f345ac9e04d36d0ebed650" [[package]] name = "winnow" -version = "0.7.14" +version = "0.7.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a5364e9d77fcdeeaa6062ced926ee3381faa2ee02d3eb83a5c27a8825540829" +checksum = "df79d97927682d2fd8adb29682d1140b343be4ac0f08fd68b7765d9c059d3945" dependencies = [ "memchr", ] @@ -4140,12 +4278,94 @@ name = "wit-bindgen" version = "0.51.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d7249219f66ced02969388cf2bb044a09756a083d0fab1e566056b04d9fbcaa5" +dependencies = [ + "wit-bindgen-rust-macro", +] + +[[package]] +name = "wit-bindgen-core" +version = "0.51.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ea61de684c3ea68cb082b7a88508a8b27fcc8b797d738bfc99a82facf1d752dc" +dependencies = [ + "anyhow", + "heck", + "wit-parser", +] + +[[package]] +name = "wit-bindgen-rust" +version = "0.51.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b7c566e0f4b284dd6561c786d9cb0142da491f46a9fbed79ea69cdad5db17f21" +dependencies = [ + "anyhow", + "heck", + "indexmap", + "prettyplease", + "syn", + "wasm-metadata", + "wit-bindgen-core", + "wit-component", +] + +[[package]] +name = "wit-bindgen-rust-macro" +version = "0.51.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0c0f9bfd77e6a48eccf51359e3ae77140a7f50b1e2ebfe62422d8afdaffab17a" +dependencies = [ + "anyhow", + "prettyplease", + "proc-macro2", + "quote", + "syn", + "wit-bindgen-core", + "wit-bindgen-rust", +] + +[[package]] +name = "wit-component" +version = "0.244.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9d66ea20e9553b30172b5e831994e35fbde2d165325bec84fc43dbf6f4eb9cb2" +dependencies = [ + "anyhow", + "bitflags", + "indexmap", + "log", + "serde", + "serde_derive", + "serde_json", + "wasm-encoder", + "wasm-metadata", + "wasmparser", + "wit-parser", +] + +[[package]] +name = "wit-parser" +version = "0.244.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ecc8ac4bc1dc3381b7f59c34f00b67e18f910c2c0f50015669dde7def656a736" +dependencies = [ + "anyhow", + "id-arena", + "indexmap", + "log", + "semver", + "serde", + "serde_derive", + "serde_json", + "unicode-xid", + "wasmparser", +] [[package]] name = "wmi" -version = "0.18.0" +version = "0.18.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d71d1d435f7745ba9ed55c43049d47b5fbd1104449beaa2afbc80a1e10a4a018" +checksum = "003e65f4934cf9449b9ce913ad822cd054a5af669d24f93db101fdb02856bb23" dependencies = [ "chrono", "futures", @@ -4183,9 +4403,9 @@ dependencies = [ [[package]] name = "x509-parser" -version = "0.18.0" +version = "0.18.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eb3e137310115a65136898d2079f003ce33331a6c4b0d51f1531d1be082b6425" +checksum = "d43b0f71ce057da06bc0851b23ee24f3f86190b07203dd8f567d0b706a185202" dependencies = [ "asn1-rs", "data-encoding", @@ -4254,18 +4474,18 @@ checksum = "2164e798d9e3d84ee2c91139ace54638059a3b23e361f5c11781c2c6459bde0f" [[package]] name = "zerocopy" -version = "0.8.35" +version = "0.8.42" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fdea86ddd5568519879b8187e1cf04e24fce28f7fe046ceecbce472ff19a2572" +checksum = "f2578b716f8a7a858b7f02d5bd870c14bf4ddbbcf3a4c05414ba6503640505e3" dependencies = [ "zerocopy-derive", ] [[package]] name = "zerocopy-derive" -version = "0.8.35" +version = "0.8.42" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c15e1b46eff7c6c91195752e0eeed8ef040e391cdece7c25376957d5f15df22" +checksum = "7e6cc098ea4d3bd6246687de65af3f920c430e236bee1e3bf2e441463f08a02f" dependencies = [ "proc-macro2", "quote", @@ -4348,6 +4568,6 @@ dependencies = [ [[package]] name = "zmij" -version = "1.0.17" +version = "1.0.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "02aae0f83f69aafc94776e879363e9771d7ecbffe2c7fbb6c14c5e00dfe88439" +checksum = "b8848ee67ecc8aedbaf3e4122217aff892639231befc6a1b58d29fff4c2cabaa" diff --git a/Cargo.toml b/Cargo.toml index ee30e64f..a5f73746 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -30,12 +30,12 @@ tracing = { workspace = true, optional = true } # used to ser/de messages when using rpc postcard = { workspace = true, features = ["alloc", "use-std"], optional = true } # currently only transport when using rpc -quinn = { workspace = true, optional = true } +noq = { workspace = true, optional = true } # used as a buffer for serialization when using rpc smallvec = { version = "1.14.0", features = ["write"], optional = true } -# used in the test utils to generate quinn endpoints +# used in the test utils to generate noq endpoints rustls = { version = "0.23.5", default-features = false, features = ["std"], optional = true } -# used in the test utils to generate quinn endpoints +# used in the test utils to generate noq endpoints rcgen = { version = "0.14.5", optional = true } # used in the benches futures-buffered ={ version = "0.2.9", optional = true } @@ -46,7 +46,7 @@ futures-util = { workspace = true, optional = true } irpc-derive = { version = "0.9.0", path = "./irpc-derive", optional = true } [target.'cfg(not(all(target_family = "wasm", target_os = "unknown")))'.dependencies] -quinn = { workspace = true, optional = true, features = ["runtime-tokio"] } +noq = { workspace = true, optional = true, features = ["runtime-tokio"] } [dev-dependencies] tracing-subscriber = { workspace = true, features = ["fmt"] } @@ -64,23 +64,23 @@ anyhow = { workspace = true } [features] # enable the remote transport -rpc = ["dep:quinn", "dep:postcard", "dep:smallvec", "dep:tracing", "tokio/io-util"] +rpc = ["dep:noq", "dep:postcard", "dep:smallvec", "dep:tracing", "tokio/io-util"] # add test utilities -quinn_endpoint_setup = ["rpc", "dep:rustls", "dep:rcgen", "dep:futures-buffered", "quinn/rustls-ring"] +noq_endpoint_setup = ["rpc", "dep:rustls", "dep:rcgen", "dep:futures-buffered", "noq/rustls-ring"] # pick up parent span when creating channel messages spans = ["dep:tracing"] stream = ["dep:futures-util"] derive = ["dep:irpc-derive"] varint-util = ["dep:postcard", "dep:smallvec", "tokio/io-util"] -default = ["rpc", "quinn_endpoint_setup", "spans", "stream", "derive"] +default = ["rpc", "noq_endpoint_setup", "spans", "stream", "derive"] [[example]] name = "derive" -required-features = ["rpc", "derive", "quinn_endpoint_setup"] +required-features = ["rpc", "derive", "noq_endpoint_setup"] [[example]] name = "compute" -required-features = ["rpc", "derive", "quinn_endpoint_setup"] +required-features = ["rpc", "derive", "noq_endpoint_setup"] [[example]] name = "local" @@ -88,7 +88,7 @@ required-features = ["derive"] [[example]] name = "storage" -required-features = ["rpc", "quinn_endpoint_setup"] +required-features = ["rpc", "noq_endpoint_setup"] [workspace] members = ["irpc-derive", "irpc-iroh"] @@ -109,7 +109,7 @@ tracing = { version = "0.1.41", default-features = false } n0-future = { version = "0.3", default-features = false } n0-error = { version = "0.1" } tracing-subscriber = { version = "0.3.20" } -iroh = { version = "0.96" } -iroh-base = { version = "0.96" } -quinn = { package = "iroh-quinn", version = "0.16.0", default-features = false } +iroh = { version = "0.97" } +iroh-base = { version = "0.97" } +noq = { version = "0.17.0", default-features = false } futures-util = { version = "0.3", features = ["sink"] } diff --git a/examples/compute.rs b/examples/compute.rs index 7908425c..2ad6192c 100644 --- a/examples/compute.rs +++ b/examples/compute.rs @@ -144,13 +144,13 @@ struct ComputeApi { } impl ComputeApi { - pub fn connect(endpoint: quinn::Endpoint, addr: SocketAddr) -> anyhow::Result { + pub fn connect(endpoint: noq::Endpoint, addr: SocketAddr) -> anyhow::Result { Ok(ComputeApi { - inner: Client::quinn(endpoint, addr), + inner: Client::noq(endpoint, addr), }) } - pub fn listen(&self, endpoint: quinn::Endpoint) -> anyhow::Result> { + pub fn listen(&self, endpoint: noq::Endpoint) -> anyhow::Result> { let Some(local) = self.inner.as_local() else { bail!("cannot listen on a remote service"); }; diff --git a/examples/derive.rs b/examples/derive.rs index 88a579ad..b629dd45 100644 --- a/examples/derive.rs +++ b/examples/derive.rs @@ -119,13 +119,13 @@ struct StorageApi { } impl StorageApi { - pub fn connect(endpoint: quinn::Endpoint, addr: SocketAddr) -> Result { + pub fn connect(endpoint: noq::Endpoint, addr: SocketAddr) -> Result { Ok(StorageApi { - inner: Client::quinn(endpoint, addr), + inner: Client::noq(endpoint, addr), }) } - pub fn listen(&self, endpoint: quinn::Endpoint) -> Result> { + pub fn listen(&self, endpoint: noq::Endpoint) -> Result> { let local = self .inner .as_local() diff --git a/examples/storage.rs b/examples/storage.rs index e4e939fb..0f09a6c3 100644 --- a/examples/storage.rs +++ b/examples/storage.rs @@ -62,7 +62,7 @@ enum StorageMessage { } impl RemoteService for StorageProtocol { - fn with_remote_channels(self, rx: quinn::RecvStream, tx: quinn::SendStream) -> Self::Message { + fn with_remote_channels(self, rx: noq::RecvStream, tx: noq::SendStream) -> Self::Message { match self { StorageProtocol::Get(msg) => WithChannels::from((msg, tx, rx)).into(), StorageProtocol::Set(msg) => WithChannels::from((msg, tx, rx)).into(), @@ -125,13 +125,13 @@ struct StorageApi { } impl StorageApi { - pub fn connect(endpoint: quinn::Endpoint, addr: SocketAddr) -> anyhow::Result { + pub fn connect(endpoint: noq::Endpoint, addr: SocketAddr) -> anyhow::Result { Ok(StorageApi { - inner: Client::quinn(endpoint, addr), + inner: Client::noq(endpoint, addr), }) } - pub fn listen(&self, endpoint: quinn::Endpoint) -> anyhow::Result> { + pub fn listen(&self, endpoint: noq::Endpoint) -> anyhow::Result> { let Some(local) = self.inner.as_local() else { bail!("cannot listen on a remote service"); }; diff --git a/irpc-derive/src/lib.rs b/irpc-derive/src/lib.rs index 4f80b26b..495854f9 100644 --- a/irpc-derive/src/lib.rs +++ b/irpc-derive/src/lib.rs @@ -40,7 +40,7 @@ pub fn rpc_requests(attr: TokenStream, item: TokenStream) -> TokenStream { return error_tokens( input.span(), "The rpc_requests macro can only be applied to enums", - ) + ); } }; @@ -71,15 +71,22 @@ pub fn rpc_requests(attr: TokenStream, item: TokenStream) -> TokenStream { Fields::Unnamed(ref mut fields) if fields.unnamed.len() == 1 => { fields.unnamed[0].ty.clone() } - _ => return error_tokens( - variant.span(), - "Each variant must either have exactly one unnamed field, or use the `wrap` argument in the `rpc` attribute.", - ), + _ => { + return error_tokens( + variant.span(), + "Each variant must either have exactly one unnamed field, or use the `wrap` argument in the `rpc` attribute.", + ); + } }, Some(WrapArgs { ident, derive, vis }) => { let vis = vis.as_ref().unwrap_or(&input.vis).clone(); let ty = type_from_ident(&ident); - let struc = struct_from_variant_fields(ident, variant.fields.clone(), variant.attrs.clone(), vis); + let struc = struct_from_variant_fields( + ident, + variant.fields.clone(), + variant.attrs.clone(), + vis, + ); wrapper_types.extend(quote! { #[derive(::std::fmt::Debug, ::serde::Serialize, ::serde::Deserialize, #(#derive),* )] #struc @@ -299,8 +306,8 @@ fn generate_remote_service_impl( impl ::irpc::rpc::RemoteService for #proto_enum_name { fn with_remote_channels( self, - rx: ::irpc::rpc::quinn::RecvStream, - tx: ::irpc::rpc::quinn::SendStream + rx: ::irpc::rpc::noq::RecvStream, + tx: ::irpc::rpc::noq::SendStream ) -> Self::Message { match self { #(#variants),* diff --git a/irpc-iroh/examples/0rtt.rs b/irpc-iroh/examples/0rtt.rs index 53936d34..798a2548 100644 --- a/irpc-iroh/examples/0rtt.rs +++ b/irpc-iroh/examples/0rtt.rs @@ -9,7 +9,7 @@ use std::{ use anyhow::{Context, Result}; use clap::Parser; use iroh::{ - endpoint::{AfterHandshakeOutcome, ConnectionInfo, EndpointHooks}, + endpoint::{presets, AfterHandshakeOutcome, ConnectionInfo, EndpointHooks}, protocol::Router, Endpoint, EndpointAddr, EndpointId, SecretKey, }; @@ -23,7 +23,10 @@ async fn main() -> Result<()> { cli::Args::Listen { no_0rtt } => { let (server_router, server_addr) = { let secret_key = get_or_generate_secret_key()?; - let endpoint = Endpoint::builder().secret_key(secret_key).bind().await?; + let endpoint = Endpoint::builder(presets::N0) + .secret_key(secret_key) + .bind() + .await?; endpoint.online().await; let addr = endpoint.addr(); let api = EchoApi::spawn(); @@ -54,7 +57,9 @@ async fn main() -> Result<()> { wait_for_ticket, } => { if !no_0rtt && !wait_for_ticket { - eprintln!("0-RTT is enabled but wait_for_ticket is not set. After 2 requests with 0rtt the 0rtt resumption tickets will be consumed and a connection will be done without 0rtt."); + eprintln!( + "0-RTT is enabled but wait_for_ticket is not set. After 2 requests with 0rtt the 0rtt resumption tickets will be consumed and a connection will be done without 0rtt." + ); } let n = n .iter() @@ -63,7 +68,7 @@ async fn main() -> Result<()> { .unwrap_or(u64::MAX); let delay = std::time::Duration::from_millis(delay_ms); let connection_stats = ConnectionStats::default(); - let endpoint = Endpoint::builder() + let endpoint = Endpoint::builder(presets::N0) .hooks(connection_stats.clone()) .bind() .await?; @@ -96,7 +101,8 @@ impl ConnectionStats { let stats = self.0.lock().expect("poisoned"); stats .get(endpoint_id) - .and_then(|conn_info| conn_info.selected_path().map(|path| path.rtt())) + .and_then(|conn_info| conn_info.selected_path()) + .and_then(|path| path.rtt()) } } diff --git a/irpc-iroh/examples/auth.rs b/irpc-iroh/examples/auth.rs index 13f1af18..7f3014ff 100644 --- a/irpc-iroh/examples/auth.rs +++ b/irpc-iroh/examples/auth.rs @@ -4,7 +4,7 @@ //! * Authenticating peers use anyhow::Result; -use iroh::{protocol::Router, Endpoint}; +use iroh::{endpoint::presets, protocol::Router, Endpoint}; use self::storage::{StorageClient, StorageServer}; @@ -18,7 +18,7 @@ async fn main() -> Result<()> { async fn remote() -> Result<()> { let (server_router, server_addr) = { - let endpoint = Endpoint::bind().await?; + let endpoint = Endpoint::bind(presets::N0).await?; let server = StorageServer::new("secret".to_string()); let router = Router::builder(endpoint.clone()) .accept(StorageServer::ALPN, server.clone()) @@ -28,7 +28,7 @@ async fn remote() -> Result<()> { }; // correct authentication - let client_endpoint = Endpoint::builder().bind().await?; + let client_endpoint = Endpoint::builder(presets::N0).bind().await?; let api = StorageClient::connect(client_endpoint, server_addr.clone()); api.auth("secret").await?; api.set("hello".to_string(), "world".to_string()).await?; @@ -41,13 +41,13 @@ async fn remote() -> Result<()> { } // invalid authentication - let client_endpoint = Endpoint::builder().bind().await?; + let client_endpoint = Endpoint::builder(presets::N0).bind().await?; let api = StorageClient::connect(client_endpoint, server_addr.clone()); assert!(api.auth("bad").await.is_err()); assert!(api.get("hello".to_string()).await.is_err()); // no authentication - let client_endpoint = Endpoint::builder().bind().await?; + let client_endpoint = Endpoint::builder(presets::N0).bind().await?; let api = StorageClient::connect(client_endpoint, server_addr); assert!(api.get("hello".to_string()).await.is_err()); diff --git a/irpc-iroh/examples/remote-and-local.rs b/irpc-iroh/examples/remote-and-local.rs index 98cd6d41..aa6c0804 100644 --- a/irpc-iroh/examples/remote-and-local.rs +++ b/irpc-iroh/examples/remote-and-local.rs @@ -3,7 +3,7 @@ //! The [`StorageApi`] struct is only defined once and can be used both locally and as a remote client. use anyhow::Result; -use iroh::{protocol::Router, Endpoint}; +use iroh::{endpoint::presets, protocol::Router, Endpoint}; use self::storage::StorageApi; @@ -39,7 +39,7 @@ async fn local() -> Result<()> { } async fn remote() -> Result<()> { - let endpoint = Endpoint::bind().await?; + let endpoint = Endpoint::bind(presets::N0).await?; let api = StorageApi::spawn(); let router = Router::builder(endpoint.clone()) .accept(StorageApi::ALPN, api.protocol_handler()?) @@ -47,7 +47,7 @@ async fn remote() -> Result<()> { endpoint.online().await; - let client_endpoint = Endpoint::builder().bind().await?; + let client_endpoint = Endpoint::bind(presets::N0).await?; let api = StorageApi::connect(client_endpoint, endpoint.addr())?; api.set("hello".to_string(), "world".to_string()).await?; api.set("goodbye".to_string(), "world".to_string()).await?; diff --git a/irpc-iroh/examples/server-actor.rs b/irpc-iroh/examples/server-actor.rs index b08af9a0..e2ad1742 100644 --- a/irpc-iroh/examples/server-actor.rs +++ b/irpc-iroh/examples/server-actor.rs @@ -10,7 +10,7 @@ mod proto { use std::collections::HashMap; use anyhow::Result; - use iroh::{protocol::Router, Endpoint, EndpointId}; + use iroh::{endpoint::presets, protocol::Router, Endpoint, EndpointId}; use irpc::{channel::oneshot, rpc_requests, Client, WithChannels}; use irpc_iroh::IrohProtocol; use serde::{Deserialize, Serialize}; @@ -41,7 +41,7 @@ mod proto { tokio::task::spawn(actor(rx)); let client = Client::::local(tx); - let endpoint = Endpoint::bind().await?; + let endpoint = Endpoint::bind(presets::N0).await?; let protocol = IrohProtocol::with_sender(client.as_local().unwrap()); let router = Router::builder(endpoint).accept(ALPN, protocol).spawn(); println!("endpoint id: {}", router.endpoint().id()); @@ -79,7 +79,7 @@ mod proto { pub async fn connect(endpoint_id: EndpointId) -> Result> { println!("connecting to {endpoint_id}"); - let endpoint = Endpoint::bind().await?; + let endpoint = Endpoint::bind(presets::N0).await?; let client = irpc_iroh::client(endpoint, endpoint_id, ALPN); Ok(client) } diff --git a/irpc-iroh/examples/server-shared-state.rs b/irpc-iroh/examples/server-shared-state.rs index 7217420f..bf5b4e08 100644 --- a/irpc-iroh/examples/server-shared-state.rs +++ b/irpc-iroh/examples/server-shared-state.rs @@ -2,7 +2,7 @@ //! on the server side instead of with an actor loop. use anyhow::Result; -use iroh::{protocol::Router, Endpoint}; +use iroh::{endpoint::presets, protocol::Router, Endpoint}; use self::storage::{StorageClient, StorageServer}; @@ -12,7 +12,7 @@ async fn main() -> Result<()> { // Start the server. let (server_router, server_addr) = { - let endpoint = Endpoint::bind().await?; + let endpoint = Endpoint::bind(presets::N0).await?; let storage = StorageServer::default(); let router = Router::builder(endpoint) .accept(storage::ALPN, storage) @@ -22,7 +22,7 @@ async fn main() -> Result<()> { }; // Connect by passing an endpoint, which allows automatic reconnection. - let client_endpoint = Endpoint::bind().await?; + let client_endpoint = Endpoint::bind(presets::N0).await?; let api = StorageClient::connect(client_endpoint, server_addr.clone()); api.set("hello", "world").await?; api.set("goodbye", "see you soon").await?; @@ -34,7 +34,7 @@ async fn main() -> Result<()> { } // Or create a client from a connection directly. - let client2 = Endpoint::bind().await?; + let client2 = Endpoint::bind(presets::N0).await?; let conn = client2.connect(server_addr, storage::ALPN).await?; let api = StorageClient::from_connection(conn); let value = api.get("goodbye").await?; diff --git a/src/lib.rs b/src/lib.rs index 1d849a2c..5adfbca2 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -35,14 +35,14 @@ //! ## Transports //! //! We don't abstract over the send and receive stream. These must always be -//! quinn streams, specifically streams from the [iroh quinn fork]. +//! noq streams, specifically streams from the [noq]. //! -//! This restricts the possible rpc transports to quinn (QUIC with dial by +//! This restricts the possible rpc transports to noq (QUIC with dial by //! socket address) and iroh (QUIC with dial by endpoint id). //! -//! An upside of this is that the quinn streams can be tuned for each rpc +//! An upside of this is that the noq streams can be tuned for each rpc //! request, e.g. by setting the stream priority or by directly using more -//! advanced part of the quinn SendStream and RecvStream APIs such as out of +//! advanced part of the noq SendStream and RecvStream APIs such as out of //! order receiving. //! //! ## Serialization @@ -67,7 +67,7 @@ //! This is useful even without rpc, to not lose tracing context when message //! passing. This is frequently done manually. This obviously requires //! a dependency on tracing. -//! - `quinn_endpoint_setup`: Easy way to create quinn endpoints. This is useful +//! - `noq_endpoint_setup`: Easy way to create noq endpoints. This is useful //! both for testing and for rpc on localhost. Enabled by default. //! //! # Example @@ -149,7 +149,7 @@ //! This crate evolved out of the [quic-rpc](https://docs.rs/quic-rpc/latest/quic-rpc/index.html) crate, which is a generic RPC //! framework for any transport with cheap streams such as QUIC. Compared to //! quic-rpc, this crate does not abstract over the stream type and is focused -//! on [iroh](https://docs.rs/iroh/latest/iroh/index.html) and our [iroh quinn fork](https://docs.rs/iroh-quinn/latest/iroh-quinn/index.html). +//! on [iroh](https://docs.rs/iroh/latest/iroh/index.html) and our [noq](https://docs.rs/noq/latest/noq/index.html). #![cfg_attr(quicrpc_docsrs, feature(doc_cfg))] use std::{fmt::Debug, future::Future, io, marker::PhantomData, ops::Deref, result}; @@ -321,10 +321,10 @@ mod sealed { /// Requirements for a RPC message /// /// Even when just using the mem transport, we require messages to be Serializable and Deserializable. -/// Likewise, even when using the quinn transport, we require messages to be Send. +/// Likewise, even when using the noq transport, we require messages to be Send. /// /// This does not seem like a big restriction. If you want a pure memory channel without the possibility -/// to also use the quinn transport, you might want to use a mpsc channel directly. +/// to also use the noq transport, you might want to use a mpsc channel directly. pub trait RpcMessage: Debug + Serialize + DeserializeOwned + Send + Sync + Unpin + 'static {} impl RpcMessage for T where @@ -1303,15 +1303,15 @@ impl From> for Client { } impl Client { - /// Create a new client to a remote service using the given quinn `endpoint` + /// Create a new client to a remote service using the given noq `endpoint` /// and a socket `addr` of the remote service. #[cfg(feature = "rpc")] - pub fn quinn(endpoint: quinn::Endpoint, addr: std::net::SocketAddr) -> Self { - Self::boxed(rpc::QuinnLazyRemoteConnection::new(endpoint, addr)) + pub fn noq(endpoint: noq::Endpoint, addr: std::net::SocketAddr) -> Self { + Self::boxed(rpc::NoqLazyRemoteConnection::new(endpoint, addr)) } /// Create a new client from a `rpc::RemoteConnection` trait object. - /// This is used from crates that want to provide other transports than quinn, + /// This is used from crates that want to provide other transports than noq, /// such as the iroh transport. #[cfg(feature = "rpc")] pub fn boxed(remote: impl rpc::RemoteConnection) -> Self { @@ -1341,7 +1341,7 @@ impl Client { /// /// In the remote case, this involves lazily creating a connection to the /// remote side and then creating a new stream on the underlying - /// [`quinn`] or iroh connection. + /// [`noq`] or iroh connection. /// /// In both cases, the returned sender is fully self contained. #[allow(clippy::type_complexity)] @@ -1719,23 +1719,23 @@ impl ClientInner { /// an empty enum since local requests can not fail. #[stack_error(derive, add_meta, from_sources)] pub enum RequestError { - /// Error in quinn during connect + /// Error in noq during connect #[cfg(feature = "rpc")] #[cfg_attr(quicrpc_docsrs, doc(cfg(feature = "rpc")))] #[error("Error establishing connection")] Connect { #[error(std_err)] - source: quinn::ConnectError, + source: noq::ConnectError, }, - /// Error in quinn when the connection already exists, when opening a stream pair + /// Error in noq when the connection already exists, when opening a stream pair #[cfg(feature = "rpc")] #[cfg_attr(quicrpc_docsrs, doc(cfg(feature = "rpc")))] #[error("Error opening stream")] Connection { #[error(std_err)] - source: quinn::ConnectionError, + source: noq::ConnectionError, }, - /// Generic error for non-quinn transports + /// Generic error for non-noq transports #[cfg(feature = "rpc")] #[cfg_attr(quicrpc_docsrs, doc(cfg(feature = "rpc")))] #[error("Error opening stream")] @@ -1828,19 +1828,19 @@ pub mod rpc { #[cfg(feature = "rpc")] #[cfg_attr(quicrpc_docsrs, doc(cfg(feature = "rpc")))] pub mod rpc { - //! Module for cross-process RPC using [`quinn`]. + //! Module for cross-process RPC using [`noq`]. use std::{ fmt::Debug, future::Future, io, marker::PhantomData, ops::DerefMut, pin::Pin, sync::Arc, }; use n0_error::{e, stack_error}; use n0_future::{future::Boxed as BoxFuture, task::JoinSet}; - /// This is used by irpc-derive to refer to quinn types (SendStream and RecvStream) - /// to make generated code work for users without having to depend on quinn directly + /// This is used by irpc-derive to refer to noq types (SendStream and RecvStream) + /// to make generated code work for users without having to depend on noq directly /// (i.e. when using iroh). #[doc(hidden)] - pub use quinn; - use quinn::ConnectionError; + pub use noq; + use noq::ConnectionError; use serde::de::DeserializeOwned; use smallvec::SmallVec; use tracing::{debug, error_span, trace, warn, Instrument}; @@ -1868,11 +1868,11 @@ pub mod rpc { /// cross-process RPC. #[stack_error(derive, add_meta, from_sources)] pub enum WriteError { - /// Error writing to the stream with quinn + /// Error writing to the stream with noq #[error("Error writing to stream")] - Quinn { + Noq { #[error(std_err)] - source: quinn::WriteError, + source: noq::WriteError, }, /// The message exceeded the maximum allowed message size (see [`MAX_MESSAGE_SIZE`]). #[error("Maximum message size exceeded")] @@ -1905,15 +1905,15 @@ pub mod rpc { WriteError::MaxMessageSizeExceeded { .. } => { io::Error::new(io::ErrorKind::InvalidData, e) } - WriteError::Quinn { source, .. } => source.into(), + WriteError::Noq { source, .. } => source.into(), } } } - impl From for SendError { - fn from(err: quinn::WriteError) -> Self { + impl From for SendError { + fn from(err: noq::WriteError) -> Self { match err { - quinn::WriteError::Stopped(code) + noq::WriteError::Stopped(code) if code == ERROR_CODE_MAX_MESSAGE_SIZE_EXCEEDED.into() => { e!(SendError::MaxMessageSizeExceeded) @@ -1926,9 +1926,9 @@ pub mod rpc { /// Trait to abstract over a client connection to a remote service. /// /// This isn't really that much abstracted, since the result of open_bi must - /// still be a quinn::SendStream and quinn::RecvStream. This is just so we - /// can have different connection implementations for normal quinn connections, - /// iroh connections, and possibly quinn connections with disabled encryption + /// still be a noq::SendStream and noq::RecvStream. This is just so we + /// can have different connection implementations for normal noq connections, + /// iroh connections, and possibly noq connections with disabled encryption /// for performance. /// /// This is done as a trait instead of an enum, so we don't need an iroh @@ -1940,7 +1940,7 @@ pub mod rpc { /// Open a bidirectional stream to the remote service. fn open_bi( &self, - ) -> BoxFuture>; + ) -> BoxFuture>; /// Returns whether 0-RTT data was accepted by the server. /// @@ -1953,23 +1953,23 @@ pub mod rpc { /// Initially this does just have the endpoint and the address. Once a /// connection is established, it will be stored. #[derive(Debug, Clone)] - pub(crate) struct QuinnLazyRemoteConnection(Arc); + pub(crate) struct NoqLazyRemoteConnection(Arc); #[derive(Debug)] - struct QuinnLazyRemoteConnectionInner { - pub endpoint: quinn::Endpoint, + struct NoqLazyRemoteConnectionInner { + pub endpoint: noq::Endpoint, pub addr: std::net::SocketAddr, - pub connection: tokio::sync::Mutex>, + pub connection: tokio::sync::Mutex>, } - impl RemoteConnection for quinn::Connection { + impl RemoteConnection for noq::Connection { fn clone_boxed(&self) -> Box { Box::new(self.clone()) } fn open_bi( &self, - ) -> BoxFuture> + ) -> BoxFuture> { let conn = self.clone(); Box::pin(async move { @@ -1983,9 +1983,9 @@ pub mod rpc { } } - impl QuinnLazyRemoteConnection { - pub fn new(endpoint: quinn::Endpoint, addr: std::net::SocketAddr) -> Self { - Self(Arc::new(QuinnLazyRemoteConnectionInner { + impl NoqLazyRemoteConnection { + pub fn new(endpoint: noq::Endpoint, addr: std::net::SocketAddr) -> Self { + Self(Arc::new(NoqLazyRemoteConnectionInner { endpoint, addr, connection: Default::default(), @@ -1993,14 +1993,14 @@ pub mod rpc { } } - impl RemoteConnection for QuinnLazyRemoteConnection { + impl RemoteConnection for NoqLazyRemoteConnection { fn clone_boxed(&self) -> Box { Box::new(self.clone()) } fn open_bi( &self, - ) -> BoxFuture> + ) -> BoxFuture> { let this = self.0.clone(); Box::pin(async move { @@ -2029,10 +2029,10 @@ pub mod rpc { } async fn connect_and_open_bi( - endpoint: &quinn::Endpoint, + endpoint: &noq::Endpoint, addr: &std::net::SocketAddr, - mut guard: tokio::sync::MutexGuard<'_, Option>, - ) -> Result<(quinn::SendStream, quinn::RecvStream), RequestError> { + mut guard: tokio::sync::MutexGuard<'_, Option>, + ) -> Result<(noq::SendStream, noq::RecvStream), RequestError> { let conn = endpoint.connect(*addr, "localhost")?.await?; let (send, recv) = conn.open_bi().await?; *guard = Some(conn); @@ -2042,8 +2042,8 @@ pub mod rpc { /// A connection to a remote service that can be used to send the initial message. #[derive(Debug)] pub struct RemoteSender( - quinn::SendStream, - quinn::RecvStream, + noq::SendStream, + noq::RecvStream, std::marker::PhantomData, ); @@ -2060,14 +2060,14 @@ pub mod rpc { } impl RemoteSender { - pub fn new(send: quinn::SendStream, recv: quinn::RecvStream) -> Self { + pub fn new(send: noq::SendStream, recv: noq::RecvStream) -> Self { Self(send, recv, PhantomData) } pub async fn write( self, msg: impl Into, - ) -> std::result::Result<(quinn::SendStream, quinn::RecvStream), WriteError> { + ) -> std::result::Result<(noq::SendStream, noq::RecvStream), WriteError> { let buf = prepare_write(msg)?; self.write_raw(&buf).await } @@ -2075,15 +2075,15 @@ pub mod rpc { pub(crate) async fn write_raw( self, buf: &[u8], - ) -> std::result::Result<(quinn::SendStream, quinn::RecvStream), WriteError> { + ) -> std::result::Result<(noq::SendStream, noq::RecvStream), WriteError> { let RemoteSender(mut send, recv, _) = self; send.write_all(buf).await?; Ok((send, recv)) } } - impl From for oneshot::Receiver { - fn from(mut read: quinn::RecvStream) -> Self { + impl From for oneshot::Receiver { + fn from(mut read: noq::RecvStream) -> Self { let fut = async move { let size = read.read_varint_u64().await?.ok_or(io::Error::new( io::ErrorKind::UnexpectedEof, @@ -2105,31 +2105,31 @@ pub mod rpc { } } - impl From for crate::channel::none::NoReceiver { - fn from(read: quinn::RecvStream) -> Self { + impl From for crate::channel::none::NoReceiver { + fn from(read: noq::RecvStream) -> Self { drop(read); Self } } - impl From for mpsc::Receiver { - fn from(read: quinn::RecvStream) -> Self { - mpsc::Receiver::Boxed(Box::new(QuinnReceiver { + impl From for mpsc::Receiver { + fn from(read: noq::RecvStream) -> Self { + mpsc::Receiver::Boxed(Box::new(NoqReceiver { recv: read, _marker: PhantomData, })) } } - impl From for NoSender { - fn from(write: quinn::SendStream) -> Self { + impl From for NoSender { + fn from(write: noq::SendStream) -> Self { let _ = write; NoSender } } - impl From for oneshot::Sender { - fn from(mut writer: quinn::SendStream) -> Self { + impl From for oneshot::Sender { + fn from(mut writer: noq::SendStream) -> Self { oneshot::Sender::Boxed(Box::new(move |value| { Box::pin(async move { let size = match postcard::experimental::serialized_size(&value) { @@ -2161,10 +2161,10 @@ pub mod rpc { } } - impl From for mpsc::Sender { - fn from(write: quinn::SendStream) -> Self { - mpsc::Sender::Boxed(Arc::new(QuinnSender(tokio::sync::Mutex::new( - QuinnSenderState::Open(QuinnSenderInner { + impl From for mpsc::Sender { + fn from(write: noq::SendStream) -> Self { + mpsc::Sender::Boxed(Arc::new(NoqSender(tokio::sync::Mutex::new( + NoqSenderState::Open(NoqSenderInner { send: write, buffer: SmallVec::new(), _marker: PhantomData, @@ -2173,18 +2173,18 @@ pub mod rpc { } } - struct QuinnReceiver { - recv: quinn::RecvStream, + struct NoqReceiver { + recv: noq::RecvStream, _marker: std::marker::PhantomData, } - impl Debug for QuinnReceiver { + impl Debug for NoqReceiver { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - f.debug_struct("QuinnReceiver").finish() + f.debug_struct("NoqReceiver").finish() } } - impl DynReceiver for QuinnReceiver { + impl DynReceiver for NoqReceiver { fn recv( &mut self, ) -> Pin< @@ -2217,17 +2217,17 @@ pub mod rpc { } } - impl Drop for QuinnReceiver { + impl Drop for NoqReceiver { fn drop(&mut self) {} } - struct QuinnSenderInner { - send: quinn::SendStream, + struct NoqSenderInner { + send: noq::SendStream, buffer: SmallVec<[u8; 128]>, _marker: std::marker::PhantomData, } - impl QuinnSenderInner { + impl NoqSenderInner { fn send( &mut self, value: T, @@ -2291,21 +2291,21 @@ pub mod rpc { } #[derive(Default)] - enum QuinnSenderState { - Open(QuinnSenderInner), + enum NoqSenderState { + Open(NoqSenderInner), #[default] Closed, } - struct QuinnSender(tokio::sync::Mutex>); + struct NoqSender(tokio::sync::Mutex>); - impl Debug for QuinnSender { + impl Debug for NoqSender { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - f.debug_struct("QuinnSender").finish() + f.debug_struct("NoqSender").finish() } } - impl DynSender for QuinnSender { + impl DynSender for NoqSender { fn send( &self, value: T, @@ -2314,14 +2314,14 @@ pub mod rpc { let mut guard = self.0.lock().await; let sender = std::mem::take(guard.deref_mut()); match sender { - QuinnSenderState::Open(mut sender) => { + NoqSenderState::Open(mut sender) => { let res = sender.send(value).await; if res.is_ok() { - *guard = QuinnSenderState::Open(sender); + *guard = NoqSenderState::Open(sender); } res } - QuinnSenderState::Closed => { + NoqSenderState::Closed => { Err(io::Error::from(io::ErrorKind::BrokenPipe).into()) } } @@ -2336,14 +2336,14 @@ pub mod rpc { let mut guard = self.0.lock().await; let sender = std::mem::take(guard.deref_mut()); match sender { - QuinnSenderState::Open(mut sender) => { + NoqSenderState::Open(mut sender) => { let res = sender.try_send(value).await; if res.is_ok() { - *guard = QuinnSenderState::Open(sender); + *guard = NoqSenderState::Open(sender); } res } - QuinnSenderState::Closed => { + NoqSenderState::Closed => { Err(io::Error::from(io::ErrorKind::BrokenPipe).into()) } } @@ -2354,8 +2354,8 @@ pub mod rpc { Box::pin(async { let mut guard = self.0.lock().await; match guard.deref_mut() { - QuinnSenderState::Open(sender) => sender.closed().await, - QuinnSenderState::Closed => {} + NoqSenderState::Open(sender) => sender.closed().await, + NoqSenderState::Closed => {} } }) } @@ -2367,11 +2367,7 @@ pub mod rpc { /// Type alias for a handler fn for remote requests pub type Handler = Arc< - dyn Fn( - R, - quinn::RecvStream, - quinn::SendStream, - ) -> BoxFuture> + dyn Fn(R, noq::RecvStream, noq::SendStream) -> BoxFuture> + Send + Sync + 'static, @@ -2384,11 +2380,7 @@ pub mod rpc { pub trait RemoteService: Service + Sized { /// Returns the message enum for this request by combining `self` (the protocol enum) /// with a pair of QUIC streams for `tx` and `rx` channels. - fn with_remote_channels( - self, - rx: quinn::RecvStream, - tx: quinn::SendStream, - ) -> Self::Message; + fn with_remote_channels(self, rx: noq::RecvStream, tx: noq::SendStream) -> Self::Message; /// Creates a [`Handler`] that forwards all messages to a [`LocalSender`]. fn remote_handler(local_sender: LocalSender) -> Handler { @@ -2401,7 +2393,7 @@ pub mod rpc { /// Utility function to listen for incoming connections and handle them with the provided handler pub async fn listen( - endpoint: quinn::Endpoint, + endpoint: noq::Endpoint, handler: Handler, ) { let mut request_id = 0u64; @@ -2439,7 +2431,7 @@ pub mod rpc { /// Handles a quic connection with the provided `handler`. pub async fn handle_connection( - connection: quinn::Connection, + connection: noq::Connection, handler: Handler, ) -> io::Result<()> { tracing::Span::current().record( @@ -2456,7 +2448,7 @@ pub mod rpc { } pub async fn read_request( - connection: &quinn::Connection, + connection: &noq::Connection, ) -> std::io::Result> { Ok(read_request_raw::(connection) .await? @@ -2471,8 +2463,8 @@ pub mod rpc { /// Returns None if the remote closed the connection with error code `0`. /// Returns an error for all other failure cases. pub async fn read_request_raw( - connection: &quinn::Connection, - ) -> std::io::Result> { + connection: &noq::Connection, + ) -> std::io::Result> { let (send, mut recv) = match connection.accept_bi().await { Ok((s, r)) => (s, r), Err(ConnectionError::ApplicationClosed(cause)) diff --git a/src/util.rs b/src/util.rs index 5b92ae11..81561d05 100644 --- a/src/util.rs +++ b/src/util.rs @@ -1,16 +1,16 @@ //! Utilities //! //! This module contains utilities to read and write varints, as well as -//! functions to set up quinn endpoints for local rpc and testing. -#[cfg(feature = "quinn_endpoint_setup")] -#[cfg_attr(quicrpc_docsrs, doc(cfg(feature = "quinn_endpoint_setup")))] -mod quinn_setup_utils { +//! functions to set up noq endpoints for local rpc and testing. +#[cfg(feature = "noq_endpoint_setup")] +#[cfg_attr(quicrpc_docsrs, doc(cfg(feature = "noq_endpoint_setup")))] +mod noq_setup_utils { use std::{sync::Arc, time::Duration}; use n0_error::{Result, StdResultExt}; - use quinn::{crypto::rustls::QuicClientConfig, ClientConfig, ServerConfig}; + use noq::{crypto::rustls::QuicClientConfig, ClientConfig, ServerConfig}; - /// Create a quinn client config and trusts given certificates. + /// Create a noq client config and trusts given certificates. /// /// ## Args /// @@ -29,17 +29,17 @@ mod quinn_setup_utils { .with_root_certificates(certs) .with_no_client_auth(); let quic_client_config = - quinn::crypto::rustls::QuicClientConfig::try_from(crypto_client_config) + noq::crypto::rustls::QuicClientConfig::try_from(crypto_client_config) .std_context("Error creating QUIC client config")?; - let mut transport_config = quinn::TransportConfig::default(); + let mut transport_config = noq::TransportConfig::default(); transport_config.keep_alive_interval(Some(Duration::from_secs(1))); let mut client_config = ClientConfig::new(Arc::new(quic_client_config)); client_config.transport_config(Arc::new(transport_config)); Ok(client_config) } - /// Create a quinn server config with a self-signed certificate + /// Create a noq server config with a self-signed certificate /// /// Returns the server config and the certificate in DER format pub fn configure_server() -> Result<(ServerConfig, Vec)> { @@ -59,7 +59,7 @@ mod quinn_setup_utils { Ok((server_config, cert_der.to_vec())) } - /// Create a quinn client config and trust all certificates. + /// Create a noq client config and trust all certificates. pub fn configure_client_insecure() -> Result { let provider = rustls::crypto::ring::default_provider(); let crypto = rustls::ClientConfig::builder_with_provider(Arc::new(provider)) @@ -78,7 +78,7 @@ mod quinn_setup_utils { mod non_wasm { use std::net::SocketAddr; - use quinn::Endpoint; + use noq::Endpoint; use super::*; @@ -174,9 +174,9 @@ mod quinn_setup_utils { } } } -#[cfg(feature = "quinn_endpoint_setup")] -#[cfg_attr(quicrpc_docsrs, doc(cfg(feature = "quinn_endpoint_setup")))] -pub use quinn_setup_utils::*; +#[cfg(feature = "noq_endpoint_setup")] +#[cfg_attr(quicrpc_docsrs, doc(cfg(feature = "noq_endpoint_setup")))] +pub use noq_setup_utils::*; #[cfg(any(feature = "rpc", feature = "varint-util"))] #[cfg_attr( diff --git a/tests/common.rs b/tests/common.rs index 1e182032..9de65f27 100644 --- a/tests/common.rs +++ b/tests/common.rs @@ -1,10 +1,10 @@ -#![cfg(feature = "quinn_endpoint_setup")] +#![cfg(feature = "noq_endpoint_setup")] use std::net::{Ipv4Addr, SocketAddr, SocketAddrV4}; use irpc::util::{make_client_endpoint, make_server_endpoint}; use n0_error::stack_error; -use quinn::Endpoint; +use noq::Endpoint; use serde::{Deserialize, Deserializer, Serialize, Serializer}; use testresult::TestResult; diff --git a/tests/mpsc_channel.rs b/tests/mpsc_channel.rs index 6d1e83f9..017cf27b 100644 --- a/tests/mpsc_channel.rs +++ b/tests/mpsc_channel.rs @@ -1,4 +1,4 @@ -#![cfg(feature = "quinn_endpoint_setup")] +#![cfg(feature = "noq_endpoint_setup")] use std::{ io::{self, ErrorKind}, @@ -13,7 +13,7 @@ use irpc::{ util::AsyncWriteVarintExt, }; use n0_error::e; -use quinn::Endpoint; +use noq::Endpoint; use testresult::TestResult; use tokio::time::timeout; @@ -46,7 +46,7 @@ async fn mpsc_sender_clone_closed_error() -> TestResult<()> { loop { match send3.send(vec![1, 2, 3]).await { Err(SendError::Io { source, .. }) if source.kind() == ErrorKind::BrokenPipe => { - break + break; } _ => {} }; @@ -94,7 +94,7 @@ async fn mpsc_sender_clone_drop_error() -> TestResult<()> { loop { match send3.send(vec![1, 2, 3]).await { Err(SendError::Io { source, .. }) if source.kind() == ErrorKind::BrokenPipe => { - break + break; } _ => {} }; diff --git a/tests/oneshot_channel.rs b/tests/oneshot_channel.rs index d63ad0ce..1aec4a48 100644 --- a/tests/oneshot_channel.rs +++ b/tests/oneshot_channel.rs @@ -1,4 +1,4 @@ -#![cfg(feature = "quinn_endpoint_setup")] +#![cfg(feature = "noq_endpoint_setup")] use std::io::{self, ErrorKind}; @@ -10,7 +10,7 @@ use irpc::{ util::AsyncWriteVarintExt, }; use n0_error::e; -use quinn::Endpoint; +use noq::Endpoint; use testresult::TestResult; mod common;