diff --git a/Cargo.lock b/Cargo.lock index 5f1e6623..264b31fb 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -195,11 +195,12 @@ checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0" [[package]] name = "attohttpc" -version = "0.24.1" +version = "0.30.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8d9a9bf8b79a749ee0b911b91b671cc2b6c670bdbc7e3dfd537576ddc94bb2a2" +checksum = "16e2cdb6d5ed835199484bb92bb8b3edd526effe995c61732580439c1a67e2e9" dependencies = [ - "http 0.2.12", + "base64", + "http", "log", "url", ] @@ -275,9 +276,9 @@ checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" [[package]] name = "base64ct" -version = "1.7.3" +version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89e25b6adfb930f02d1981565a6e5d9c547ac15a96606256d3b59040e5cd4ca3" +checksum = "55248b47b0caf0546f7988906588779981c43bb1bc9d0c44087278f80cdb44ba" [[package]] name = "binary-merge" @@ -300,12 +301,6 @@ version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5e764a1d40d510daf35e07be9eb06e75770908c27d411ee6c92109c9840eaaf7" -[[package]] -name = "bitflags" -version = "1.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" - [[package]] name = "bitflags" version = "2.9.1" @@ -369,9 +364,9 @@ dependencies = [ [[package]] name = "cc" -version = "1.2.27" +version = "1.2.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d487aa071b5f64da6f19a3e848e3578944b726ee5a4854b82172f02aa876bfdc" +checksum = "deec109607ca693028562ed836a5f1c4b8bd77755c4e132fc5ce11b0b6211ae7" dependencies = [ "shlex", ] @@ -433,9 +428,9 @@ dependencies = [ [[package]] name = "clap" -version = "4.5.40" +version = "4.5.41" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "40b6887a1d8685cebccf115538db5c0efe625ccac9696ad45c409d96566e910f" +checksum = "be92d32e80243a54711e5d7ce823c35c41c9d929dc4ab58e1276f625841aadf9" dependencies = [ "clap_builder", "clap_derive", @@ -443,9 +438,9 @@ dependencies = [ [[package]] name = "clap_builder" -version = "4.5.40" +version = "4.5.41" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e0c66c08ce9f0c698cbce5c0279d0bb6ac936d8674174fe48f736533b964f59e" +checksum = "707eab41e9622f9139419d573eca0900137718000c517d47da73045f54331c3d" dependencies = [ "anstream", "anstyle", @@ -455,9 +450,9 @@ dependencies = [ [[package]] name = "clap_derive" -version = "4.5.40" +version = "4.5.41" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2c7947ae4cc3d851207c1adb5b5e260ff0cca11446b1d6d1423788e442257ce" +checksum = "ef4f52386a59ca4c860f7393bcf8abd8dfd91ecccc0f774635ff68e92eeef491" dependencies = [ "heck", "proc-macro2", @@ -719,6 +714,18 @@ dependencies = [ "powerfmt", ] +[[package]] +name = "derive-ex" +version = "0.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bba95f299f6b9cd47f68a847eca2ae9060a2713af532dc35c342065544845407" +dependencies = [ + "proc-macro2", + "quote", + "structmeta", + "syn 2.0.104", +] + [[package]] name = "derive_more" version = "1.0.0" @@ -811,9 +818,9 @@ dependencies = [ [[package]] name = "dyn-clone" -version = "1.0.19" +version = "1.0.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1c7a8fb8a9fbf66c1f703fe16184d10ca0ee9d23be5b4436400408ba54a95005" +checksum = "d0881ea181b1df73ff77ffaaf9c7544ecc11e82fba9b5f27b262a3c73a332555" [[package]] name = "ed25519" @@ -828,9 +835,9 @@ dependencies = [ [[package]] name = "ed25519-dalek" -version = "2.1.1" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4a3daa8e81a3963a60642bcc1f90a670680bd4a77535faa384e9d1c79d620871" +checksum = "70e796c081cee67dc755e1a36a0a172b897fab85fc3f6bc48307991f64e4eca9" dependencies = [ "curve25519-dalek", "ed25519", @@ -957,15 +964,15 @@ dependencies = [ [[package]] name = "futures-buffered" -version = "0.2.11" +version = "0.2.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fe940397c8b744b9c2c974791c2c08bca2c3242ce0290393249e98f215a00472" +checksum = "a8e0e1f38ec07ba4abbde21eed377082f17ccb988be9d988a5adbf4bafc118fd" dependencies = [ "cordyceps", "diatomic-waker", "futures-core", "pin-project-lite", - "spin", + "spin 0.10.0", ] [[package]] @@ -1097,7 +1104,7 @@ dependencies = [ "libc", "log", "rustversion", - "windows 0.61.3", + "windows", ] [[package]] @@ -1164,16 +1171,16 @@ dependencies = [ [[package]] name = "h2" -version = "0.4.10" +version = "0.4.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a9421a676d1b147b16b82c9225157dc629087ef8ec4d5e2960f9437a90dac0a5" +checksum = "17da50a276f1e01e0ba6c029e47b7100754904ee8a278f886546e98575380785" dependencies = [ "atomic-waker", "bytes", "fnv", "futures-core", "futures-sink", - "http 1.3.1", + "http", "indexmap", "slab", "tokio", @@ -1211,7 +1218,7 @@ dependencies = [ "hash32", "rustc_version", "serde", - "spin", + "spin 0.9.8", "stable_deref_trait", ] @@ -1243,7 +1250,7 @@ dependencies = [ "idna", "ipnet", "once_cell", - "rand 0.9.1", + "rand 0.9.2", "ring", "thiserror 2.0.12", "tinyvec", @@ -1265,7 +1272,7 @@ dependencies = [ "moka", "once_cell", "parking_lot", - "rand 0.9.1", + "rand 0.9.2", "resolv-conf", "smallvec", "thiserror 2.0.12", @@ -1304,17 +1311,6 @@ version = "1.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f558a64ac9af88b5ba400d99b579451af0d39c6d360980045b91aac966d705e2" -[[package]] -name = "http" -version = "0.2.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "601cbb57e577e2f5ef5be8e7b83f0f63994f25aa94d673e54a92d5c516d101f1" -dependencies = [ - "bytes", - "fnv", - "itoa", -] - [[package]] name = "http" version = "1.3.1" @@ -1333,7 +1329,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1efedce1fb8e6913f23e0c92de8e62cd5b772a67e7b3946df930a62566c93184" dependencies = [ "bytes", - "http 1.3.1", + "http", ] [[package]] @@ -1344,7 +1340,7 @@ checksum = "b021d93e26becf5dc7e1b75b1bed1fd93124b374ceb73f43d4d4eafec896a64a" dependencies = [ "bytes", "futures-core", - "http 1.3.1", + "http", "http-body", "pin-project-lite", ] @@ -1371,7 +1367,7 @@ dependencies = [ "futures-channel", "futures-util", "h2", - "http 1.3.1", + "http", "http-body", "httparse", "httpdate", @@ -1388,7 +1384,7 @@ version = "0.27.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e3c93eb611681b207e1fe55d5a71ecf91572ec8a6705cdb6857f7d8d5242cf58" dependencies = [ - "http 1.3.1", + "http", "hyper", "hyper-util", "rustls", @@ -1396,28 +1392,28 @@ dependencies = [ "tokio", "tokio-rustls", "tower-service", - "webpki-roots 1.0.1", + "webpki-roots 1.0.2", ] [[package]] name = "hyper-util" -version = "0.1.14" +version = "0.1.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc2fdfdbff08affe55bb779f33b053aa1fe5dd5b54c257343c17edfa55711bdb" +checksum = "8d9b05277c7e8da2c93a568989bb6207bef0112e8d17df7a6eda4a3cf143bc5e" dependencies = [ "base64", "bytes", "futures-channel", "futures-core", "futures-util", - "http 1.3.1", + "http", "http-body", "hyper", "ipnet", "libc", "percent-encoding", "pin-project-lite", - "socket2", + "socket2 0.6.0", "tokio", "tower-service", "tracing", @@ -1435,7 +1431,7 @@ dependencies = [ "js-sys", "log", "wasm-bindgen", - "windows-core 0.61.2", + "windows-core", ] [[package]] @@ -1556,20 +1552,20 @@ dependencies = [ [[package]] name = "igd-next" -version = "0.16.1" +version = "0.16.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d06464e726471718db9ad3fefc020529fabcde03313a0fc3967510e2db5add12" +checksum = "516893339c97f6011282d5825ac94fc1c7aad5cad26bdc2d0cee068c0bf97f97" dependencies = [ "async-trait", "attohttpc", "bytes", "futures", - "http 1.3.1", + "http", "http-body-util", "hyper", "hyper-util", "log", - "rand 0.9.1", + "rand 0.9.2", "tokio", "url", "xmltree", @@ -1577,9 +1573,9 @@ dependencies = [ [[package]] name = "indexmap" -version = "2.9.0" +version = "2.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cea70ddb795996207ad57735b50c5982d8844f38ba9ee5f1aedcfb708a2aa11e" +checksum = "fe4cd85333e22411419a0bcae1297d25e58c9443848b11dc6a86fefe8c78a661" dependencies = [ "equivalent", "hashbrown", @@ -1615,13 +1611,24 @@ dependencies = [ "web-sys", ] +[[package]] +name = "io-uring" +version = "0.7.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d93587f37623a1a17d94ef2bc9ada592f5465fe7732084ab7beefabe5c77c0c4" +dependencies = [ + "bitflags", + "cfg-if", + "libc", +] + [[package]] name = "ipconfig" version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b58db92f96b720de98181bbbe63c831e87005ab460c1bf306eb2622b4707997f" dependencies = [ - "socket2", + "socket2 0.5.10", "widestring", "windows-sys 0.48.0", "winreg", @@ -1646,7 +1653,7 @@ dependencies = [ [[package]] name = "iroh" version = "0.90.0" -source = "git+https://github.com/n0-computer/iroh.git?branch=main#9c023bf4d7d1c3c10a9cc3b10df7e1a22c6ab7a4" +source = "git+https://github.com/n0-computer/iroh.git?branch=main#f3e430718a3316dffe191498fd3d0adddb92f2b4" dependencies = [ "aead", "backon", @@ -1655,13 +1662,13 @@ dependencies = [ "crypto_box", "data-encoding", "der", - "derive_more 1.0.0", + "derive_more 2.0.1", "ed25519-dalek", "futures-buffered", "futures-util", "getrandom 0.3.3", "hickory-resolver", - "http 1.3.1", + "http", "igd-next", "instant", "iroh-base", @@ -1707,11 +1714,11 @@ dependencies = [ [[package]] name = "iroh-base" version = "0.90.0" -source = "git+https://github.com/n0-computer/iroh.git?branch=main#9c023bf4d7d1c3c10a9cc3b10df7e1a22c6ab7a4" +source = "git+https://github.com/n0-computer/iroh.git?branch=main#f3e430718a3316dffe191498fd3d0adddb92f2b4" dependencies = [ "curve25519-dalek", "data-encoding", - "derive_more 1.0.0", + "derive_more 2.0.1", "ed25519-dalek", "n0-snafu", "nested_enum_utils", @@ -1823,7 +1830,7 @@ dependencies = [ "pin-project-lite", "rustc-hash", "rustls", - "socket2", + "socket2 0.5.10", "thiserror 2.0.12", "tokio", "tracing", @@ -1860,7 +1867,7 @@ dependencies = [ "cfg_aliases", "libc", "once_cell", - "socket2", + "socket2 0.5.10", "tracing", "windows-sys 0.59.0", ] @@ -1868,15 +1875,16 @@ dependencies = [ [[package]] name = "iroh-relay" version = "0.90.0" -source = "git+https://github.com/n0-computer/iroh.git?branch=main#9c023bf4d7d1c3c10a9cc3b10df7e1a22c6ab7a4" +source = "git+https://github.com/n0-computer/iroh.git?branch=main#f3e430718a3316dffe191498fd3d0adddb92f2b4" dependencies = [ + "blake3", "bytes", "cfg_aliases", "data-encoding", - "derive_more 1.0.0", + "derive_more 2.0.1", "getrandom 0.3.3", "hickory-resolver", - "http 1.3.1", + "http", "http-body-util", "hyper", "hyper-util", @@ -1898,6 +1906,7 @@ dependencies = [ "rustls-pki-types", "rustls-webpki", "serde", + "serde_bytes", "sha1", "snafu", "strum", @@ -1927,7 +1936,7 @@ dependencies = [ [[package]] name = "irpc" version = "0.5.0" -source = "git+https://github.com/n0-computer/irpc.git?branch=main#5cc624832cfed2653a20442851c203935039d6bc" +source = "git+https://github.com/n0-computer/irpc.git?branch=main#fc66b123706f6c59c31159c2434e74f4f50a2533" dependencies = [ "anyhow", "futures-buffered", @@ -1949,7 +1958,7 @@ dependencies = [ [[package]] name = "irpc-derive" version = "0.4.0" -source = "git+https://github.com/n0-computer/irpc.git?branch=main#5cc624832cfed2653a20442851c203935039d6bc" +source = "git+https://github.com/n0-computer/irpc.git?branch=main#fc66b123706f6c59c31159c2434e74f4f50a2533" dependencies = [ "proc-macro2", "quote", @@ -2026,9 +2035,9 @@ checksum = "241eaef5fd12c88705a01fc1066c48c4b36e0dd4377dcdc7ec3942cea7a69956" [[package]] name = "litrs" -version = "0.4.1" +version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4ce301924b7887e9d637144fdade93f9dfff9b60981d4ac161db09720d39aa5" +checksum = "f5e54036fe321fd421e10d732f155734c4e4afd610dd556d9a82833ab3ee0bed" [[package]] name = "lock_api" @@ -2170,9 +2179,9 @@ dependencies = [ [[package]] name = "n0-watcher" -version = "0.2.0" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f216d4ebc5fcf9548244803cbb93f488a2ae160feba3706cd17040d69cf7a368" +checksum = "c31462392a10d5ada4b945e840cbec2d5f3fee752b96c4b33eb41414d8f45c2a" dependencies = [ "derive_more 1.0.0", "n0-future", @@ -2193,19 +2202,19 @@ dependencies = [ [[package]] name = "netdev" -version = "0.31.0" +version = "0.36.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f901362e84cd407be6f8cd9d3a46bccf09136b095792785401ea7d283c79b91d" +checksum = "862209dce034f82a44c95ce2b5183730d616f2a68746b9c1959aa2572e77c0a1" dependencies = [ "dlopen2", "ipnet", "libc", "netlink-packet-core", - "netlink-packet-route 0.17.1", + "netlink-packet-route 0.22.0", "netlink-sys", "once_cell", "system-configuration", - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] @@ -2221,26 +2230,27 @@ dependencies = [ [[package]] name = "netlink-packet-route" -version = "0.17.1" +version = "0.22.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "053998cea5a306971f88580d0829e90f270f940befd7cf928da179d4187a5a66" +checksum = "fc0e7987b28514adf555dc1f9a5c30dfc3e50750bbaffb1aec41ca7b23dcd8e4" dependencies = [ "anyhow", - "bitflags 1.3.2", + "bitflags", "byteorder", "libc", + "log", "netlink-packet-core", "netlink-packet-utils", ] [[package]] name = "netlink-packet-route" -version = "0.23.0" +version = "0.24.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0800eae8638a299eaa67476e1c6b6692922273e0f7939fd188fc861c837b9cd2" +checksum = "56d83370a96813d7c977f8b63054f1162df6e5784f1c598d689236564fb5a6f2" dependencies = [ "anyhow", - "bitflags 2.9.1", + "bitflags", "byteorder", "libc", "log", @@ -2289,14 +2299,14 @@ dependencies = [ [[package]] name = "netwatch" -version = "0.6.0" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a829a830199b14989f9bccce6136ab928ab48336ab1f8b9002495dbbbb2edbe" +checksum = "8901dbb408894af3df3fc51420ba0c6faf3a7d896077b797c39b7001e2f787bd" dependencies = [ "atomic-waker", "bytes", "cfg_aliases", - "derive_more 1.0.0", + "derive_more 2.0.1", "iroh-quinn-udp", "js-sys", "libc", @@ -2305,19 +2315,19 @@ dependencies = [ "nested_enum_utils", "netdev", "netlink-packet-core", - "netlink-packet-route 0.23.0", + "netlink-packet-route 0.24.0", "netlink-proto", "netlink-sys", "pin-project-lite", "serde", "snafu", - "socket2", + "socket2 0.6.0", "time", "tokio", "tokio-util", "tracing", "web-sys", - "windows 0.59.0", + "windows", "windows-result", "wmi", ] @@ -2581,9 +2591,9 @@ checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" [[package]] name = "pkarr" -version = "3.8.0" +version = "3.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41a50f65a2b97031863fbdff2f085ba832360b4bef3106d1fcff9ab5bf4063fe" +checksum = "e80bbe1ea7bd30855c856cd796e67212eade4c275ab8554ce5458d7c75b4a63b" dependencies = [ "async-compat", "base32", @@ -2681,13 +2691,13 @@ checksum = "f84267b20a16ea918e43c6a88433c2d54fa145c92a811b5b047ccbe153674483" [[package]] name = "portmapper" -version = "0.6.1" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d82975dc029c00d566f4e0f61f567d31f0297a290cb5416b5580dd8b4b54ade" +checksum = "62f1975debe62a70557e42b9ff9466e4890cf9d3d156d296408a711f1c5f642b" dependencies = [ "base64", "bytes", - "derive_more 1.0.0", + "derive_more 2.0.1", "futures-lite", "futures-util", "hyper-util", @@ -2697,11 +2707,11 @@ dependencies = [ "nested_enum_utils", "netwatch", "num_enum", - "rand 0.8.5", + "rand 0.9.2", "serde", "smallvec", "snafu", - "socket2", + "socket2 0.6.0", "time", "tokio", "tokio-util", @@ -2722,9 +2732,9 @@ dependencies = [ [[package]] name = "postcard" -version = "1.1.2" +version = "1.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c1de96e20f51df24ca73cafcc4690e044854d803259db27a00a461cb3b9d17a" +checksum = "6764c3b5dd454e283a30e6dfe78e9b31096d9e32036b5d1eaac7a6119ccb9a24" dependencies = [ "cobs", "embedded-io 0.4.0", @@ -2736,9 +2746,9 @@ dependencies = [ [[package]] name = "postcard-derive" -version = "0.2.1" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68f049d94cb6dda6938cc8a531d2898e7c08d71c6de63d8e67123cca6cdde2cc" +checksum = "e0232bd009a197ceec9cc881ba46f727fcd8060a2d8d6a9dde7a69030a6fe2bb" dependencies = [ "proc-macro2", "quote", @@ -2861,10 +2871,10 @@ checksum = "6fcdab19deb5195a31cf7726a210015ff1496ba1464fd42cb4f537b8b01b471f" dependencies = [ "bit-set", "bit-vec", - "bitflags 2.9.1", + "bitflags", "lazy_static", "num-traits", - "rand 0.9.1", + "rand 0.9.2", "rand_chacha 0.9.0", "rand_xorshift", "regex-syntax 0.8.5", @@ -2892,7 +2902,7 @@ dependencies = [ "quinn-udp", "rustc-hash", "rustls", - "socket2", + "socket2 0.5.10", "thiserror 2.0.12", "tokio", "tracing", @@ -2908,7 +2918,7 @@ dependencies = [ "bytes", "getrandom 0.3.3", "lru-slab", - "rand 0.9.1", + "rand 0.9.2", "ring", "rustc-hash", "rustls", @@ -2929,7 +2939,7 @@ dependencies = [ "cfg_aliases", "libc", "once_cell", - "socket2", + "socket2 0.5.10", "tracing", "windows-sys 0.59.0", ] @@ -2972,9 +2982,9 @@ dependencies = [ [[package]] name = "rand" -version = "0.9.1" +version = "0.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9fbfd9d094a40bf3ae768db9361049ace4c0e04a4fd6b359518bd7b73a73dd97" +checksum = "6db2770f06117d490610c7488547d543617b21bfa07796d7a12f6f1bd53850d1" dependencies = [ "rand_chacha 0.9.0", "rand_core 0.9.3", @@ -3064,11 +3074,11 @@ dependencies = [ [[package]] name = "redox_syscall" -version = "0.5.13" +version = "0.5.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d04b7d0ee6b4a0207a0a7adb104d23ecb0b47d6beae7152d0fa34b692b29fd6" +checksum = "5407465600fb0548f1442edf71dd20683c6ed326200ace4b1ef0763521bb3b77" dependencies = [ - "bitflags 2.9.1", + "bitflags", ] [[package]] @@ -3100,7 +3110,7 @@ dependencies = [ "cfg-if", "libc", "rustix", - "windows 0.61.3", + "windows", ] [[package]] @@ -3155,15 +3165,15 @@ checksum = "2b15c43186be67a4fd63bee50d0303afffcef381492ebe2c5d87f324e1b8815c" [[package]] name = "reqwest" -version = "0.12.20" +version = "0.12.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eabf4c97d9130e2bf606614eb937e86edac8292eaa6f422f995d7e8de1eb1813" +checksum = "cbc931937e6ca3a06e3b6c0aa7841849b160a90351d6ab467a8b9b9959767531" dependencies = [ "base64", "bytes", "futures-core", "futures-util", - "http 1.3.1", + "http", "http-body", "http-body-util", "hyper", @@ -3191,7 +3201,7 @@ dependencies = [ "wasm-bindgen-futures", "wasm-streams", "web-sys", - "webpki-roots 1.0.1", + "webpki-roots 1.0.2", ] [[package]] @@ -3216,9 +3226,9 @@ dependencies = [ [[package]] name = "rustc-demangle" -version = "0.1.25" +version = "0.1.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "989e6739f80c4ad5b13e0fd7fe89531180375b18520cc8c82080e4dc4035b84f" +checksum = "56f7d92ca342cea22a06f2121d944b4fd82af56988c270852495420f961d4ace" [[package]] name = "rustc-hash" @@ -3237,22 +3247,22 @@ dependencies = [ [[package]] name = "rustix" -version = "1.0.7" +version = "1.0.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c71e83d6afe7ff64890ec6b71d6a69bb8a610ab78ce364b3352876bb4c801266" +checksum = "11181fbabf243db407ef8df94a6ce0b2f9a733bd8be4ad02b4eda9602296cac8" dependencies = [ - "bitflags 2.9.1", + "bitflags", "errno", "libc", "linux-raw-sys", - "windows-sys 0.59.0", + "windows-sys 0.60.2", ] [[package]] name = "rustls" -version = "0.23.28" +version = "0.23.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7160e3e10bf4535308537f3c4e1641468cd0e485175d6163087c0393c7d46643" +checksum = "2491382039b29b9b11ff08b76ff6c97cf287671dbb74f0be44bda389fffe9bd1" dependencies = [ "log", "once_cell", @@ -3314,9 +3324,9 @@ checksum = "f87165f0995f63a9fbeea62b64d10b4d9d8e78ec6d7d51fb2125fda7bb36788f" [[package]] name = "rustls-webpki" -version = "0.103.3" +version = "0.103.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e4a72fe2bcf7a6ac6fd7d0b9e5cb68aeb7d4c0a0271730218b3e92d43b4eb435" +checksum = "0a17884ae0c1b773f1ccd2bd4a8c72f16da897310a98b0e84bf349ad5ead92fc" dependencies = [ "ring", "rustls-pki-types", @@ -3392,7 +3402,7 @@ version = "3.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "271720403f46ca04f7ba6f55d438f8bd878d6b8ca0a1046e8228c4145bcbb316" dependencies = [ - "bitflags 2.9.1", + "bitflags", "core-foundation 0.10.1", "core-foundation-sys", "libc", @@ -3436,6 +3446,15 @@ dependencies = [ "serde_derive", ] +[[package]] +name = "serde_bytes" +version = "0.11.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8437fd221bde2d4ca316d61b90e337e9e702b3820b87d63caa9ba6c02bd06d96" +dependencies = [ + "serde", +] + [[package]] name = "serde_derive" version = "1.0.219" @@ -3449,9 +3468,9 @@ dependencies = [ [[package]] name = "serde_json" -version = "1.0.140" +version = "1.0.141" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "20068b6e96dc6c9bd23e01df8827e6c7e1f2fddd43c21810382803c136b99373" +checksum = "30b9eff21ebe718216c6ec64e1d9ac57087aad11efc64e32002bce4a0d4c03d3" dependencies = [ "itoa", "memchr", @@ -3563,7 +3582,7 @@ version = "0.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dee851d0e5e7af3721faea1843e8015e820a234f81fda3dea9247e15bac9a86a" dependencies = [ - "bitflags 2.9.1", + "bitflags", ] [[package]] @@ -3619,6 +3638,16 @@ dependencies = [ "windows-sys 0.52.0", ] +[[package]] +name = "socket2" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "233504af464074f9d066d7b5416c5f9b894a5862a6506e306f7b816cdd6f1807" +dependencies = [ + "libc", + "windows-sys 0.59.0", +] + [[package]] name = "spin" version = "0.9.8" @@ -3628,6 +3657,12 @@ dependencies = [ "lock_api", ] +[[package]] +name = "spin" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d5fe4ccb98d9c292d56fec89a5e07da7fc4cf0dc11e156b41793132775d3e591" + [[package]] name = "spki" version = "0.7.3" @@ -3675,23 +3710,22 @@ dependencies = [ [[package]] name = "strum" -version = "0.26.3" +version = "0.27.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8fec0f0aef304996cf250b31b5a10dee7980c85da9d759361292b8bca5a18f06" +checksum = "af23d6f6c1a224baef9d3f61e287d2761385a5b88fdab4eb4c6f11aeb54c4bcf" dependencies = [ "strum_macros", ] [[package]] name = "strum_macros" -version = "0.26.4" +version = "0.27.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c6bee85a5a24955dc440386795aa378cd9cf82acd5f764469152d2270e581be" +checksum = "7695ce3845ea4b33927c055a39dc438a45b059f7c1b3d91d38d10355fb8cbca7" dependencies = [ "heck", "proc-macro2", "quote", - "rustversion", "syn 2.0.104", ] @@ -3716,7 +3750,7 @@ dependencies = [ "precis-core", "precis-profiles", "quoted-string-parser", - "rand 0.9.1", + "rand 0.9.2", ] [[package]] @@ -3734,8 +3768,8 @@ dependencies = [ "hex", "parking_lot", "pnet_packet", - "rand 0.9.1", - "socket2", + "rand 0.9.2", + "socket2 0.5.10", "thiserror 1.0.69", "tokio", "tracing", @@ -3749,8 +3783,8 @@ checksum = "4eae338a4551897c6a50fa2c041c4b75f578962d9fca8adb828cf81f7158740f" dependencies = [ "acto", "hickory-proto", - "rand 0.9.1", - "socket2", + "rand 0.9.2", + "socket2 0.5.10", "thiserror 2.0.12", "tokio", "tracing", @@ -3815,7 +3849,7 @@ version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3c879d448e9d986b661742763247d3693ed13609438cf3d006f51f5368a5ba6b" dependencies = [ - "bitflags 2.9.1", + "bitflags", "core-foundation 0.9.4", "system-configuration-sys", ] @@ -3860,10 +3894,11 @@ dependencies = [ [[package]] name = "test-strategy" -version = "0.4.1" +version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95eb2d223f5cd3ec8dd7874cf4ada95c9cf2b5ed84ecfb1046d9aefee0c28b12" +checksum = "43b12f9683de37f9980e485167ee624bfaa0b6b04da661e98e25ef9c2669bc1b" dependencies = [ + "derive-ex", "proc-macro2", "quote", "structmeta", @@ -3972,20 +4007,22 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.45.1" +version = "1.47.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75ef51a33ef1da925cea3e4eb122833cb377c61439ca401b770f54902b806779" +checksum = "43864ed400b6043a4757a25c7a64a8efde741aed79a056a2fb348a406701bb35" dependencies = [ "backtrace", "bytes", + "io-uring", "libc", "mio", "parking_lot", "pin-project-lite", "signal-hook-registry", - "socket2", + "slab", + "socket2 0.6.0", "tokio-macros", - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] @@ -4040,18 +4077,18 @@ dependencies = [ [[package]] name = "tokio-websockets" -version = "0.11.4" +version = "0.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9fcaf159b4e7a376b05b5bfd77bfd38f3324f5fce751b4213bfc7eaa47affb4e" +checksum = "3f29ba084eb43becc9864ba514b4a64f5f65b82f9a6ffbafa5436c1c80605f03" dependencies = [ "base64", "bytes", "futures-core", "futures-sink", "getrandom 0.3.3", - "http 1.3.1", + "http", "httparse", - "rand 0.9.1", + "rand 0.9.2", "ring", "rustls-pki-types", "simdutf8", @@ -4098,10 +4135,10 @@ version = "0.6.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "adc82fd73de2a9722ac5da747f12383d2bfdb93591ee6c58486e0097890f05f2" dependencies = [ - "bitflags 2.9.1", + "bitflags", "bytes", "futures-util", - "http 1.3.1", + "http", "http-body", "iri-string", "pin-project-lite", @@ -4485,14 +4522,14 @@ version = "0.26.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "75c7f0ef91146ebfb530314f5f1d24528d7f0767efbfd31dce919275413e393e" dependencies = [ - "webpki-root-certs 1.0.1", + "webpki-root-certs 1.0.2", ] [[package]] name = "webpki-root-certs" -version = "1.0.1" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "86138b15b2b7d561bc4469e77027b8dd005a43dc502e9031d1f5afc8ce1f280e" +checksum = "4e4ffd8df1c57e87c325000a3d6ef93db75279dc3a231125aac571650f22b12a" dependencies = [ "rustls-pki-types", ] @@ -4503,14 +4540,14 @@ version = "0.26.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "521bc38abb08001b01866da9f51eb7c5d647a19260e00054a8c7fd5f9e57f7a9" dependencies = [ - "webpki-roots 1.0.1", + "webpki-roots 1.0.2", ] [[package]] name = "webpki-roots" -version = "1.0.1" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8782dd5a41a24eed3a4f40b606249b3e236ca61adf1f25ea4d45c73de122b502" +checksum = "7e8983c3ab33d6fb807cfcdad2491c4ea8cbc8ed839181c7dfd9c67c83e261b2" dependencies = [ "rustls-pki-types", ] @@ -4552,16 +4589,6 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" -[[package]] -name = "windows" -version = "0.59.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f919aee0a93304be7f62e8e5027811bbba96bcb1de84d6618be56e43f8a32a1" -dependencies = [ - "windows-core 0.59.0", - "windows-targets 0.53.2", -] - [[package]] name = "windows" version = "0.61.3" @@ -4569,7 +4596,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9babd3a767a4c1aef6900409f85f5d53ce2544ccdfaa86dad48c91782c6d6893" dependencies = [ "windows-collections", - "windows-core 0.61.2", + "windows-core", "windows-future", "windows-link", "windows-numerics", @@ -4581,20 +4608,7 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3beeceb5e5cfd9eb1d76b381630e82c4241ccd0d27f1a39ed41b2760b255c5e8" dependencies = [ - "windows-core 0.61.2", -] - -[[package]] -name = "windows-core" -version = "0.59.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "810ce18ed2112484b0d4e15d022e5f598113e220c53e373fb31e67e21670c1ce" -dependencies = [ - "windows-implement 0.59.0", - "windows-interface", - "windows-result", - "windows-strings 0.3.1", - "windows-targets 0.53.2", + "windows-core", ] [[package]] @@ -4603,11 +4617,11 @@ version = "0.61.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c0fdd3ddb90610c7638aa2b3a3ab2904fb9e5cdbecc643ddb3647212781c4ae3" dependencies = [ - "windows-implement 0.60.0", + "windows-implement", "windows-interface", "windows-link", "windows-result", - "windows-strings 0.4.2", + "windows-strings", ] [[package]] @@ -4616,22 +4630,11 @@ version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fc6a41e98427b19fe4b73c550f060b59fa592d7d686537eebf9385621bfbad8e" dependencies = [ - "windows-core 0.61.2", + "windows-core", "windows-link", "windows-threading", ] -[[package]] -name = "windows-implement" -version = "0.59.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "83577b051e2f49a058c308f17f273b570a6a758386fc291b5f6a934dd84e48c1" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.104", -] - [[package]] name = "windows-implement" version = "0.60.0" @@ -4666,7 +4669,7 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9150af68066c4c5c07ddc0ce30421554771e528bde427614c61038bc2c92c2b1" dependencies = [ - "windows-core 0.61.2", + "windows-core", "windows-link", ] @@ -4679,15 +4682,6 @@ dependencies = [ "windows-link", ] -[[package]] -name = "windows-strings" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87fa48cc5d406560701792be122a10132491cff9d0aeb23583cc2dcafc847319" -dependencies = [ - "windows-link", -] - [[package]] name = "windows-strings" version = "0.4.2" @@ -4739,7 +4733,7 @@ version = "0.60.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f2f500e4d28234f72040990ec9d39e3a6b950f9f22d3dba18416c35882612bcb" dependencies = [ - "windows-targets 0.53.2", + "windows-targets 0.53.3", ] [[package]] @@ -4790,10 +4784,11 @@ dependencies = [ [[package]] name = "windows-targets" -version = "0.53.2" +version = "0.53.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c66f69fcc9ce11da9966ddb31a40968cad001c5bedeb5c2b82ede4253ab48aef" +checksum = "d5fe6031c4041849d7c496a8ded650796e7b6ecc19df1a431c1a363342e5dc91" dependencies = [ + "windows-link", "windows_aarch64_gnullvm 0.53.0", "windows_aarch64_msvc 0.53.0", "windows_i686_gnu 0.53.0", @@ -4995,9 +4990,9 @@ checksum = "271414315aff87387382ec3d271b52d7ae78726f5d44ac98b4f4030c91880486" [[package]] name = "winnow" -version = "0.7.11" +version = "0.7.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "74c7b26e3480b707944fc872477815d29a8e429d2f93a1ce000f5fa84a15cbcd" +checksum = "f3edebf492c8125044983378ecb5766203ad3b4c2f7a922bd7dd207f6d443e95" dependencies = [ "memchr", ] @@ -5018,22 +5013,22 @@ version = "0.39.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6f42320e61fe2cfd34354ecb597f86f413484a798ba44a8ca1165c58d42da6c1" dependencies = [ - "bitflags 2.9.1", + "bitflags", ] [[package]] name = "wmi" -version = "0.14.5" +version = "0.17.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7787dacdd8e71cbc104658aade4009300777f9b5fda6a75f19145fedb8a18e71" +checksum = "3d3de777dce4cbcdc661d5d18e78ce4b46a37adc2bb7c0078a556c7f07bcce2f" dependencies = [ "chrono", "futures", "log", "serde", "thiserror 2.0.12", - "windows 0.59.0", - "windows-core 0.59.0", + "windows", + "windows-core", ] [[package]] @@ -5063,9 +5058,9 @@ dependencies = [ [[package]] name = "xml-rs" -version = "0.8.26" +version = "0.8.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a62ce76d9b56901b19a74f19431b0d8b3bc7ca4ad685a746dfd78ca8f4fc6bda" +checksum = "6fd8403733700263c6eb89f192880191f1b83e332f7a20371ddcf421c4a337c7" [[package]] name = "xmltree" diff --git a/Cargo.toml b/Cargo.toml index f7ff49b6..18c5f74e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -42,7 +42,7 @@ self_cell = "1.1.0" genawaiter = { version = "0.99.1", features = ["futures03"] } iroh-base = "0.90" reflink-copy = "0.1.24" -irpc = { version = "0.5.0", features = ["rpc", "quinn_endpoint_setup", "message_spans", "stream", "derive"], default-features = false } +irpc = { version = "0.5.0", features = ["rpc", "quinn_endpoint_setup", "spans", "stream", "derive"], default-features = false } iroh-metrics = { version = "0.35" } [dev-dependencies] @@ -69,4 +69,3 @@ default = ["hide-proto-docs"] iroh = { git = "https://github.com/n0-computer/iroh.git", branch = "main" } iroh-base = { git = "https://github.com/n0-computer/iroh.git", branch = "main" } irpc = { git = "https://github.com/n0-computer/irpc.git", branch = "main" } -irpc-derive = { git = "https://github.com/n0-computer/irpc.git", branch = "main" } diff --git a/examples/random_store.rs b/examples/random_store.rs index 771fb411..ffdd9b82 100644 --- a/examples/random_store.rs +++ b/examples/random_store.rs @@ -241,7 +241,7 @@ async fn provide(args: ProvideArgs) -> anyhow::Result<()> { let router = iroh::protocol::Router::builder(endpoint.clone()) .accept(iroh_blobs::ALPN, blobs) .spawn(); - let addr = router.endpoint().node_addr().initialized().await?; + let addr = router.endpoint().node_addr().initialized().await; let ticket = NodeTicket::from(addr.clone()); println!("Node address: {addr:?}"); println!("ticket:\n{ticket}"); diff --git a/src/api.rs b/src/api.rs index 56527994..29b25f58 100644 --- a/src/api.rs +++ b/src/api.rs @@ -12,11 +12,11 @@ //! //! You can also [`connect`](Store::connect) to a remote store that is listening //! to rpc requests. -use std::{io, net::SocketAddr, ops::Deref, sync::Arc}; +use std::{io, net::SocketAddr, ops::Deref}; use bao_tree::io::EncodeError; use iroh::Endpoint; -use irpc::rpc::{listen, Handler}; +use irpc::rpc::{listen, RemoteService}; use n0_snafu::SpanTrace; use nested_enum_utils::common_fields; use proto::{Request, ShutdownRequest, SyncDbRequest}; @@ -32,7 +32,7 @@ pub mod remote; pub mod tags; pub use crate::{store::util::Tag, util::temp_tag::TempTag}; -pub(crate) type ApiClient = irpc::Client; +pub(crate) type ApiClient = irpc::Client; #[common_fields({ backtrace: Option, @@ -281,42 +281,8 @@ impl Store { /// Listen on a quinn endpoint for incoming rpc connections. pub async fn listen(self, endpoint: quinn::Endpoint) { - let local = self.client.local().unwrap().clone(); - let handler: Handler = Arc::new(move |req, rx, tx| { - let local = local.clone(); - Box::pin({ - match req { - Request::SetTag(msg) => local.send((msg, tx)), - Request::CreateTag(msg) => local.send((msg, tx)), - Request::DeleteTags(msg) => local.send((msg, tx)), - Request::RenameTag(msg) => local.send((msg, tx)), - Request::ListTags(msg) => local.send((msg, tx)), - - Request::ListTempTags(msg) => local.send((msg, tx)), - Request::CreateTempTag(msg) => local.send((msg, tx)), - - Request::BlobStatus(msg) => local.send((msg, tx)), - - Request::ImportBytes(msg) => local.send((msg, tx)), - Request::ImportByteStream(msg) => local.send((msg, tx, rx)), - Request::ImportBao(msg) => local.send((msg, tx, rx)), - Request::ImportPath(msg) => local.send((msg, tx)), - Request::ListBlobs(msg) => local.send((msg, tx)), - Request::DeleteBlobs(msg) => local.send((msg, tx)), - Request::Batch(msg) => local.send((msg, tx, rx)), - - Request::ExportBao(msg) => local.send((msg, tx)), - Request::ExportRanges(msg) => local.send((msg, tx)), - Request::ExportPath(msg) => local.send((msg, tx)), - - Request::Observe(msg) => local.send((msg, tx)), - - Request::ClearProtected(msg) => local.send((msg, tx)), - Request::SyncDb(msg) => local.send((msg, tx)), - Request::Shutdown(msg) => local.send((msg, tx)), - } - }) - }); + let local = self.client.as_local().unwrap().clone(); + let handler = Request::remote_handler(local); listen::(endpoint, handler).await } diff --git a/src/api/downloader.rs b/src/api/downloader.rs index 4ea34120..678a8c6a 100644 --- a/src/api/downloader.rs +++ b/src/api/downloader.rs @@ -29,15 +29,10 @@ use crate::{ #[derive(Debug, Clone)] pub struct Downloader { - client: irpc::Client, + client: irpc::Client, } -#[derive(Debug, Clone)] -pub struct DownloaderService; - -impl irpc::Service for DownloaderService {} - -#[rpc_requests(DownloaderService, message = SwarmMsg, alias = "Msg")] +#[rpc_requests(message = SwarmMsg, alias = "Msg")] #[derive(Debug, Serialize, Deserialize)] enum SwarmProtocol { #[rpc(tx = mpsc::Sender)] @@ -711,9 +706,9 @@ mod tests { let (r3, store3, _) = node_test_setup_fs(testdir.path().join("c")).await?; let tt1 = store1.add_slice("hello world").await?; let tt2 = store2.add_slice("hello world 2").await?; - let node1_addr = r1.endpoint().node_addr().initialized().await?; + let node1_addr = r1.endpoint().node_addr().initialized().await; let node1_id = node1_addr.node_id; - let node2_addr = r2.endpoint().node_addr().initialized().await?; + let node2_addr = r2.endpoint().node_addr().initialized().await; let node2_id = node2_addr.node_id; let swarm = Downloader::new(&store3, r3.endpoint()); r3.endpoint().add_node_addr(node1_addr.clone())?; @@ -750,9 +745,9 @@ mod tests { format: crate::BlobFormat::HashSeq, }) .await?; - let node1_addr = r1.endpoint().node_addr().initialized().await?; + let node1_addr = r1.endpoint().node_addr().initialized().await; let node1_id = node1_addr.node_id; - let node2_addr = r2.endpoint().node_addr().initialized().await?; + let node2_addr = r2.endpoint().node_addr().initialized().await; let node2_id = node2_addr.node_id; let swarm = Downloader::new(&store3, r3.endpoint()); r3.endpoint().add_node_addr(node1_addr.clone())?; @@ -819,9 +814,9 @@ mod tests { format: crate::BlobFormat::HashSeq, }) .await?; - let node1_addr = r1.endpoint().node_addr().initialized().await?; + let node1_addr = r1.endpoint().node_addr().initialized().await; let node1_id = node1_addr.node_id; - let node2_addr = r2.endpoint().node_addr().initialized().await?; + let node2_addr = r2.endpoint().node_addr().initialized().await; let node2_id = node2_addr.node_id; let swarm = Downloader::new(&store3, r3.endpoint()); r3.endpoint().add_node_addr(node1_addr.clone())?; diff --git a/src/api/proto.rs b/src/api/proto.rs index ed3686e1..e5d77cc3 100644 --- a/src/api/proto.rs +++ b/src/api/proto.rs @@ -86,11 +86,7 @@ impl HashSpecific for CreateTagMsg { } } -#[derive(Debug, Clone)] -pub struct StoreService; -impl irpc::Service for StoreService {} - -#[rpc_requests(StoreService, message = Command, alias = "Msg")] +#[rpc_requests(message = Command, alias = "Msg")] #[derive(Debug, Serialize, Deserialize)] pub enum Request { #[rpc(tx = mpsc::Sender>)] diff --git a/src/net_protocol.rs b/src/net_protocol.rs index 4ca3778a..3e7d9582 100644 --- a/src/net_protocol.rs +++ b/src/net_protocol.rs @@ -99,7 +99,7 @@ impl BlobsProtocol { /// just a convenience method to create a ticket from content and the address of this node. pub async fn ticket(&self, content: impl Into) -> anyhow::Result { let content = content.into(); - let addr = self.inner.endpoint.node_addr().initialized().await?; + let addr = self.inner.endpoint.node_addr().initialized().await; let ticket = BlobTicket::new(addr, content.hash, content.format); Ok(ticket) } diff --git a/src/store/fs.rs b/src/store/fs.rs index b0c1eb60..9aa3819b 100644 --- a/src/store/fs.rs +++ b/src/store/fs.rs @@ -1259,7 +1259,7 @@ impl AsRef for FsStore { impl FsStore { fn new( - sender: irpc::LocalSender, + sender: irpc::LocalSender, db: tokio::sync::mpsc::Sender, ) -> Self { Self { diff --git a/src/store/fs/import.rs b/src/store/fs/import.rs index 1502ffec..5c64535e 100644 --- a/src/store/fs/import.rs +++ b/src/store/fs/import.rs @@ -39,8 +39,7 @@ use crate::{ blobs::{AddProgressItem, ImportMode}, proto::{ HashSpecific, ImportByteStreamMsg, ImportByteStreamRequest, ImportByteStreamUpdate, - ImportBytesMsg, ImportBytesRequest, ImportPathMsg, ImportPathRequest, Scope, - StoreService, + ImportBytesMsg, ImportBytesRequest, ImportPathMsg, ImportPathRequest, Request, Scope, }, }, store::{ @@ -136,12 +135,12 @@ impl std::fmt::Debug for ImportEntry { } } -impl Channels for ImportEntry { +impl Channels for ImportEntry { type Tx = mpsc::Sender; type Rx = NoReceiver; } -pub type ImportEntryMsg = WithChannels; +pub type ImportEntryMsg = WithChannels; impl HashSpecific for ImportEntryMsg { fn hash(&self) -> Hash { diff --git a/src/tests.rs b/src/tests.rs index fccfac52..e7dc823e 100644 --- a/src/tests.rs +++ b/src/tests.rs @@ -226,7 +226,7 @@ async fn two_nodes_get_blobs( for size in sizes { tts.push(store1.add_bytes(test_data(size)).await?); } - let addr1 = r1.endpoint().node_addr().initialized().await?; + let addr1 = r1.endpoint().node_addr().initialized().await; let conn = r2.endpoint().connect(addr1, crate::ALPN).await?; for size in sizes { let hash = Hash::new(test_data(size)); @@ -259,7 +259,7 @@ async fn two_nodes_observe( let size = 1024 * 1024 * 8 + 1; let data = test_data(size); let (hash, bao) = create_n0_bao(&data, &ChunkRanges::all())?; - let addr1 = r1.endpoint().node_addr().initialized().await?; + let addr1 = r1.endpoint().node_addr().initialized().await; let conn = r2.endpoint().connect(addr1, crate::ALPN).await?; let mut stream = store2 .remote() @@ -308,7 +308,7 @@ async fn two_nodes_get_many( tts.push(store1.add_bytes(test_data(size)).await?); } let hashes = tts.iter().map(|tt| tt.hash).collect::>(); - let addr1 = r1.endpoint().node_addr().initialized().await?; + let addr1 = r1.endpoint().node_addr().initialized().await; let conn = r2.endpoint().connect(addr1, crate::ALPN).await?; store2 .remote() @@ -381,7 +381,7 @@ async fn two_nodes_push_blobs( for size in sizes { tts.push(store1.add_bytes(test_data(size)).await?); } - let addr2 = r2.endpoint().node_addr().initialized().await?; + let addr2 = r2.endpoint().node_addr().initialized().await; let conn = r1.endpoint().connect(addr2, crate::ALPN).await?; for size in sizes { let hash = Hash::new(test_data(size)); @@ -542,7 +542,7 @@ async fn two_nodes_hash_seq( r2: Router, store2: &Store, ) -> TestResult<()> { - let addr1 = r1.endpoint().node_addr().initialized().await?; + let addr1 = r1.endpoint().node_addr().initialized().await; let sizes = INTERESTING_SIZES; let root = add_test_hash_seq(store1, sizes).await?; let conn = r2.endpoint().connect(addr1, crate::ALPN).await?; @@ -569,7 +569,7 @@ async fn two_nodes_hash_seq_mem() -> TestResult<()> { async fn two_nodes_hash_seq_progress() -> TestResult<()> { tracing_subscriber::fmt::try_init().ok(); let (_testdir, (r1, store1, _), (r2, store2, _)) = two_node_test_setup_fs().await?; - let addr1 = r1.endpoint().node_addr().initialized().await?; + let addr1 = r1.endpoint().node_addr().initialized().await; let sizes = INTERESTING_SIZES; let root = add_test_hash_seq(&store1, sizes).await?; let conn = r2.endpoint().connect(addr1, crate::ALPN).await?; @@ -605,7 +605,7 @@ async fn node_serve_hash_seq() -> TestResult<()> { let r1 = Router::builder(endpoint) .accept(crate::protocol::ALPN, blobs) .spawn(); - let addr1 = r1.endpoint().node_addr().initialized().await?; + let addr1 = r1.endpoint().node_addr().initialized().await; info!("node addr: {addr1:?}"); let endpoint2 = Endpoint::builder().discovery_n0().bind().await?; let conn = endpoint2.connect(addr1, crate::protocol::ALPN).await?; @@ -636,7 +636,7 @@ async fn node_serve_blobs() -> TestResult<()> { let r1 = Router::builder(endpoint) .accept(crate::protocol::ALPN, blobs) .spawn(); - let addr1 = r1.endpoint().node_addr().initialized().await?; + let addr1 = r1.endpoint().node_addr().initialized().await; info!("node addr: {addr1:?}"); let endpoint2 = Endpoint::builder().discovery_n0().bind().await?; let conn = endpoint2.connect(addr1, crate::protocol::ALPN).await?; @@ -678,7 +678,7 @@ async fn node_smoke(store: &Store) -> TestResult<()> { let r1 = Router::builder(endpoint) .accept(crate::protocol::ALPN, blobs) .spawn(); - let addr1 = r1.endpoint().node_addr().initialized().await?; + let addr1 = r1.endpoint().node_addr().initialized().await; info!("node addr: {addr1:?}"); let endpoint2 = Endpoint::builder().discovery_n0().bind().await?; let conn = endpoint2.connect(addr1, crate::protocol::ALPN).await?;