diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 3ebee452..a241f434 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -16,7 +16,7 @@ env: RUST_BACKTRACE: 1 RUSTFLAGS: -Dwarnings RUSTDOCFLAGS: -Dwarnings - MSRV: "1.89" + MSRV: "1.91" SCCACHE_CACHE_SIZE: "50G" IROH_FORCE_STAGING_RELAYS: "1" diff --git a/Cargo.lock b/Cargo.lock index bd1e0d6c..bf42cf42 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -178,7 +178,7 @@ dependencies = [ "nom", "num-traits", "rusticata-macros", - "thiserror 2.0.18", + "thiserror", "time", ] @@ -369,6 +369,12 @@ dependencies = [ "tokio", ] +[[package]] +name = "base16ct" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fd307490d624467aa6f74b0eabb77633d1f758a7b25f12bceb0b22e08d9726f6" + [[package]] name = "base64" version = "0.22.1" @@ -410,9 +416,9 @@ checksum = "c4512299f36f043ab09a583e57bceb5a5aab7a73db1805848e8fef3c9e8c78b3" [[package]] name = "blake3" -version = "1.8.4" +version = "1.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d2d5991425dfd0785aed03aedcf0b321d61975c9b5b3689c774a2610ae0b51e" +checksum = "0aa83c34e62843d924f905e0f5c866eb1dd6545fc4d719e803d9ba6030371fce" dependencies = [ "arrayref", "arrayvec", @@ -472,42 +478,38 @@ dependencies = [ [[package]] name = "cargo-platform" -version = "0.1.9" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e35af189006b9c0f00a064685c727031e3ed2d8020f7ba284d78cc2671bd36ea" +checksum = "dd0061da739915fae12ea00e16397555ed4371a6bb285431aab930f61b0aa4ba" dependencies = [ "serde", + "serde_core", ] [[package]] name = "cargo_metadata" -version = "0.14.2" +version = "0.23.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4acbb09d9ee8e23699b9634375c72795d095bf268439da88562cf9b501f181fa" +checksum = "ef987d17b0a113becdd19d3d0022d04d7ef41f9efe4f3fb63ac44ba61df3ade9" dependencies = [ "camino", "cargo-platform", "semver", "serde", "serde_json", + "thiserror", ] [[package]] name = "cc" -version = "1.2.60" +version = "1.2.62" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43c5703da9466b66a946814e1adf53ea2c90f10063b86290cc9eb67ce3478a20" +checksum = "a1dce859f0832a7d088c4f1119888ab94ef4b5d6795d1ce05afb7fe159d79f98" dependencies = [ "find-msvc-tools", "shlex", ] -[[package]] -name = "cesu8" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d43a04d8753f35258c91f8ec639f792891f748a1edbd759cf1dcea3382ad83c" - [[package]] name = "cfg-if" version = "1.0.4" @@ -607,7 +609,7 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0fa961b519f0b462e3a3b4a34b64d119eeaca1d59af726fe450bbba07a9fc0a1" dependencies = [ - "thiserror 2.0.18", + "thiserror", ] [[package]] @@ -857,15 +859,15 @@ dependencies = [ [[package]] name = "data-encoding" -version = "2.10.0" +version = "2.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d7a1e2f27636f116493b8b860f5546edb47c8d8f8ea73e1d2a20be88e28d1fea" +checksum = "a4ae5f15dda3c708c0ade84bfee31ccab44a3da4f88015ed22f63732abe300c8" [[package]] name = "data-encoding-macro" -version = "0.1.19" +version = "0.1.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8142a83c17aa9461d637e649271eae18bf2edd00e91f2e105df36c3c16355bdb" +checksum = "3259c913752a86488b501ed8680446a5ed2d5aeac6e596cb23ba3800768ea32c" dependencies = [ "data-encoding", "data-encoding-macro-internal", @@ -873,9 +875,9 @@ dependencies = [ [[package]] name = "data-encoding-macro-internal" -version = "0.1.17" +version = "0.1.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ab67060fc6b8ef687992d439ca0fa36e7ed17e9a0b16b25b601e8757df720de" +checksum = "ccc2776f0c61eca1ca32528f85548abd1a4be8fb53d1b21c013e4f18da1e7090" dependencies = [ "data-encoding", "syn 2.0.117", @@ -989,9 +991,9 @@ checksum = "ab03c107fafeb3ee9f5925686dbb7a73bc76e3932abb0d2b365cb64b169cf04c" [[package]] name = "digest" -version = "0.11.2" +version = "0.11.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4850db49bf08e663084f7fb5c87d202ef91a3907271aff24a94eb97ff039153c" +checksum = "f1dd6dbb5841937940781866fa1281a1ff7bd3bf827091440879f9994983d5c2" dependencies = [ "block-buffer", "const-oid", @@ -1034,20 +1036,20 @@ dependencies = [ [[package]] name = "ed25519" -version = "3.0.0-rc.4" +version = "3.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c6e914c7c52decb085cea910552e24c63ac019e3ab8bf001ff736da9a9d9d890" +checksum = "29fcf32e6c73d1079f83ab4d782de2d81620346a5f38c6237a86a22f8368980a" dependencies = [ "pkcs8", - "serde", + "serdect", "signature", ] [[package]] name = "ed25519-dalek" -version = "3.0.0-pre.6" +version = "3.0.0-pre.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "053618a4c3d3bc24f188aa660ae75a46eeab74ef07fb415c61431e5e7cd4749b" +checksum = "20449acd54b660981ae5caa2bcb56d1fe7f25f2e37a38ec507400fab034d4bb6" dependencies = [ "curve25519-dalek", "ed25519", @@ -1188,6 +1190,16 @@ dependencies = [ "percent-encoding", ] +[[package]] +name = "fslock" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "04412b8935272e3a9bae6f48c7bfff74c2911f60525404edfdd28e49884c3bfb" +dependencies = [ + "libc", + "winapi", +] + [[package]] name = "futures" version = "0.3.32" @@ -1380,7 +1392,7 @@ dependencies = [ "cfg-if", "js-sys", "libc", - "wasi", + "wasi 0.11.1+wasi-snapshot-preview1", "wasm-bindgen", ] @@ -1391,11 +1403,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "899def5c37c4fd7b2664648c28120ecec138e4d395b459e5ca34f9cce2dd77fd" dependencies = [ "cfg-if", - "js-sys", "libc", "r-efi 5.3.0", "wasip2", - "wasm-bindgen", ] [[package]] @@ -1444,9 +1454,9 @@ dependencies = [ [[package]] name = "h2" -version = "0.4.13" +version = "0.4.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2f44da3a8150a6703ed5d34e164b875fd14c2cdab9af1252a9a1020bde2bdc54" +checksum = "171fefbc92fe4a4de27e0698d6a5b392d6a0e333506bc49133760b3bcf948733" dependencies = [ "atomic-waker", "bytes", @@ -1487,21 +1497,15 @@ dependencies = [ [[package]] name = "hashbrown" -version = "0.16.1" +version = "0.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "841d1cc9bed7f9236f321df977030373f4a4163ae1a7dbfe1a51a2c1a51d9100" +checksum = "4f467dd6dccf739c208452f8014c75c18bb8301b050ad1cfb27153803edb0f51" dependencies = [ "allocator-api2", "equivalent", "foldhash 0.2.0", ] -[[package]] -name = "hashbrown" -version = "0.17.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4f467dd6dccf739c208452f8014c75c18bb8301b050ad1cfb27153803edb0f51" - [[package]] name = "heapless" version = "0.7.17" @@ -1530,9 +1534,9 @@ checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" [[package]] name = "hickory-net" -version = "0.26.0-beta.4" +version = "0.26.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e232f503c4cfe3f4ea6594971255ecab9f6a0080c4c8e0e17630cc701322aa4" +checksum = "e2295ed2f9c31e471e1428a8f88a3f0e1f4b27c15049592138d1eebe9c35b183" dependencies = [ "async-trait", "bytes", @@ -1546,10 +1550,10 @@ dependencies = [ "http", "idna", "ipnet", - "jni 0.22.4", + "jni", "rand 0.10.1", "rustls", - "thiserror 2.0.18", + "thiserror", "tinyvec", "tokio", "tokio-rustls", @@ -1559,19 +1563,19 @@ dependencies = [ [[package]] name = "hickory-proto" -version = "0.26.0-beta.4" +version = "0.26.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fcca12171ce774c549f35510be702f4da00ef12ca486f0f2acb2ee96f2f5ca0f" +checksum = "0bab31817bfb44672a252e97fe81cd0c18d1b2cf892108922f6818820df8c643" dependencies = [ "data-encoding", "idna", "ipnet", - "jni 0.22.4", + "jni", "once_cell", "prefix-trie", "rand 0.10.1", "ring", - "thiserror 2.0.18", + "thiserror", "tinyvec", "tracing", "url", @@ -1579,9 +1583,9 @@ dependencies = [ [[package]] name = "hickory-resolver" -version = "0.26.0-beta.4" +version = "0.26.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e7d2c928fa078e6640f26cf1b537b212e1688829c3944780025c7084e8bbbf6" +checksum = "f0d58d28879ceecde6607729660c2667a081ccdc082e082675042793960f178c" dependencies = [ "cfg-if", "futures-util", @@ -1589,7 +1593,7 @@ dependencies = [ "hickory-proto", "ipconfig", "ipnet", - "jni 0.22.4", + "jni", "moka", "ndk-context", "once_cell", @@ -1599,7 +1603,7 @@ dependencies = [ "rustls", "smallvec", "system-configuration", - "thiserror 2.0.18", + "thiserror", "tokio", "tokio-rustls", "tracing", @@ -1652,9 +1656,9 @@ checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9" [[package]] name = "hybrid-array" -version = "0.4.10" +version = "0.4.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3944cf8cf766b40e2a1a333ee5e9b563f854d5fa49d6a8ca2764e97c6eddb214" +checksum = "08d46837a0ed51fe95bd3b05de33cd64a1ee88fc797477ca48446872504507c5" dependencies = [ "typenum", ] @@ -1694,7 +1698,6 @@ dependencies = [ "tokio", "tokio-rustls", "tower-service", - "webpki-roots", ] [[package]] @@ -1857,9 +1860,9 @@ dependencies = [ [[package]] name = "idna_adapter" -version = "1.2.1" +version = "1.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3acae9609540aa318d1bc588455225fb2085b9ed0c4f6bd0d9d5bcd86f1a0344" +checksum = "cb68373c0d6620ef8105e855e7745e18b0d00d3bdb07fb532e434244cdb9a714" dependencies = [ "icu_normalizer", "icu_properties", @@ -1937,21 +1940,11 @@ dependencies = [ "serde", ] -[[package]] -name = "iri-string" -version = "0.7.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "25e659a4bb38e810ebc252e53b5814ff908a8c58c2a9ce2fae1bbec24cbf4e20" -dependencies = [ - "memchr", - "serde", -] - [[package]] name = "iroh" -version = "0.98.0" +version = "1.0.0-rc.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "936882068af6037912c205ad73ae83e1ab9b81f5bd01200210c90f000e24f4d3" +checksum = "b98e206e3d3f2642f5c08c413755fc0ac19b54ae1a656af88be03454ce3ed2e6" dependencies = [ "axum", "backon", @@ -1980,11 +1973,10 @@ dependencies = [ "noq-udp", "papaya", "pin-project", - "pkcs8", "portable-atomic", "portmapper", "rand 0.10.1", - "reqwest 0.13.2", + "reqwest", "rustc-hash", "rustls", "rustls-pki-types", @@ -2004,9 +1996,9 @@ dependencies = [ [[package]] name = "iroh-base" -version = "0.98.0" +version = "1.0.0-rc.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "738865784637830fb14204ebd3047922db83bc1816a59027af29579b9c27bd99" +checksum = "2160a45265eba3bd290ce698f584c9b088bee47e518e9ec4460d5e5888ef660e" dependencies = [ "curve25519-dalek", "data-encoding", @@ -2026,9 +2018,9 @@ dependencies = [ [[package]] name = "iroh-blobs" -version = "0.100.0" +version = "0.101.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "04dd8da14b7c35d8c0e82a246939ee532ce4d9eb30b0e353a5a9470bc8f52b34" +checksum = "c6e351f5c1db08dcfb456e6299bda0881e1ba95a360f0913a5e57344c1538fb2" dependencies = [ "arrayvec", "bao-tree", @@ -2038,7 +2030,6 @@ dependencies = [ "constant_time_eq", "data-encoding", "derive_more", - "futures-lite", "genawaiter", "getrandom 0.4.2", "hex", @@ -2047,6 +2038,7 @@ dependencies = [ "iroh-io", "iroh-metrics", "iroh-tickets", + "iroh-util", "irpc", "n0-error", "n0-future", @@ -2067,16 +2059,26 @@ dependencies = [ [[package]] name = "iroh-dns" -version = "0.98.0" +version = "1.0.0-rc.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca474630d1e62ddef83149db6babe6a1055d901df9054349d31b22df99811b92" +checksum = "c8b6d2946350d398c9d2d795bb99b04f22e8414c8a8ad9c5c3c0c5b7899af9a4" dependencies = [ + "arc-swap", + "cfg_aliases", "derive_more", + "hickory-resolver", "iroh-base", "n0-error", "n0-future", + "ndk-context", + "rand 0.10.1", + "reqwest", + "rustls", "simple-dns", "strum", + "tokio", + "tracing", + "url", ] [[package]] @@ -2092,8 +2094,6 @@ dependencies = [ "derive_more", "ed25519-dalek", "futures-buffered", - "futures-lite", - "futures-util", "hex", "iroh", "iroh-blobs", @@ -2119,7 +2119,7 @@ dependencies = [ "test-strategy", "testdir", "testresult", - "thiserror 2.0.18", + "thiserror", "tokio", "tokio-stream", "tokio-util", @@ -2130,9 +2130,9 @@ dependencies = [ [[package]] name = "iroh-gossip" -version = "0.98.0" +version = "0.99.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b349a9ab58e3b56cf41df693bc1812add192ad70ce7c8d0dbdc7d0319d71b11f" +checksum = "48eaefd27751bc5dabda1f1b318c38a8b624fa137a1aaf429dfdd4d66b452ba9" dependencies = [ "blake3", "bytes", @@ -2174,9 +2174,9 @@ dependencies = [ [[package]] name = "iroh-metrics" -version = "0.38.3" +version = "1.0.0-rc.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "761b45ba046134b11eb3e432fa501616b45c4bf3a30c21717578bc07aa6461dd" +checksum = "d102597d0ee523f17fdb672c532395e634dbe945429284c811430d63bacc0d8a" dependencies = [ "http-body-util", "hyper", @@ -2185,19 +2185,21 @@ dependencies = [ "itoa", "n0-error", "portable-atomic", - "postcard", - "reqwest 0.12.28", + "reqwest", + "rustls", + "rustls-platform-verifier", "ryu", "serde", "tokio", + "tokio-util", "tracing", ] [[package]] name = "iroh-metrics-derive" -version = "0.4.1" +version = "1.0.0-rc.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cab063c2bfd6c3d5a33a913d4fdb5252f140db29ec67c704f20f3da7e8f92dbf" +checksum = "91c8e0c97f1dc787107f388433c349397c565572fe6406d600ff7bb7b7fe3b30" dependencies = [ "heck", "proc-macro2", @@ -2207,9 +2209,9 @@ dependencies = [ [[package]] name = "iroh-relay" -version = "0.98.0" +version = "1.0.0-rc.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4aa6e9a7277bfbb439739c52b57eb5f9288030983928412022b8e94a43d4d838" +checksum = "54f490405e42dd2ecf16be18a3587d2665401e94a498094f12322eaa6d5ebb2b" dependencies = [ "ahash", "blake3", @@ -2239,7 +2241,7 @@ dependencies = [ "rand 0.10.1", "rcgen", "reloadable-state", - "reqwest 0.13.2", + "reqwest", "rustls", "rustls-cert-file-reader", "rustls-cert-reloadable-resolver", @@ -2267,9 +2269,9 @@ dependencies = [ [[package]] name = "iroh-tickets" -version = "0.5.0" +version = "1.0.0-rc.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09579438a34a147dcdce8a67cdf59bd53a197bfefe71da1a8e94df9aec0583ae" +checksum = "0a4b7fbfa10582f6b4f6b013eef1d21987d3df5fd42c0f7707d5de6abd34f8e9" dependencies = [ "data-encoding", "derive_more", @@ -2279,11 +2281,25 @@ dependencies = [ "serde", ] +[[package]] +name = "iroh-util" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e7705450a124b2b05f7caad505620ab5ac3bf4eb6b85018e6b9bca36329fd031" +dependencies = [ + "derive_more", + "iroh", + "n0-error", + "n0-future", + "tokio", + "tracing", +] + [[package]] name = "irpc" -version = "0.14.0" +version = "0.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26bacc8d71f54f16cb5ae82745cfca440ad8ecd09b4480d415b8d9dc78146432" +checksum = "0d38567eed2ed120e1040386930eb3b9ce6ca8a94b13c20a1b3b6535f253b00c" dependencies = [ "futures-buffered", "futures-util", @@ -2303,9 +2319,9 @@ dependencies = [ [[package]] name = "irpc-derive" -version = "0.11.0" +version = "0.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4651422b9d7af09fa1437a5fabbd9e074162b502a1af7f5bae8b439eaf3e049f" +checksum = "6d8030c02dce4c9a8aecfb6e0870ee13ba3060096d88f6c1309919af8f197793" dependencies = [ "proc-macro2", "quote", @@ -2324,22 +2340,6 @@ version = "1.0.18" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8f42a60cbdf9a97f5d2305f08a87dc4e09308d1276d28c869c684d7777685682" -[[package]] -name = "jni" -version = "0.21.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a87aa2bb7d2af34197c04845522473242e1aa17c12f4935d5856491a7fb8c97" -dependencies = [ - "cesu8", - "cfg-if", - "combine", - "jni-sys 0.3.1", - "log", - "thiserror 1.0.69", - "walkdir", - "windows-sys 0.45.0", -] - [[package]] name = "jni" version = "0.22.4" @@ -2349,10 +2349,10 @@ dependencies = [ "cfg-if", "combine", "jni-macros", - "jni-sys 0.4.1", + "jni-sys", "log", "simd_cesu8", - "thiserror 2.0.18", + "thiserror", "walkdir", "windows-link", ] @@ -2370,15 +2370,6 @@ dependencies = [ "syn 2.0.117", ] -[[package]] -name = "jni-sys" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41a652e1f9b6e0275df1f15b32661cf0d4b78d4d87ddec5e0c3c20f097433258" -dependencies = [ - "jni-sys 0.4.1", -] - [[package]] name = "jni-sys" version = "0.4.1" @@ -2400,9 +2391,9 @@ dependencies = [ [[package]] name = "js-sys" -version = "0.3.95" +version = "0.3.98" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2964e92d1d9dc3364cae4d718d93f227e3abb088e747d92e0395bfdedf1c12ca" +checksum = "67df7112613f8bfd9150013a0314e196f4800d3201ae742489d999db2f979f08" dependencies = [ "cfg-if", "futures-util", @@ -2424,9 +2415,9 @@ checksum = "09edd9e8b54e49e587e4f6295a7d29c3ea94d469cb40ab8ca70b288248a81db2" [[package]] name = "libc" -version = "0.2.185" +version = "0.2.186" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "52ff2c0fe9bc6cb6b14a0592c2ff4fa9ceb83eea9db979b0487cd054946a2b8f" +checksum = "68ab91017fe16c622486840e4c83c9a37afeff978bd239b5293d61ece587de66" [[package]] name = "libm" @@ -2440,10 +2431,7 @@ version = "0.1.16" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e02f3bb43d335493c96bf3fd3a321600bf6bd07ed34bc64118e9293bdffea46c" dependencies = [ - "bitflags", "libc", - "plain", - "redox_syscall 0.7.4", ] [[package]] @@ -2488,11 +2476,11 @@ dependencies = [ [[package]] name = "lru" -version = "0.16.4" +version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f66e8d5d03f609abc3a39e6f08e4164ebf1447a732906d39eb9b99b7919ef39" +checksum = "8a860605968fce16869fd239cf4237a82f3ac470723415db603b0e8b6c8d4fb9" dependencies = [ - "hashbrown 0.16.1", + "hashbrown 0.17.0", ] [[package]] @@ -2556,7 +2544,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "50b7e5b27aa02a74bac8c3f23f448f8d87ff11f92d3aac1a6ed369ee08cc56c1" dependencies = [ "libc", - "wasi", + "wasi 0.11.1+wasi-snapshot-preview1", "windows-sys 0.61.2", ] @@ -2579,9 +2567,9 @@ dependencies = [ [[package]] name = "n0-error" -version = "0.1.3" +version = "1.0.0-rc.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af4782b4baf92d686d161c15460c83d16ebcfd215918763903e9619842665cae" +checksum = "223e946a84aa91644507a6b7865cfebbb9a231ace499041c747ab0fd30408212" dependencies = [ "anyhow", "n0-error-macros", @@ -2590,9 +2578,9 @@ dependencies = [ [[package]] name = "n0-error-macros" -version = "0.1.3" +version = "1.0.0-rc.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "03755949235714b2b307e5ae89dd8c1c2531fb127d9b8b7b4adf9c876cd3ed18" +checksum = "565305a21e6b3bf26640ad98f05a0fda12d3ab4315394566b52a7bddb8b34828" dependencies = [ "proc-macro2", "quote", @@ -2622,9 +2610,9 @@ dependencies = [ [[package]] name = "n0-watcher" -version = "0.6.1" +version = "1.0.0-rc.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38795f7932e6e9d1c6e989270ef5b3ff24ebb910e2c9d4bed2d28d8bae3007dc" +checksum = "928d8039a66cce5efcfd35e88b32d3defc8eba630b3ac451522997f563956a52" dependencies = [ "derive_more", "n0-error", @@ -2651,9 +2639,9 @@ dependencies = [ [[package]] name = "netdev" -version = "0.42.0" +version = "0.43.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e30af1a5073b82356d9317c18226826370b4288eba2f71c7e84e18bae51b3847" +checksum = "57bacaf873ee4eab5646f99b381b271ec75e716902a67cf962c0f328c5eb5bfb" dependencies = [ "block2", "dispatch2", @@ -2665,6 +2653,8 @@ dependencies = [ "netlink-packet-route 0.29.0", "netlink-sys", "objc2-core-foundation", + "objc2-core-wlan", + "objc2-foundation", "objc2-system-configuration", "once_cell", "plist", @@ -2715,7 +2705,7 @@ dependencies = [ "log", "netlink-packet-core", "netlink-sys", - "thiserror 2.0.18", + "thiserror", ] [[package]] @@ -2733,9 +2723,9 @@ dependencies = [ [[package]] name = "netwatch" -version = "0.16.0" +version = "0.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6fc0d4b4134425d9834e591b1a6f807ea365c6d941d738942215564af5f28a97" +checksum = "b5bfbba77b994ce69f1d40fc66fd8abbd23df62ce4aea61fbb34d638106a2549" dependencies = [ "atomic-waker", "bytes", @@ -2779,9 +2769,9 @@ dependencies = [ [[package]] name = "noq" -version = "0.18.0" +version = "1.0.0-rc.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4b969bd157c3bd3bab239a1a8b14f67f2033fa012770367fcbd5b42d71ae3548" +checksum = "22739e0831e40f5ab7d6ac5317ed80bfe5fb3f44be57d23fa2eea8bff83fb303" dependencies = [ "bytes", "cfg_aliases", @@ -2792,7 +2782,7 @@ dependencies = [ "rustc-hash", "rustls", "socket2", - "thiserror 2.0.18", + "thiserror", "tokio", "tokio-stream", "tracing", @@ -2801,9 +2791,9 @@ dependencies = [ [[package]] name = "noq-proto" -version = "0.17.0" +version = "1.0.0-rc.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cdec6f5039d98ee5377b2f532d495a555eb664c53161b1b5780dcaeac678b60e" +checksum = "7cee32450cf726b223ac4154003c93cb52fbde159ab1240990e88945bf3ae35e" dependencies = [ "aes-gcm", "bytes", @@ -2814,6 +2804,7 @@ dependencies = [ "identity-hash", "lru-slab", "rand 0.10.1", + "rand_pcg", "ring", "rustc-hash", "rustls", @@ -2821,7 +2812,7 @@ dependencies = [ "rustls-platform-verifier", "slab", "sorted-index-buffer", - "thiserror 2.0.18", + "thiserror", "tinyvec", "tracing", "web-time", @@ -2829,9 +2820,9 @@ dependencies = [ [[package]] name = "noq-udp" -version = "0.10.0" +version = "1.0.0-rc.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee91b05f4f3353290936ba1f3233518868fb4e2da99cb4c90d1f8cebb064e527" +checksum = "78633d1fe1bde91d12bcabb230ac9edb890857414c6d44f3212e0d309525b5ff" dependencies = [ "cfg_aliases", "libc", @@ -2945,12 +2936,49 @@ dependencies = [ "objc2", ] +[[package]] +name = "objc2-core-wlan" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c71e34919aba0d701380d911702455038a8a3587467fe0141d6a71501e7ffe48" +dependencies = [ + "bitflags", + "objc2", + "objc2-core-foundation", + "objc2-foundation", + "objc2-security", + "objc2-security-foundation", +] + [[package]] name = "objc2-encode" version = "4.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ef25abbcd74fb2609453eb695bd2f860d389e457f67dc17cafc8b8cbc89d0c33" +[[package]] +name = "objc2-foundation" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3e0adef53c21f888deb4fa59fc59f7eb17404926ee8a6f59f5df0fd7f9f3272" +dependencies = [ + "bitflags", + "block2", + "libc", + "objc2", + "objc2-core-foundation", +] + +[[package]] +name = "objc2-io-kit" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "33fafba39597d6dc1fb709123dfa8289d39406734be322956a69f0931c73bb15" +dependencies = [ + "libc", + "objc2-core-foundation", +] + [[package]] name = "objc2-security" version = "0.3.2" @@ -2962,6 +2990,16 @@ dependencies = [ "objc2-core-foundation", ] +[[package]] +name = "objc2-security-foundation" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ef76382e9cedd18123099f17638715cc3d81dba3637d4c0d39ab69df2ef345a5" +dependencies = [ + "objc2", + "objc2-foundation", +] + [[package]] name = "objc2-system-configuration" version = "0.3.2" @@ -3056,7 +3094,7 @@ checksum = "2621685985a2ebf1c516881c026032ac7deafcda1a2c9b7850dc81e3dfcb64c1" dependencies = [ "cfg-if", "libc", - "redox_syscall 0.5.18", + "redox_syscall", "smallvec", "windows-link", ] @@ -3104,18 +3142,18 @@ dependencies = [ [[package]] name = "pin-project" -version = "1.1.11" +version = "1.1.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1749c7ed4bcaf4c3d0a3efc28538844fb29bcdd7d2b67b2be7e20ba861ff517" +checksum = "cbf0d9e68100b3a7989b4901972f265cd542e560a3a8a724e1e20322f4d06ce9" dependencies = [ "pin-project-internal", ] [[package]] name = "pin-project-internal" -version = "1.1.11" +version = "1.1.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d9b20ed30f105399776b9c883e68e536ef602a16ae6f596d2c473591d6ad64c6" +checksum = "a990e22f43e84855daf260dded30524ef4a9021cc7541c26540500a50b624389" dependencies = [ "proc-macro2", "quote", @@ -3130,25 +3168,19 @@ checksum = "a89322df9ebe1c1578d689c92318e070967d1042b512afbe49518723f4e6d5cd" [[package]] name = "pkcs8" -version = "0.11.0-rc.11" +version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "12922b6296c06eb741b02d7b5161e3aaa22864af38dfa025a1a3ba3f68c84577" +checksum = "451913da69c775a56034ea8d9003d27ee8948e12443eae7c038ba100a4f21cb7" dependencies = [ "der", "spki", ] -[[package]] -name = "plain" -version = "0.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4596b6d070b27117e987119b4dac604f3c58cfb0b191112e24771b2faeac1a6" - [[package]] name = "plist" -version = "1.8.0" +version = "1.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "740ebea15c5d1428f910cd1a5f52cebf8d25006245ed8ade92702f4943d91e07" +checksum = "092791278e026273c1b65bbdcfbba3a300f2994c896bd01ab01da613c29c46f1" dependencies = [ "base64", "indexmap", @@ -3180,20 +3212,19 @@ dependencies = [ [[package]] name = "portmapper" -version = "0.16.0" +version = "0.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a145e62ddd9aecc9c7b1a3c84cea2a803386c7f4da7795bf9f0d50d90dc52549" +checksum = "aec2a8809e3f7dba624776bb223da9fed49c413c60b3bef21aadcb67a5e35944" dependencies = [ "base64", "bytes", "derive_more", - "futures-lite", - "futures-util", "hyper-util", "igd-next", "iroh-metrics", "libc", "n0-error", + "n0-future", "netwatch", "num_enum", "rand 0.10.1", @@ -3269,9 +3300,9 @@ dependencies = [ [[package]] name = "prefix-trie" -version = "0.8.2" +version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23370be78b7e5bcbb0cab4a02047eb040279a693c78daad04c2c5f1c24a83503" +checksum = "90f561214012d3fc240a1f9c817cc4d57f5310910d066069c1b093f766bb5966" dependencies = [ "either", "ipnet", @@ -3365,68 +3396,13 @@ checksum = "a1d01941d82fa2ab50be1e79e6714289dd7cde78eba4c074bc5a4374f650dfe0" [[package]] name = "quick-xml" -version = "0.38.4" +version = "0.39.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b66c2058c55a409d601666cffe35f04333cf1013010882cec174a7467cd4e21c" +checksum = "721da970c312655cde9b4ffe0547f20a8494866a4af5ff51f18b7c633d0c870b" dependencies = [ "memchr", ] -[[package]] -name = "quinn" -version = "0.11.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9e20a958963c291dc322d98411f541009df2ced7b5a4f2bd52337638cfccf20" -dependencies = [ - "bytes", - "cfg_aliases", - "pin-project-lite", - "quinn-proto", - "quinn-udp", - "rustc-hash", - "rustls", - "socket2", - "thiserror 2.0.18", - "tokio", - "tracing", - "web-time", -] - -[[package]] -name = "quinn-proto" -version = "0.11.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "434b42fec591c96ef50e21e886936e66d3cc3f737104fdb9b737c40ffb94c098" -dependencies = [ - "bytes", - "getrandom 0.3.4", - "lru-slab", - "rand 0.9.4", - "ring", - "rustc-hash", - "rustls", - "rustls-pki-types", - "slab", - "thiserror 2.0.18", - "tinyvec", - "tracing", - "web-time", -] - -[[package]] -name = "quinn-udp" -version = "0.5.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "addec6a0dcad8a8d96a771f815f0eaf55f9d1805756410b39f5fa81332574cbd" -dependencies = [ - "cfg_aliases", - "libc", - "once_cell", - "socket2", - "tracing", - "windows-sys 0.60.2", -] - [[package]] name = "quote" version = "1.0.45" @@ -3494,6 +3470,15 @@ version = "0.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "63b8176103e19a2643978565ca18b50549f6101881c443590420e4dc998a3c69" +[[package]] +name = "rand_pcg" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "caa0f4137e1c0a72f4c651489402276c8e8e1cf081f3b0ba156d2cbeef09e86a" +dependencies = [ + "rand_core 0.10.1", +] + [[package]] name = "rand_xorshift" version = "0.4.0" @@ -3532,9 +3517,9 @@ dependencies = [ [[package]] name = "redb" -version = "2.6.3" +version = "4.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8eca1e9d98d5a7e9002d0013e18d5a9b000aee942eb134883a82f06ebffb6c01" +checksum = "8e925444704b5f17d32bf42f5b6e2df050bceebc3dcd6e71cc73dafe8092e839" dependencies = [ "libc", ] @@ -3548,15 +3533,6 @@ dependencies = [ "bitflags", ] -[[package]] -name = "redox_syscall" -version = "0.7.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f450ad9c3b1da563fb6948a8e0fb0fb9269711c9c73d9ea1de5058c79c8d643a" -dependencies = [ - "bitflags", -] - [[package]] name = "ref-cast" version = "1.0.25" @@ -3625,47 +3601,9 @@ dependencies = [ [[package]] name = "reqwest" -version = "0.12.28" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eddd3ca559203180a307f12d114c268abf583f59b03cb906fd0b3ff8646c1147" -dependencies = [ - "base64", - "bytes", - "futures-core", - "http", - "http-body", - "http-body-util", - "hyper", - "hyper-rustls", - "hyper-util", - "js-sys", - "log", - "percent-encoding", - "pin-project-lite", - "quinn", - "rustls", - "rustls-pki-types", - "serde", - "serde_json", - "serde_urlencoded", - "sync_wrapper", - "tokio", - "tokio-rustls", - "tower", - "tower-http", - "tower-service", - "url", - "wasm-bindgen", - "wasm-bindgen-futures", - "web-sys", - "webpki-roots", -] - -[[package]] -name = "reqwest" -version = "0.13.2" +version = "0.13.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab3f43e3283ab1488b624b44b0e988d0acea0b3214e694730a055cb6b2efa801" +checksum = "62e0021ea2c22aed41653bc7e1419abb2c97e038ff2c33d0e1309e49a97deec0" dependencies = [ "base64", "bytes", @@ -3684,6 +3622,8 @@ dependencies = [ "rustls", "rustls-pki-types", "rustls-platform-verifier", + "serde", + "serde_json", "sync_wrapper", "tokio", "tokio-rustls", @@ -3763,9 +3703,9 @@ dependencies = [ [[package]] name = "rustls" -version = "0.23.38" +version = "0.23.40" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "69f9466fb2c14ea04357e91413efb882e2a6d4a406e625449bc0a5d360d53a21" +checksum = "ef86cd5876211988985292b91c96a8f2d298df24e75989a43a3c73f2d4d8168b" dependencies = [ "log", "once_cell", @@ -3784,7 +3724,7 @@ checksum = "8bb47c2a50fdfdaf95b0ac8b12620fc327da1fd4adbb30d0c56d866b005873ff" dependencies = [ "rustls-cert-read", "rustls-pki-types", - "thiserror 2.0.18", + "thiserror", "tokio", ] @@ -3807,7 +3747,7 @@ dependencies = [ "reloadable-state", "rustls", "rustls-cert-read", - "thiserror 2.0.18", + "thiserror", ] [[package]] @@ -3824,9 +3764,9 @@ dependencies = [ [[package]] name = "rustls-pki-types" -version = "1.14.0" +version = "1.14.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be040f8b0a225e40375822a563fa9524378b9d63112f53e19ffff34df5d33fdd" +checksum = "30a7197ae7eb376e574fe940d068c30fe0462554a3ddbe4eca7838e049c937a9" dependencies = [ "web-time", "zeroize", @@ -3834,13 +3774,13 @@ dependencies = [ [[package]] name = "rustls-platform-verifier" -version = "0.6.2" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d99feebc72bae7ab76ba994bb5e121b8d83d910ca40b36e0921f53becc41784" +checksum = "26d1e2536ce4f35f4846aa13bff16bd0ff40157cdb14cc056c7b14ba41233ba0" dependencies = [ "core-foundation 0.10.1", "core-foundation-sys", - "jni 0.21.1", + "jni", "log", "once_cell", "rustls", @@ -3861,9 +3801,9 @@ checksum = "f87165f0995f63a9fbeea62b64d10b4d9d8e78ec6d7d51fb2125fda7bb36788f" [[package]] name = "rustls-webpki" -version = "0.103.12" +version = "0.103.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8279bb85272c9f10811ae6a6c547ff594d6a7f3c6c6b02ee9726d1d0dcfcdd06" +checksum = "61c429a8649f110dddef65e2a5ad240f747e85f7758a6bccc7e5777bd33f756e" dependencies = [ "ring", "rustls-pki-types", @@ -4073,14 +4013,24 @@ dependencies = [ "serde", ] +[[package]] +name = "serdect" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "66cf8fedced2fcf12406bcb34223dffb92eaf34908ede12fed414c82b7f00b3e" +dependencies = [ + "base16ct", + "serde", +] + [[package]] name = "sha1" -version = "0.11.0-rc.5" +version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b167252f3c126be0d8926639c4c4706950f01445900c4b3db0fd7e89fcb750a" +checksum = "aacc4cc499359472b4abe1bf11d0b12e688af9a805fa5e3016f9a386dc2d0214" dependencies = [ "cfg-if", - "cpufeatures 0.2.17", + "cpufeatures 0.3.0", "digest", ] @@ -4092,12 +4042,12 @@ checksum = "bbfa15b3dddfee50a0fff136974b3e1bde555604ba463834a7eb7deb6417705d" [[package]] name = "sha2" -version = "0.11.0-rc.5" +version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7c5f3b1e2dc8aad28310d8410bd4d7e180eca65fca176c52ab00d364475d0024" +checksum = "446ba717509524cb3f22f17ecc096f10f4822d76ab5c0b9822c5f9c284e825f4" dependencies = [ "cfg-if", - "cpufeatures 0.2.17", + "cpufeatures 0.3.0", "digest", ] @@ -4128,9 +4078,9 @@ dependencies = [ [[package]] name = "signature" -version = "3.0.0-rc.10" +version = "3.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f1880df446116126965eeec169136b2e0251dba37c6223bcc819569550edea3" +checksum = "28d567dcbaf0049cb8ac2608a76cd95ff9e4412e1899d389ee400918ca7537f5" [[package]] name = "simd_cesu8" @@ -4150,18 +4100,18 @@ checksum = "e3a9fe34e3e7a50316060351f37187a3f546bce95496156754b601a5fa71b76e" [[package]] name = "simple-dns" -version = "0.9.3" +version = "0.11.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dee851d0e5e7af3721faea1843e8015e820a234f81fda3dea9247e15bac9a86a" +checksum = "df350943049174c4ae8ced56c604e28270258faec12a6a48637a7655287c9ce0" dependencies = [ "bitflags", ] [[package]] name = "siphasher" -version = "1.0.2" +version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2aa850e253778c88a04c3d7323b043aeda9d3e30d5971937c1855769763678e" +checksum = "8ee5873ec9cce0195efcb7a4e9507a04cd49aec9c83d0389df45b1ef7ba2e649" [[package]] name = "slab" @@ -4347,16 +4297,16 @@ dependencies = [ [[package]] name = "sysinfo" -version = "0.26.9" +version = "0.38.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c18a6156d1f27a9592ee18c1a846ca8dd5c258b7179fc193ae87c74ebb666f5" +checksum = "92ab6a2f8bfe508deb3c6406578252e491d299cbbf3bc0529ecc3313aee4a52f" dependencies = [ - "cfg-if", - "core-foundation-sys", "libc", + "memchr", "ntapi", - "once_cell", - "winapi", + "objc2-core-foundation", + "objc2-io-kit", + "windows", ] [[package]] @@ -4414,14 +4364,15 @@ dependencies = [ [[package]] name = "testdir" -version = "0.8.1" +version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "480060a2e7e1d3c779d3dea588a81c0df78b6a6322b7ce25c0d2ec14a0d5d869" +checksum = "4d53c48916d4a8bb476f45e3699d9d904477dcd3569117d446f1b870d1e5a576" dependencies = [ "anyhow", "backtrace", + "cargo-platform", "cargo_metadata", - "once_cell", + "fslock", "sysinfo", "whoami", ] @@ -4432,33 +4383,13 @@ version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "614b328ff036a4ef882c61570f72918f7e9c5bee1da33f8e7f91e01daee7e56c" -[[package]] -name = "thiserror" -version = "1.0.69" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6aaf5339b578ea85b50e080feb250a3e8ae8cfcdff9a461c9ec2904bc923f52" -dependencies = [ - "thiserror-impl 1.0.69", -] - [[package]] name = "thiserror" version = "2.0.18" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4288b5bcbc7920c07a1149a35cf9590a2aa808e0bc1eafaade0b80947865fbc4" dependencies = [ - "thiserror-impl 2.0.18", -] - -[[package]] -name = "thiserror-impl" -version = "1.0.69" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.117", + "thiserror-impl", ] [[package]] @@ -4542,9 +4473,9 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.52.1" +version = "1.52.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b67dee974fe86fd92cc45b7a95fdd2f99a36a6d7b0d431a231178d3d670bbcc6" +checksum = "8fc7f01b389ac15039e4dc9531aa973a135d7a4135281b12d7c1bc79fd57fffe" dependencies = [ "bytes", "libc", @@ -4579,9 +4510,9 @@ dependencies = [ [[package]] name = "tokio-rustls-acme" -version = "0.9.0" +version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c31fcc374ec87d754358a5d0709ed1ab7671d51e0f70ddc3b17a11ac36604cfa" +checksum = "1af8573b15fdad8d66da116198cd8fd8d87ff62a67c1c6c3df7f62da1170793f" dependencies = [ "async-trait", "base64", @@ -4592,12 +4523,12 @@ dependencies = [ "pem", "proc-macro2", "rcgen", - "reqwest 0.12.28", + "reqwest", "ring", "rustls", "serde", "serde_json", - "thiserror 2.0.18", + "thiserror", "time", "tokio", "tokio-rustls", @@ -4723,20 +4654,20 @@ dependencies = [ [[package]] name = "tower-http" -version = "0.6.8" +version = "0.6.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d4e6559d53cc268e5031cd8429d05415bc4cb4aefc4aa5d6cc35fbf5b924a1f8" +checksum = "68d6fdd9f81c2819c9a8b0e0cd91660e7746a8e6ea2ba7c6b2b057985f6bcb51" dependencies = [ "bitflags", "bytes", "futures-util", "http", "http-body", - "iri-string", "pin-project-lite", "tower", "tower-layer", "tower-service", + "url", ] [[package]] @@ -4937,32 +4868,21 @@ dependencies = [ "anyhow", "derive_builder", "rustversion", - "vergen-lib 9.1.0", + "vergen-lib", ] [[package]] name = "vergen-gitcl" -version = "1.0.8" +version = "9.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9dfc1de6eb2e08a4ddf152f1b179529638bedc0ea95e6d667c014506377aefe" +checksum = "77ff3b5300a085d6bcd8fc96a507f706a28ae3814693236c9b409db71a1d15b9" dependencies = [ "anyhow", "derive_builder", "rustversion", "time", "vergen", - "vergen-lib 0.1.6", -] - -[[package]] -name = "vergen-lib" -version = "0.1.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b07e6010c0f3e59fcb164e0163834597da68d1f864e2b8ca49f74de01e9c166" -dependencies = [ - "anyhow", - "derive_builder", - "rustversion", + "vergen-lib", ] [[package]] @@ -5016,6 +4936,15 @@ version = "0.11.1+wasi-snapshot-preview1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ccf3ec651a847eb01de73ccad15eb7d99f80485de043efb2f370cd654f4ea44b" +[[package]] +name = "wasi" +version = "0.14.7+wasi-0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "883478de20367e224c0090af9cf5f9fa85bed63a95c1abf3afc5c083ebc06e8c" +dependencies = [ + "wasip2", +] + [[package]] name = "wasip2" version = "1.0.3+wasi-0.2.9" @@ -5036,15 +4965,18 @@ dependencies = [ [[package]] name = "wasite" -version = "0.1.0" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b8dad83b4f25e74f184f64c43b150b91efe7647395b42289f38e50566d82855b" +checksum = "66fe902b4a6b8028a753d5424909b764ccf79b7a209eac9bf97e59cda9f71a42" +dependencies = [ + "wasi 0.14.7+wasi-0.2.4", +] [[package]] name = "wasm-bindgen" -version = "0.2.118" +version = "0.2.121" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0bf938a0bacb0469e83c1e148908bd7d5a6010354cf4fb73279b7447422e3a89" +checksum = "49ace1d07c165b0864824eee619580c4689389afa9dc9ed3a4c75040d82e6790" dependencies = [ "cfg-if", "once_cell", @@ -5055,9 +4987,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-futures" -version = "0.4.68" +version = "0.4.71" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f371d383f2fb139252e0bfac3b81b265689bf45b6874af544ffa4c975ac1ebf8" +checksum = "96492d0d3ffba25305a7dc88720d250b1401d7edca02cc3bcd50633b424673b8" dependencies = [ "js-sys", "wasm-bindgen", @@ -5065,9 +4997,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.118" +version = "0.2.121" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eeff24f84126c0ec2db7a449f0c2ec963c6a49efe0698c4242929da037ca28ed" +checksum = "8e68e6f4afd367a562002c05637acb8578ff2dea1943df76afb9e83d177c8578" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -5075,9 +5007,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.118" +version = "0.2.121" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d08065faf983b2b80a79fd87d8254c409281cf7de75fc4b773019824196c904" +checksum = "d95a9ec35c64b2a7cb35d3fead40c4238d0940c86d107136999567a4703259f2" dependencies = [ "bumpalo", "proc-macro2", @@ -5088,9 +5020,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-shared" -version = "0.2.118" +version = "0.2.121" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5fd04d9e306f1907bd13c6361b5c6bfc7b3b3c095ed3f8a9246390f8dbdee129" +checksum = "c4e0100b01e9f0d03189a92b96772a1fb998639d981193d7dbab487302513441" dependencies = [ "unicode-ident", ] @@ -5144,9 +5076,9 @@ dependencies = [ [[package]] name = "web-sys" -version = "0.3.95" +version = "0.3.98" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4f2dfbb17949fa2088e5d39408c48368947b86f7834484e87b73de55bc14d97d" +checksum = "4b572dff8bcf38bad0fa19729c89bb5748b2b9b1d8be70cf90df697e3a8f32aa" dependencies = [ "js-sys", "wasm-bindgen", @@ -5183,11 +5115,13 @@ dependencies = [ [[package]] name = "whoami" -version = "1.6.1" +version = "2.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d4a4db5077702ca3015d3d02d74974948aba2ad9e12ab7df718ee64ccd7e97d" +checksum = "998767ef88740d1f5b0682a9c53c24431453923962269c2db68ee43788c5a40d" dependencies = [ + "libc", "libredox", + "objc2-system-configuration", "wasite", "web-sys", ] @@ -5341,31 +5275,13 @@ dependencies = [ "windows-link", ] -[[package]] -name = "windows-sys" -version = "0.45.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75283be5efb2831d37ea142365f009c02ec203cd29a3ebecbc093d52315b66d0" -dependencies = [ - "windows-targets 0.42.2", -] - [[package]] name = "windows-sys" version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" dependencies = [ - "windows-targets 0.52.6", -] - -[[package]] -name = "windows-sys" -version = "0.60.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f2f500e4d28234f72040990ec9d39e3a6b950f9f22d3dba18416c35882612bcb" -dependencies = [ - "windows-targets 0.53.5", + "windows-targets", ] [[package]] @@ -5377,52 +5293,20 @@ dependencies = [ "windows-link", ] -[[package]] -name = "windows-targets" -version = "0.42.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e5180c00cd44c9b1c88adb3693291f1cd93605ded80c250a75d472756b4d071" -dependencies = [ - "windows_aarch64_gnullvm 0.42.2", - "windows_aarch64_msvc 0.42.2", - "windows_i686_gnu 0.42.2", - "windows_i686_msvc 0.42.2", - "windows_x86_64_gnu 0.42.2", - "windows_x86_64_gnullvm 0.42.2", - "windows_x86_64_msvc 0.42.2", -] - [[package]] name = "windows-targets" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" dependencies = [ - "windows_aarch64_gnullvm 0.52.6", - "windows_aarch64_msvc 0.52.6", - "windows_i686_gnu 0.52.6", - "windows_i686_gnullvm 0.52.6", - "windows_i686_msvc 0.52.6", - "windows_x86_64_gnu 0.52.6", - "windows_x86_64_gnullvm 0.52.6", - "windows_x86_64_msvc 0.52.6", -] - -[[package]] -name = "windows-targets" -version = "0.53.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4945f9f551b88e0d65f3db0bc25c33b8acea4d9e41163edf90dcd0b19f9069f3" -dependencies = [ - "windows-link", - "windows_aarch64_gnullvm 0.53.1", - "windows_aarch64_msvc 0.53.1", - "windows_i686_gnu 0.53.1", - "windows_i686_gnullvm 0.53.1", - "windows_i686_msvc 0.53.1", - "windows_x86_64_gnu 0.53.1", - "windows_x86_64_gnullvm 0.53.1", - "windows_x86_64_msvc 0.53.1", + "windows_aarch64_gnullvm", + "windows_aarch64_msvc", + "windows_i686_gnu", + "windows_i686_gnullvm", + "windows_i686_msvc", + "windows_x86_64_gnu", + "windows_x86_64_gnullvm", + "windows_x86_64_msvc", ] [[package]] @@ -5434,149 +5318,59 @@ dependencies = [ "windows-link", ] -[[package]] -name = "windows_aarch64_gnullvm" -version = "0.42.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "597a5118570b68bc08d8d59125332c54f1ba9d9adeedeef5b99b02ba2b0698f8" - [[package]] name = "windows_aarch64_gnullvm" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" -[[package]] -name = "windows_aarch64_gnullvm" -version = "0.53.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a9d8416fa8b42f5c947f8482c43e7d89e73a173cead56d044f6a56104a6d1b53" - -[[package]] -name = "windows_aarch64_msvc" -version = "0.42.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e08e8864a60f06ef0d0ff4ba04124db8b0fb3be5776a5cd47641e942e58c4d43" - [[package]] name = "windows_aarch64_msvc" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" -[[package]] -name = "windows_aarch64_msvc" -version = "0.53.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9d782e804c2f632e395708e99a94275910eb9100b2114651e04744e9b125006" - -[[package]] -name = "windows_i686_gnu" -version = "0.42.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c61d927d8da41da96a81f029489353e68739737d3beca43145c8afec9a31a84f" - [[package]] name = "windows_i686_gnu" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" -[[package]] -name = "windows_i686_gnu" -version = "0.53.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "960e6da069d81e09becb0ca57a65220ddff016ff2d6af6a223cf372a506593a3" - [[package]] name = "windows_i686_gnullvm" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" -[[package]] -name = "windows_i686_gnullvm" -version = "0.53.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa7359d10048f68ab8b09fa71c3daccfb0e9b559aed648a8f95469c27057180c" - -[[package]] -name = "windows_i686_msvc" -version = "0.42.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44d840b6ec649f480a41c8d80f9c65108b92d89345dd94027bfe06ac444d1060" - [[package]] name = "windows_i686_msvc" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" -[[package]] -name = "windows_i686_msvc" -version = "0.53.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e7ac75179f18232fe9c285163565a57ef8d3c89254a30685b57d83a38d326c2" - -[[package]] -name = "windows_x86_64_gnu" -version = "0.42.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8de912b8b8feb55c064867cf047dda097f92d51efad5b491dfb98f6bbb70cb36" - [[package]] name = "windows_x86_64_gnu" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" -[[package]] -name = "windows_x86_64_gnu" -version = "0.53.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c3842cdd74a865a8066ab39c8a7a473c0778a3f29370b5fd6b4b9aa7df4a499" - -[[package]] -name = "windows_x86_64_gnullvm" -version = "0.42.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26d41b46a36d453748aedef1486d5c7a85db22e56aff34643984ea85514e94a3" - [[package]] name = "windows_x86_64_gnullvm" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" -[[package]] -name = "windows_x86_64_gnullvm" -version = "0.53.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ffa179e2d07eee8ad8f57493436566c7cc30ac536a3379fdf008f47f6bb7ae1" - -[[package]] -name = "windows_x86_64_msvc" -version = "0.42.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9aec5da331524158c6d1a4ac0ab1541149c0b9505fde06423b02f5ef0106b9f0" - [[package]] name = "windows_x86_64_msvc" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" -[[package]] -name = "windows_x86_64_msvc" -version = "0.53.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d6bbff5f0aada427a1e5a6da5f1f98158182f26556f345ac9e04d36d0ebed650" - [[package]] name = "winnow" -version = "1.0.1" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09dac053f1cd375980747450bfc7250c264eaae0583872e845c0c7cd578872b5" +checksum = "2ee1708bef14716a11bae175f579062d4554d95be2c6829f518df847b7b3fdd0" dependencies = [ "memchr", ] @@ -5685,7 +5479,7 @@ dependencies = [ "futures", "log", "serde", - "thiserror 2.0.18", + "thiserror", "windows", "windows-core", ] @@ -5709,7 +5503,7 @@ dependencies = [ "pharos", "rustc_version", "send_wrapper", - "thiserror 2.0.18", + "thiserror", "wasm-bindgen", "wasm-bindgen-futures", "web-sys", @@ -5729,7 +5523,7 @@ dependencies = [ "oid-registry", "ring", "rusticata-macros", - "thiserror 2.0.18", + "thiserror", "time", ] diff --git a/Cargo.toml b/Cargo.toml index f5657192..1e7cd284 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -9,7 +9,7 @@ authors = ["n0 team"] repository = "https://github.com/n0-computer/iroh-docs" # Sadly this also needs to be updated in .github/workflows/ci.yml -rust-version = "1.89" +rust-version = "1.91" [dependencies] anyhow = "1" @@ -26,18 +26,16 @@ derive_more = { version = "2.0.1", features = [ "into", "as_ref", ] } -ed25519-dalek = { version = "=3.0.0-pre.6", features = ["serde", "rand_core"] } +ed25519-dalek = { version = "=3.0.0-pre.7", features = ["serde", "rand_core"] } futures-buffered = "0.2.4" -futures-lite = "2.3.0" -futures-util = { version = "0.3.25" } hex = "0.4" -iroh = { version = "0.98", default-features = false } -iroh-tickets = { version = "0.5" } -iroh-blobs = { version = "0.100", default-features = false } -iroh-gossip = { version = "0.98", features = ["net"], default-features = false } -iroh-metrics = { version = "0.38", default-features = false } -irpc = { version = "0.14", default-features = false } -n0-error = "0.1.0" +iroh = { version = "=1.0.0-rc.0", default-features = false } +iroh-tickets = { version = "=1.0.0-rc.0" } +iroh-blobs = { version = "0.101", default-features = false } +iroh-gossip = { version = "0.99.0", features = ["net"], default-features = false } +iroh-metrics = { version = "=1.0.0-rc.0", default-features = false } +irpc = { version = "0.15", default-features = false } +n0-error = "=1.0.0-rc.0" n0-future = { version = "0.3.1", features = ["serde"] } num_enum = "0.7" postcard = { version = "1", default-features = false, features = [ @@ -45,9 +43,9 @@ postcard = { version = "1", default-features = false, features = [ "use-std", "experimental-derive", ] } -noq = { version = "0.18", optional = true } +noq = { version = "=1.0.0-rc.0", optional = true } rand = "0.10" -redb = { version = "2.6.3" } +redb = { version = "4.1" } self_cell = "1.0.3" serde = { version = "1.0.164", features = ["derive"] } serde-error = "0.1.3" @@ -61,14 +59,14 @@ tracing = "0.1" [dev-dependencies] data-encoding = "2.6.0" -iroh = { version = "0.98", features = ["test-utils"] } +iroh = { version = "=1.0.0-rc.0", features = ["test-utils"] } nested_enum_utils = "0.2" parking_lot = "0.12.3" proptest = "1.2.0" rand = { version = "0.10", features = ["chacha"] } tempfile = "3.4" test-strategy = "0.4" -testdir = "0.8" +testdir = "0.10" testresult = "0.4.1" tokio = { version = "1", features = ["sync", "macros"] } tracing-test = "0.2.5" diff --git a/LICENSE-APACHE b/LICENSE-APACHE index e2db9284..08b8485c 100644 --- a/LICENSE-APACHE +++ b/LICENSE-APACHE @@ -186,7 +186,7 @@ APPENDIX: How to apply the Apache License to your work. same "printed page" as the copyright notice for easier identification within third-party archives. -Copyright [2023] [N0, INC] +Copyright [2026] [N0, INC] Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/LICENSE-MIT b/LICENSE-MIT index 2d5f18dd..d38997d3 100644 --- a/LICENSE-MIT +++ b/LICENSE-MIT @@ -1,4 +1,4 @@ -Copyright 2023 N0, INC. +Copyright 2026 N0, INC. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated diff --git a/README.md b/README.md index 90088d20..c02ac46d 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,13 @@ # iroh-docs +[![Documentation](https://img.shields.io/badge/docs-latest-blue.svg?style=flat-square)](https://docs.rs/iroh-docs/) +[![Crates.io](https://img.shields.io/crates/v/iroh-docs.svg?style=flat-square)](https://crates.io/crates/iroh-docs) +[![downloads](https://img.shields.io/crates/d/iroh-docs.svg?style=flat-square)](https://crates.io/crates/iroh-docs) +[![Chat](https://img.shields.io/discord/1161119546170687619?logo=discord&style=flat-square)](https://discord.com/invite/DpmJgtU7cW) +[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg?style=flat-square)](LICENSE-MIT) +[![License: Apache 2.0](https://img.shields.io/badge/License-Apache%202.0-blue.svg?style=flat-square)](LICENSE-APACHE) +[![CI](https://img.shields.io/github/actions/workflow/status/n0-computer/iroh-docs/ci.yaml?branch=main&style=flat-square&label=CI)](https://github.com/n0-computer/iroh-docs/actions/workflows/ci.yaml) + Multi-dimensional key-value documents with an efficient synchronization protocol. The crate operates on *Replicas*. A replica contains an unlimited number of @@ -83,6 +91,8 @@ async fn main() -> anyhow::Result<()> { # License +Copyright 2026 N0, INC. + This project is licensed under either of * Apache License, Version 2.0, ([LICENSE-APACHE](LICENSE-APACHE) or diff --git a/src/actor.rs b/src/actor.rs index 40829225..a004b067 100644 --- a/src/actor.rs +++ b/src/actor.rs @@ -8,10 +8,9 @@ use std::{ use anyhow::{anyhow, Context, Result}; use bytes::Bytes; -use futures_util::FutureExt; use iroh_blobs::Hash; use irpc::channel::mpsc; -use n0_future::{task::JoinSet, time::Duration}; +use n0_future::{task::JoinSet, time::Duration, TryFutureExt}; use serde::{Deserialize, Serialize}; use tokio::sync::oneshot; #[cfg(wasm_browser)] @@ -750,8 +749,9 @@ impl Actor { .store .list_authors() .map(|a| a.map(|a| a.map(|a| AuthorListResponse { author_id: a.id() }))); - self.tasks - .spawn_local(iter_to_irpc(reply, iter).map(|_| ())); + self.tasks.spawn_local(async move { + iter_to_irpc(reply, iter).await.ok(); + }); Ok(()) } Action::ListReplicas { reply } => { @@ -759,8 +759,9 @@ impl Actor { let iter = iter.map(|inner| { inner.map(|res| res.map(|(id, capability)| ListResponse { id, capability })) }); - self.tasks - .spawn_local(iter_to_irpc(reply, iter).map(|_| ())); + self.tasks.spawn_local(async move { + iter_to_irpc(reply, iter).await.ok(); + }); Ok(()) } Action::ContentHashes { reply } => { @@ -903,7 +904,7 @@ impl Actor { .ensure_open(&namespace) .and_then(|_| self.store.get_many(namespace, query)); self.tasks - .spawn_local(iter_to_irpc(reply, iter).map(|_| ())); + .spawn_local(iter_to_irpc(reply, iter).map_ok_or_else(|_| (), |_| ())); Ok(()) } ReplicaAction::DropReplica { reply } => send_reply_with(reply, self, |this| { diff --git a/src/api.rs b/src/api.rs index a2598a3e..fa505959 100644 --- a/src/api.rs +++ b/src/api.rs @@ -416,7 +416,7 @@ impl Doc { self.ensure_open()?; let stream = self.get_many(query).await?; tokio::pin!(stream); - futures_lite::StreamExt::next(&mut stream).await.transpose() + n0_future::StreamExt::next(&mut stream).await.transpose() } /// Shares this document with peers over a ticket. diff --git a/src/api/actor.rs b/src/api/actor.rs index 9d365c10..acaadf80 100644 --- a/src/api/actor.rs +++ b/src/api/actor.rs @@ -1,9 +1,8 @@ use std::sync::Arc; use anyhow::anyhow; -use futures_lite::StreamExt; use irpc::{channel::mpsc, LocalSender, WithChannels}; -use n0_future::task::{self}; +use n0_future::{task, StreamExt}; use tokio::sync::mpsc as tokio_mpsc; use tracing::error; diff --git a/src/engine.rs b/src/engine.rs index 3272322e..88013f16 100644 --- a/src/engine.rs +++ b/src/engine.rs @@ -5,7 +5,6 @@ use std::sync::{Arc, RwLock}; use anyhow::{bail, Result}; -use futures_lite::{Stream, StreamExt}; use iroh::{Endpoint, EndpointAddr, PublicKey}; use iroh_blobs::{ api::{blobs::BlobStatus, downloader::Downloader, Store}, @@ -13,7 +12,7 @@ use iroh_blobs::{ Hash, }; use iroh_gossip::net::Gossip; -use n0_future::task::AbortOnDropHandle; +use n0_future::{task::AbortOnDropHandle, Stream, StreamExt}; use serde::{Deserialize, Serialize}; use tokio::sync::{mpsc, oneshot}; use tracing::{debug, error, error_span, Instrument}; diff --git a/src/engine/gossip.rs b/src/engine/gossip.rs index bfaf0324..ccd35f54 100644 --- a/src/engine/gossip.rs +++ b/src/engine/gossip.rs @@ -2,14 +2,15 @@ use std::collections::{hash_map, HashMap}; use anyhow::{Context, Result}; use bytes::Bytes; -use futures_lite::StreamExt; -use futures_util::FutureExt; use iroh::EndpointId; use iroh_gossip::{ api::{Event, GossipReceiver, GossipSender, JoinOptions}, net::Gossip, }; -use n0_future::task::{AbortHandle, JoinSet}; +use n0_future::{ + task::{AbortHandle, JoinSet}, + StreamExt, +}; use tokio::sync::mpsc; use tracing::{debug, instrument, warn}; @@ -56,15 +57,13 @@ impl GossipState { .await?; let (sender, stream) = sub.split(); - let abort_handle = self.active_tasks.spawn( - receive_loop( - namespace, - stream, - self.to_live_actor.clone(), - self.sync.clone(), - ) - .map(move |res| (namespace, res)), - ); + let to_live_actor = self.to_live_actor.clone(); + let sync = self.sync.clone(); + let abort_handle = self.active_tasks.spawn(async move { + let res = receive_loop(namespace, stream, to_live_actor, sync).await; + + (namespace, res) + }); entry.insert(ActiveState { sender, abort_handle, diff --git a/src/engine/live.rs b/src/engine/live.rs index 77936705..7fe587fc 100644 --- a/src/engine/live.rs +++ b/src/engine/live.rs @@ -6,7 +6,6 @@ use std::{ }; use anyhow::{Context, Result}; -use futures_lite::FutureExt; use iroh::{address_lookup::memory::MemoryLookup, Endpoint, EndpointAddr, EndpointId, PublicKey}; use iroh_blobs::{ api::{ @@ -17,7 +16,7 @@ use iroh_blobs::{ Hash, HashAndFormat, }; use iroh_gossip::net::Gossip; -use n0_future::{task::JoinSet, time::SystemTime}; +use n0_future::{task::JoinSet, time::SystemTime, FutureExt}; use serde::{Deserialize, Serialize}; use tokio::sync::{self, mpsc, oneshot}; use tracing::{debug, error, info, instrument, trace, warn, Instrument, Span}; diff --git a/src/net/codec.rs b/src/net/codec.rs index 15f8c769..e0e2ad17 100644 --- a/src/net/codec.rs +++ b/src/net/codec.rs @@ -2,8 +2,8 @@ use std::future::Future; use anyhow::{anyhow, ensure}; use bytes::{Buf, BufMut, BytesMut}; -use futures_util::SinkExt; use iroh::PublicKey; +use n0_future::SinkExt; use serde::{Deserialize, Serialize}; use tokio::io::{AsyncRead, AsyncWrite}; use tokio_stream::StreamExt; diff --git a/src/store/fs.rs b/src/store/fs.rs index e05223df..46485d2e 100644 --- a/src/store/fs.rs +++ b/src/store/fs.rs @@ -13,7 +13,7 @@ use ed25519_dalek::{SignatureError, VerifyingKey}; use iroh_blobs::Hash; use n0_future::time::SystemTime; use rand::CryptoRng; -use redb::{Database, ReadableMultimapTable, ReadableTable}; +use redb::{Database, ReadableDatabase, ReadableMultimapTable, ReadableTable}; use tracing::warn; use super::{ @@ -100,18 +100,15 @@ impl Store { /// The file will be created if it does not exist, otherwise it will be opened. #[cfg(feature = "fs-store")] pub fn persistent(path: impl AsRef) -> Result { - let mut db = match Database::create(&path) { + let db = match Database::create(&path) { Ok(db) => db, - Err(redb::DatabaseError::UpgradeRequired(1)) => return Err( - anyhow!("Opening the database failed: Upgrading from old format is no longer supported. Use iroh-docs 0.92 to perform the upgrade, then upgrade to the latest release again.") - ), + Err(redb::DatabaseError::UpgradeRequired(v)) => { + return Err(anyhow!( + "Opening the database failed: Upgrading from redb {v} longer supported. Use and older redb version first." + )); + } Err(err) => return Err(err.into()), }; - match db.upgrade() { - Ok(true) => tracing::info!("Database was upgraded to redb v3 compatible format"), - Ok(false) => {} - Err(err) => warn!("Database upgrade to redb v3 compatible format failed: {err:#}"), - } Self::new_impl(db) } diff --git a/src/ticket.rs b/src/ticket.rs index 95f8ad0a..5da0d39b 100644 --- a/src/ticket.rs +++ b/src/ticket.rs @@ -8,7 +8,7 @@ use crate::Capability; /// Contains both a key (either secret or public) to a document, and a list of peers to join. #[derive(Serialize, Deserialize, Clone, Debug, derive_more::Display)] -#[display("{}", Ticket::serialize(self))] +#[display("{}", Ticket::encode_string(self))] pub struct DocTicket { /// either a public or private key pub capability: Capability, @@ -29,12 +29,12 @@ enum TicketWireFormat { impl Ticket for DocTicket { const KIND: &'static str = "doc"; - fn to_bytes(&self) -> Vec { + fn encode_bytes(&self) -> Vec { let data = TicketWireFormat::Variant0(self.clone()); postcard::to_stdvec(&data).expect("postcard serialization failed") } - fn from_bytes(bytes: &[u8]) -> Result { + fn decode_bytes(bytes: &[u8]) -> Result { let res: TicketWireFormat = postcard::from_bytes(bytes)?; let TicketWireFormat::Variant0(res) = res; if res.nodes.is_empty() { @@ -59,7 +59,7 @@ impl DocTicket { impl std::str::FromStr for DocTicket { type Err = ParseError; fn from_str(s: &str) -> Result { - Ticket::deserialize(s) + Ticket::decode_string(s) } } diff --git a/tests/gc.rs b/tests/gc.rs index c9c2c583..9c8b8dae 100644 --- a/tests/gc.rs +++ b/tests/gc.rs @@ -4,9 +4,8 @@ use std::path::PathBuf; use anyhow::Result; use bytes::Bytes; -use futures_lite::StreamExt; use iroh_blobs::api::blobs::ImportMode; -use n0_future::time::Duration; +use n0_future::{time::Duration, StreamExt}; use rand::Rng; use testdir::testdir; use util::Node; diff --git a/tests/sync.rs b/tests/sync.rs index 846e544c..6a096c78 100644 --- a/tests/sync.rs +++ b/tests/sync.rs @@ -2,8 +2,6 @@ use std::{collections::HashMap, future::Future, sync::Arc}; use anyhow::{anyhow, bail, Context, Result}; use bytes::Bytes; -use futures_lite::Stream; -use futures_util::{FutureExt, StreamExt, TryStreamExt}; use iroh::{endpoint::presets, Endpoint, PublicKey, SecretKey}; use iroh_blobs::Hash; use iroh_docs::{ @@ -15,7 +13,10 @@ use iroh_docs::{ store::{DownloadPolicy, FilterKind, Query}, AuthorId, ContentStatus, Entry, }; -use n0_future::time::{Duration, Instant}; +use n0_future::{ + time::{Duration, Instant}, + Stream, TryStreamExt, +}; use rand::{CryptoRng, RngExt, SeedableRng}; #[cfg(feature = "fs-store")] use tempfile::tempdir; @@ -142,9 +143,9 @@ async fn sync_subscribe_no_sync() -> Result<()> { let mut sub = doc.subscribe().await?; let author = client.docs().author_create().await?; doc.set_bytes(author, b"k".to_vec(), b"v".to_vec()).await?; - let event = n0_future::time::timeout(Duration::from_millis(100), sub.next()).await?; + let event = n0_future::time::timeout(Duration::from_millis(100), sub.try_next()).await?; assert!( - matches!(event, Some(Ok(LiveEvent::InsertLocal { .. }))), + matches!(event, Ok(Some(LiveEvent::InsertLocal { .. }))), "expected InsertLocal but got {event:?}" ); node.shutdown().await?; @@ -192,8 +193,8 @@ async fn sync_gossip_bulk() -> Result<()> { let mut count = 0; doc0.start_sync(vec![]).await?; doc1.start_sync(peers).await?; - while let Some(event) = events.next().await { - let event = event?; + while let Ok(event) = events.try_next().await { + let event = event.unwrap(); if matches!(event, LiveEvent::InsertRemote { .. }) { count += 1; } @@ -222,8 +223,8 @@ async fn sync_gossip_bulk() -> Result<()> { elapsed / n_entries as u32 ); - while let Some(event) = events.next().await { - let event = event?; + while let Ok(event) = events.try_next().await { + let event = event.unwrap(); if matches!(event, LiveEvent::InsertRemote { .. }) { count += 1; } @@ -805,7 +806,7 @@ async fn test_download_policies() -> Result<()> { let mut synced_b = 0usize; loop { tokio::select! { - Some(Ok(ev)) = events_a.next() => { + Ok(Some(ev)) = events_a.try_next() => { match ev { InsertRemote { content_status, entry, .. } => { synced_a += 1; @@ -819,7 +820,7 @@ async fn test_download_policies() -> Result<()> { _ => {} } } - Some(Ok(ev)) = events_b.next() => { + Ok(Some(ev)) = events_b.try_next() => { match ev { InsertRemote { content_status, entry, .. } => { synced_b += 1; @@ -969,7 +970,10 @@ async fn sync_big() -> Result<()> { } } .instrument(error_span!("sync-test", %me)); - let fut = fut.map(move |r| r.with_context(move || format!("node {i} ({me})"))); + let fut = async move { + let r = fut.await; + r.with_context(move || format!("node {i} ({me})")) + }; tasks.spawn(fut); } @@ -1024,8 +1028,7 @@ async fn test_list_docs_stream() -> testresult::TestResult<()> { /// Get all entries of a document. async fn get_all(doc: &Doc) -> anyhow::Result> { let entries = doc.get_many(Query::all()).await?; - let entries = entries.collect::>().await; - entries.into_iter().collect() + entries.try_collect::>().await } /// Get all entries of a document with the blob content. @@ -1039,9 +1042,7 @@ async fn get_all_with_content( let content = blobs.get_bytes(hash).await.map_err(anyhow::Error::from); content.map(|c| (entry, c)) }); - let entries = entries.collect::>().await; - let entries = entries.into_iter().collect::>>()?; - Ok(entries) + entries.try_collect::>().await } async fn publish( @@ -1206,8 +1207,8 @@ async fn sync_drop_doc() -> Result<()> { let mut sub = doc.subscribe().await?; doc.set_bytes(author, b"foo".to_vec(), b"bar".to_vec()) .await?; - let ev = sub.next().await; - assert!(matches!(ev, Some(Ok(LiveEvent::InsertLocal { .. })))); + let ev = sub.try_next().await; + assert!(matches!(ev, Ok(Some(LiveEvent::InsertLocal { .. })))); client.docs().drop_doc(doc.id()).await?; let res = doc.get_exact(author, b"foo".to_vec(), true).await; @@ -1218,7 +1219,7 @@ async fn sync_drop_doc() -> Result<()> { assert!(res.is_err()); let res = client.docs().open(doc.id()).await; assert!(res.is_err()); - let ev = sub.next().await; + let ev = sub.try_next().await?; assert!(ev.is_none()); Ok(()) @@ -1238,16 +1239,16 @@ async fn get_latest( let stream = doc.get_many(query).await?; tokio::pin!(stream); let entry = stream - .next() - .await - .ok_or_else(|| anyhow!("entry not found"))??; + .try_next() + .await? + .ok_or_else(|| anyhow!("entry not found"))?; let content = blobs.get_bytes(entry.content_hash()).await?; Ok(content.to_vec()) } async fn next(mut stream: impl Stream> + Unpin) -> T { let event = stream - .next() + .try_next() .await .expect("stream ended") .expect("stream produced error"); @@ -1280,7 +1281,7 @@ async fn assert_next( let mut items = vec![]; for (i, f) in matchers.iter().enumerate() { let item = stream - .next() + .try_next() .await .expect("event stream ended prematurely") .expect("event stream errored"); @@ -1334,7 +1335,7 @@ async fn assert_next_unordered_with_optionals( // that the mutable borrow terminates when the future completes let events = Arc::new(parking_lot::Mutex::new(vec![])); let fut = async { - while let Some(event) = stream.next().await { + while let Ok(event) = stream.try_next().await { let event = event.context("failed to read from stream")?; let len = { let mut events = events.lock();