A local-first private AI assistant for everyday use. Runs on-device models with encrypted P2P sync, and supports sharing chats publicly on ATProto.
10
fork

Configure Feed

Select the types of activity you want to include in your feed.

feat: tiles link: creating endpoints with Tiles keypair

- This makes sure the iroh endpointId can be decoded into
the tiles account DID and vice-versa, fundamentally both
are build from same tiles keypair underneath

madclaws 1d2a86cf ae288ec6

+485 -517
+314 -483
Cargo.lock
··· 9 9 checksum = "320119579fcad9c21884f5c4861d16174d0e06250625266f50fe6898340abefa" 10 10 11 11 [[package]] 12 + name = "aead" 13 + version = "0.5.2" 14 + source = "registry+https://github.com/rust-lang/crates.io-index" 15 + checksum = "d122413f284cf2d62fb1b7db97e02edb8cda96d769b16e443a4f6195e35662b0" 16 + dependencies = [ 17 + "crypto-common 0.1.7", 18 + "generic-array", 19 + ] 20 + 21 + [[package]] 22 + name = "aes" 23 + version = "0.8.4" 24 + source = "registry+https://github.com/rust-lang/crates.io-index" 25 + checksum = "b169f7a6d4742236a0a00c541b845991d0ac43e546831af1249753ab4c3aa3a0" 26 + dependencies = [ 27 + "cfg-if", 28 + "cipher", 29 + "cpufeatures", 30 + ] 31 + 32 + [[package]] 33 + name = "aes-gcm" 34 + version = "0.10.3" 35 + source = "registry+https://github.com/rust-lang/crates.io-index" 36 + checksum = "831010a0f742e1209b3bcea8fab6a8e149051ba6099432c8cb2cc117dec3ead1" 37 + dependencies = [ 38 + "aead", 39 + "aes", 40 + "cipher", 41 + "ctr", 42 + "ghash", 43 + "subtle", 44 + ] 45 + 46 + [[package]] 12 47 name = "ahash" 13 48 version = "0.8.12" 14 49 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 63 98 64 99 [[package]] 65 100 name = "anstream" 66 - version = "0.6.21" 101 + version = "1.0.0" 67 102 source = "registry+https://github.com/rust-lang/crates.io-index" 68 - checksum = "43d5b281e737544384e969a5ccad3f1cdd24b48086a0fc1b2a5262a26b8f4f4a" 103 + checksum = "824a212faf96e9acacdbd09febd34438f8f711fb84e09a8916013cd7815ca28d" 69 104 dependencies = [ 70 105 "anstyle", 71 106 "anstyle-parse", ··· 78 113 79 114 [[package]] 80 115 name = "anstyle" 81 - version = "1.0.13" 116 + version = "1.0.14" 82 117 source = "registry+https://github.com/rust-lang/crates.io-index" 83 - checksum = "5192cca8006f1fd4f7237516f40fa183bb07f8fbdfedaa0036de5ea9b0b45e78" 118 + checksum = "940b3a0ca603d1eade50a4846a2afffd5ef57a9feac2c0e2ec2e14f9ead76000" 84 119 85 120 [[package]] 86 121 name = "anstyle-parse" 87 - version = "0.2.7" 122 + version = "1.0.0" 88 123 source = "registry+https://github.com/rust-lang/crates.io-index" 89 - checksum = "4e7644824f0aa2c7b9384579234ef10eb7efb6a0deb83f9630a49594dd9c15c2" 124 + checksum = "52ce7f38b242319f7cabaa6813055467063ecdc9d355bbb4ce0c68908cd8130e" 90 125 dependencies = [ 91 126 "utf8parse", 92 127 ] ··· 402 437 ] 403 438 404 439 [[package]] 405 - name = "async-compat" 406 - version = "0.2.5" 407 - source = "registry+https://github.com/rust-lang/crates.io-index" 408 - checksum = "a1ba85bc55464dcbf728b56d97e119d673f4cf9062be330a9a26f3acf504a590" 409 - dependencies = [ 410 - "futures-core", 411 - "futures-io", 412 - "once_cell", 413 - "pin-project-lite", 414 - "tokio", 415 - ] 416 - 417 - [[package]] 418 440 name = "async-executor" 419 441 version = "1.14.0" 420 442 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 601 623 checksum = "c08606f8c3cbf4ce6ec8e28fb0014a2c086708fe954eaa885384a6165172e7e8" 602 624 603 625 [[package]] 604 - name = "aws-lc-rs" 605 - version = "1.16.1" 606 - source = "registry+https://github.com/rust-lang/crates.io-index" 607 - checksum = "94bffc006df10ac2a68c83692d734a465f8ee6c5b384d8545a636f81d858f4bf" 608 - dependencies = [ 609 - "aws-lc-sys", 610 - "zeroize", 611 - ] 612 - 613 - [[package]] 614 - name = "aws-lc-sys" 615 - version = "0.38.0" 616 - source = "registry+https://github.com/rust-lang/crates.io-index" 617 - checksum = "4321e568ed89bb5a7d291a7f37997c2c0df89809d7b6d12062c81ddb54aa782e" 618 - dependencies = [ 619 - "cc", 620 - "cmake", 621 - "dunce", 622 - "fs_extra", 623 - ] 624 - 625 - [[package]] 626 626 name = "axum" 627 627 version = "0.8.8" 628 628 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 672 672 "tower-layer", 673 673 "tower-service", 674 674 "tracing", 675 + ] 676 + 677 + [[package]] 678 + name = "axum-macros" 679 + version = "0.5.0" 680 + source = "registry+https://github.com/rust-lang/crates.io-index" 681 + checksum = "604fde5e028fea851ce1d8570bbdc034bec850d157f7569d10f347d06808c05c" 682 + dependencies = [ 683 + "proc-macro2", 684 + "quote", 685 + "syn 2.0.117", 675 686 ] 676 687 677 688 [[package]] ··· 802 813 803 814 [[package]] 804 815 name = "bon" 805 - version = "3.9.0" 816 + version = "3.9.1" 806 817 source = "registry+https://github.com/rust-lang/crates.io-index" 807 - checksum = "2d13a61f2963b88eef9c1be03df65d42f6996dfeac1054870d950fcf66686f83" 818 + checksum = "f47dbe92550676ee653353c310dfb9cf6ba17ee70396e1f7cf0a2020ad49b2fe" 808 819 dependencies = [ 809 820 "bon-macros", 810 821 "rustversion", ··· 812 823 813 824 [[package]] 814 825 name = "bon-macros" 815 - version = "3.9.0" 826 + version = "3.9.1" 816 827 source = "registry+https://github.com/rust-lang/crates.io-index" 817 - checksum = "d314cc62af2b6b0c65780555abb4d02a03dd3b799cd42419044f0c38d99738c0" 828 + checksum = "519bd3116aeeb42d5372c29d982d16d0170d3d4a5ed85fc7dd91642ffff3c67c" 818 829 dependencies = [ 819 830 "darling 0.23.0", 820 831 "ident_case", ··· 875 886 876 887 [[package]] 877 888 name = "cc" 878 - version = "1.2.56" 889 + version = "1.2.57" 879 890 source = "registry+https://github.com/rust-lang/crates.io-index" 880 - checksum = "aebf35691d1bfb0ac386a69bac2fde4dd276fb618cf8bf4f5318fe285e821bb2" 891 + checksum = "7a0dd1ca384932ff3641c8718a02769f1698e7563dc6974ffd03346116310423" 881 892 dependencies = [ 882 893 "find-msvc-tools", 883 894 "jobserver", 884 895 "libc", 885 896 "shlex", 886 897 ] 887 - 888 - [[package]] 889 - name = "cesu8" 890 - version = "1.1.0" 891 - source = "registry+https://github.com/rust-lang/crates.io-index" 892 - checksum = "6d43a04d8753f35258c91f8ec639f792891f748a1edbd759cf1dcea3382ad83c" 893 898 894 899 [[package]] 895 900 name = "cfg-if" ··· 933 938 ] 934 939 935 940 [[package]] 941 + name = "cipher" 942 + version = "0.4.4" 943 + source = "registry+https://github.com/rust-lang/crates.io-index" 944 + checksum = "773f3b9af64447d2ce9850330c473515014aa235e6a783b02db81ff39e4a3dad" 945 + dependencies = [ 946 + "crypto-common 0.1.7", 947 + "inout", 948 + ] 949 + 950 + [[package]] 936 951 name = "clap" 937 - version = "4.5.60" 952 + version = "4.6.0" 938 953 source = "registry+https://github.com/rust-lang/crates.io-index" 939 - checksum = "2797f34da339ce31042b27d23607e051786132987f595b02ba4f6a6dffb7030a" 954 + checksum = "b193af5b67834b676abd72466a96c1024e6a6ad978a1f484bd90b85c94041351" 940 955 dependencies = [ 941 956 "clap_builder", 942 957 "clap_derive", ··· 944 959 945 960 [[package]] 946 961 name = "clap_builder" 947 - version = "4.5.60" 962 + version = "4.6.0" 948 963 source = "registry+https://github.com/rust-lang/crates.io-index" 949 - checksum = "24a241312cea5059b13574bb9b3861cabf758b879c15190b37b6d6fd63ab6876" 964 + checksum = "714a53001bf66416adb0e2ef5ac857140e7dc3a0c48fb28b2f10762fc4b5069f" 950 965 dependencies = [ 951 966 "anstream", 952 967 "anstyle", ··· 956 971 957 972 [[package]] 958 973 name = "clap_derive" 959 - version = "4.5.55" 974 + version = "4.6.0" 960 975 source = "registry+https://github.com/rust-lang/crates.io-index" 961 - checksum = "a92793da1a46a5f2a02a6f4c46c6496b28c43638adea8306fcb0caa1634f24e5" 976 + checksum = "1110bd8a634a1ab8cb04345d8d878267d57c3cf1b38d91b71af6686408bbca6a" 962 977 dependencies = [ 963 978 "heck", 964 979 "proc-macro2", ··· 968 983 969 984 [[package]] 970 985 name = "clap_lex" 971 - version = "1.0.0" 986 + version = "1.1.0" 972 987 source = "registry+https://github.com/rust-lang/crates.io-index" 973 - checksum = "3a822ea5bc7590f9d40f1ba12c0dc3c2760f3482c6984db1573ad11031420831" 988 + checksum = "c8d4a3bb8b1e0c1050499d1815f5ab16d04f0959b233085fb31653fbfc9d98f9" 974 989 975 990 [[package]] 976 991 name = "clipboard-win" ··· 982 997 ] 983 998 984 999 [[package]] 985 - name = "cmake" 986 - version = "0.1.57" 987 - source = "registry+https://github.com/rust-lang/crates.io-index" 988 - checksum = "75443c44cd6b379beb8c5b45d85d0773baf31cce901fe7bb252f4eff3008ef7d" 989 - dependencies = [ 990 - "cc", 991 - ] 992 - 993 - [[package]] 994 1000 name = "cmsketch" 995 1001 version = "0.2.4" 996 1002 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 1007 1013 1008 1014 [[package]] 1009 1015 name = "colorchoice" 1010 - version = "1.0.4" 1011 - source = "registry+https://github.com/rust-lang/crates.io-index" 1012 - checksum = "b05b61dc5112cbb17e4b6cd61790d9845d13888356391624cbe7e41efeac1e75" 1013 - 1014 - [[package]] 1015 - name = "combine" 1016 - version = "4.6.7" 1016 + version = "1.0.5" 1017 1017 source = "registry+https://github.com/rust-lang/crates.io-index" 1018 - checksum = "ba5a308b75df32fe02788e748662718f03fde005016435c444eea572398219fd" 1019 - dependencies = [ 1020 - "bytes", 1021 - "memchr", 1022 - ] 1018 + checksum = "1d07550c9036bf2ae0c684c4297d503f838287c83c53686d05370d0e139ae570" 1023 1019 1024 1020 [[package]] 1025 1021 name = "concurrent-queue" ··· 1230 1226 1231 1227 [[package]] 1232 1228 name = "crypto-common" 1233 - version = "0.1.6" 1229 + version = "0.1.7" 1234 1230 source = "registry+https://github.com/rust-lang/crates.io-index" 1235 - checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3" 1231 + checksum = "78c8292055d1c1df0cce5d180393dc8cce0abec0a7102adb6c7b1eef6016d60a" 1236 1232 dependencies = [ 1237 1233 "generic-array", 1238 1234 "typenum", ··· 1266 1262 checksum = "704a3c26996a80471189265814dbc2c257598b96b8a7feae2d31ace646bb9782" 1267 1263 dependencies = [ 1268 1264 "memchr", 1265 + ] 1266 + 1267 + [[package]] 1268 + name = "ctr" 1269 + version = "0.9.2" 1270 + source = "registry+https://github.com/rust-lang/crates.io-index" 1271 + checksum = "0369ee1ad671834580515889b80f2ea915f23b8be8d0daa4bbaf2ac5c7590835" 1272 + dependencies = [ 1273 + "cipher", 1269 1274 ] 1270 1275 1271 1276 [[package]] ··· 1560 1565 dependencies = [ 1561 1566 "block-buffer 0.10.4", 1562 1567 "const-oid 0.9.6", 1563 - "crypto-common 0.1.6", 1568 + "crypto-common 0.1.7", 1564 1569 "subtle", 1565 1570 ] 1566 1571 ··· 1667 1672 "rand 0.8.5", 1668 1673 "rayon", 1669 1674 "regex", 1670 - "reqwest 0.12.28", 1675 + "reqwest", 1671 1676 "rig-core", 1672 1677 "rstest", 1673 1678 "schemars", ··· 1692 1697 "serde_json", 1693 1698 "syn 2.0.117", 1694 1699 ] 1695 - 1696 - [[package]] 1697 - name = "dunce" 1698 - version = "1.0.5" 1699 - source = "registry+https://github.com/rust-lang/crates.io-index" 1700 - checksum = "92773504d58c093f6de2459af4af33faa518c13451eb8f2b5698ed3d36e7c813" 1701 1700 1702 1701 [[package]] 1703 1702 name = "dyn-clone" ··· 2218 2217 ] 2219 2218 2220 2219 [[package]] 2221 - name = "fs_extra" 2222 - version = "1.3.0" 2223 - source = "registry+https://github.com/rust-lang/crates.io-index" 2224 - checksum = "42703706b716c37f96a77aea830392ad231f44c9e9a67872fa5548707e11b11c" 2225 - 2226 - [[package]] 2227 2220 name = "futures" 2228 2221 version = "0.3.32" 2229 2222 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 2360 2353 2361 2354 [[package]] 2362 2355 name = "generic-array" 2363 - version = "0.14.9" 2356 + version = "0.14.7" 2364 2357 source = "registry+https://github.com/rust-lang/crates.io-index" 2365 - checksum = "4bb6743198531e02858aeaea5398fcc883e71851fcbcb5a2f773e2fb6cb1edf2" 2358 + checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" 2366 2359 dependencies = [ 2367 2360 "typenum", 2368 2361 "version_check", ··· 2391 2384 "cfg-if", 2392 2385 "js-sys", 2393 2386 "libc", 2394 - "r-efi", 2387 + "r-efi 5.3.0", 2395 2388 "wasip2", 2396 2389 "wasm-bindgen", 2397 2390 ] 2398 2391 2399 2392 [[package]] 2400 2393 name = "getrandom" 2401 - version = "0.4.1" 2394 + version = "0.4.2" 2402 2395 source = "registry+https://github.com/rust-lang/crates.io-index" 2403 - checksum = "139ef39800118c7683f2fd3c98c1b23c09ae076556b435f8e9064ae108aaeeec" 2396 + checksum = "0de51e6874e94e7bf76d726fc5d13ba782deca734ff60d5bb2fb2607c7406555" 2404 2397 dependencies = [ 2405 2398 "cfg-if", 2406 2399 "js-sys", 2407 2400 "libc", 2408 - "r-efi", 2401 + "r-efi 6.0.0", 2409 2402 "rand_core 0.10.0", 2410 2403 "wasip2", 2411 2404 "wasip3", 2412 2405 "wasm-bindgen", 2406 + ] 2407 + 2408 + [[package]] 2409 + name = "ghash" 2410 + version = "0.5.1" 2411 + source = "registry+https://github.com/rust-lang/crates.io-index" 2412 + checksum = "f0d8a4362ccb29cb0b265253fb0a2728f592895ee6854fd9bc13f2ffda266ff1" 2413 + dependencies = [ 2414 + "opaque-debug", 2415 + "polyval", 2413 2416 ] 2414 2417 2415 2418 [[package]] ··· 2553 2556 "native-tls", 2554 2557 "num_cpus", 2555 2558 "rand 0.9.2", 2556 - "reqwest 0.12.28", 2559 + "reqwest", 2557 2560 "serde", 2558 2561 "serde_json", 2559 2562 "thiserror 2.0.18", ··· 2760 2763 "libc", 2761 2764 "percent-encoding", 2762 2765 "pin-project-lite", 2763 - "socket2 0.6.2", 2766 + "socket2 0.6.3", 2764 2767 "system-configuration", 2765 2768 "tokio", 2766 2769 "tower-service", ··· 2959 2962 ] 2960 2963 2961 2964 [[package]] 2965 + name = "inout" 2966 + version = "0.1.4" 2967 + source = "registry+https://github.com/rust-lang/crates.io-index" 2968 + checksum = "879f10e63c20629ecabbb64a8010319738c66a5cd0c29b02d63d272b03751d01" 2969 + dependencies = [ 2970 + "generic-array", 2971 + ] 2972 + 2973 + [[package]] 2962 2974 name = "integer-encoding" 2963 2975 version = "3.0.4" 2964 2976 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 3017 3029 3018 3030 [[package]] 3019 3031 name = "iroh" 3020 - version = "0.96.1" 3032 + version = "0.97.0" 3021 3033 source = "registry+https://github.com/rust-lang/crates.io-index" 3022 - checksum = "5236da4d5681f317ec393c8fe2b7e3d360d31c6bb40383991d0b7429ca5ad117" 3034 + checksum = "feb56e7e4b0ec7fba7efa6a236b016a52b5d927d50244aceb9e20566159b1a32" 3023 3035 dependencies = [ 3024 3036 "backon", 3025 3037 "bytes", ··· 3031 3043 "getrandom 0.3.4", 3032 3044 "hickory-resolver", 3033 3045 "http", 3034 - "igd-next", 3046 + "ipnet", 3035 3047 "iroh-base", 3036 3048 "iroh-metrics", 3037 - "iroh-quinn", 3038 - "iroh-quinn-proto", 3039 - "iroh-quinn-udp", 3040 3049 "iroh-relay", 3041 3050 "n0-error", 3042 3051 "n0-future", 3043 3052 "n0-watcher", 3044 - "netdev", 3045 3053 "netwatch", 3054 + "noq", 3055 + "noq-proto", 3056 + "noq-udp", 3046 3057 "papaya", 3047 3058 "pin-project", 3048 3059 "pkarr", 3049 3060 "pkcs8 0.11.0-rc.11", 3061 + "portable-atomic", 3050 3062 "portmapper", 3051 3063 "rand 0.9.2", 3052 - "reqwest 0.12.28", 3064 + "reqwest", 3053 3065 "rustc-hash", 3054 3066 "rustls", 3055 3067 "rustls-pki-types", ··· 3070 3082 3071 3083 [[package]] 3072 3084 name = "iroh-base" 3073 - version = "0.96.1" 3085 + version = "0.97.0" 3074 3086 source = "registry+https://github.com/rust-lang/crates.io-index" 3075 - checksum = "20c99d836a1c99e037e98d1bf3ef209c3a4df97555a00ce9510eb78eccdf5567" 3087 + checksum = "55a354e3396b62c14717ee807dfee9a7f43f6dad47e4ac0fd1d49f1ffad14ef0" 3076 3088 dependencies = [ 3077 3089 "curve25519-dalek 5.0.0-pre.1", 3078 3090 "data-encoding", ··· 3118 3130 3119 3131 [[package]] 3120 3132 name = "iroh-ping" 3121 - version = "0.8.0" 3133 + version = "0.9.0" 3122 3134 source = "registry+https://github.com/rust-lang/crates.io-index" 3123 - checksum = "ba655380275ef636ee6c10fd6c8340babf69b09f57c2b8f3f5a965d968682e25" 3135 + checksum = "ae0d3040396ce546281e3716e3fa88bcc425a99ab2fd2715484a86f050a5d36e" 3124 3136 dependencies = [ 3125 3137 "anyhow", 3126 3138 "iroh", ··· 3129 3141 ] 3130 3142 3131 3143 [[package]] 3132 - name = "iroh-quinn" 3133 - version = "0.16.1" 3134 - source = "registry+https://github.com/rust-lang/crates.io-index" 3135 - checksum = "034ed21f34c657a123d39525d948c885aacba59508805e4dd67d71f022e7151b" 3136 - dependencies = [ 3137 - "bytes", 3138 - "cfg_aliases", 3139 - "iroh-quinn-proto", 3140 - "iroh-quinn-udp", 3141 - "pin-project-lite", 3142 - "rustc-hash", 3143 - "rustls", 3144 - "socket2 0.6.2", 3145 - "thiserror 2.0.18", 3146 - "tokio", 3147 - "tokio-stream", 3148 - "tracing", 3149 - "web-time", 3150 - ] 3151 - 3152 - [[package]] 3153 - name = "iroh-quinn-proto" 3154 - version = "0.15.1" 3155 - source = "registry+https://github.com/rust-lang/crates.io-index" 3156 - checksum = "0de99ad8adc878ee0e68509ad256152ce23b8bbe45f5539d04e179630aca40a9" 3157 - dependencies = [ 3158 - "bytes", 3159 - "derive_more", 3160 - "enum-assoc", 3161 - "fastbloom", 3162 - "getrandom 0.3.4", 3163 - "identity-hash", 3164 - "lru-slab", 3165 - "rand 0.9.2", 3166 - "ring", 3167 - "rustc-hash", 3168 - "rustls", 3169 - "rustls-pki-types", 3170 - "slab", 3171 - "sorted-index-buffer", 3172 - "thiserror 2.0.18", 3173 - "tinyvec", 3174 - "tracing", 3175 - "web-time", 3176 - ] 3177 - 3178 - [[package]] 3179 - name = "iroh-quinn-udp" 3180 - version = "0.8.0" 3181 - source = "registry+https://github.com/rust-lang/crates.io-index" 3182 - checksum = "f981dadd5a072a9e0efcd24bdcc388e570073f7e51b33505ceb1ef4668c80c86" 3183 - dependencies = [ 3184 - "cfg_aliases", 3185 - "libc", 3186 - "socket2 0.6.2", 3187 - "tracing", 3188 - "windows-sys 0.61.2", 3189 - ] 3190 - 3191 - [[package]] 3192 3144 name = "iroh-relay" 3193 - version = "0.96.1" 3145 + version = "0.97.0" 3194 3146 source = "registry+https://github.com/rust-lang/crates.io-index" 3195 - checksum = "cd2b63e654b9dec799a73372cdc79b529ca6c7248c0c8de7da78a02e3a46f03c" 3147 + checksum = "d786b260cadfe82ae0b6a9e372e8c78949096a06c857d1c3521355cefced0f55" 3196 3148 dependencies = [ 3197 3149 "blake3", 3198 3150 "bytes", ··· 3207 3159 "hyper-util", 3208 3160 "iroh-base", 3209 3161 "iroh-metrics", 3210 - "iroh-quinn", 3211 - "iroh-quinn-proto", 3212 3162 "lru", 3213 3163 "n0-error", 3214 3164 "n0-future", 3165 + "noq", 3166 + "noq-proto", 3215 3167 "num_enum", 3216 3168 "pin-project", 3217 3169 "pkarr", 3218 3170 "postcard", 3219 3171 "rand 0.9.2", 3220 - "reqwest 0.12.28", 3172 + "reqwest", 3221 3173 "rustls", 3222 3174 "rustls-pki-types", 3223 3175 "serde", ··· 3236 3188 ] 3237 3189 3238 3190 [[package]] 3191 + name = "iroh-tickets" 3192 + version = "0.4.0" 3193 + source = "registry+https://github.com/rust-lang/crates.io-index" 3194 + checksum = "ab64bac4bb573b9cfd2142bd2876ed65ca792efbc4398361a4ee51a0f9afbed6" 3195 + dependencies = [ 3196 + "data-encoding", 3197 + "derive_more", 3198 + "iroh-base", 3199 + "n0-error", 3200 + "postcard", 3201 + "serde", 3202 + ] 3203 + 3204 + [[package]] 3239 3205 name = "is_terminal_polyfill" 3240 3206 version = "1.70.2" 3241 3207 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 3257 3223 checksum = "92ecc6618181def0457392ccd0ee51198e065e016d1d527a7ac1b6dc7c1f09d2" 3258 3224 3259 3225 [[package]] 3260 - name = "jni" 3261 - version = "0.21.1" 3262 - source = "registry+https://github.com/rust-lang/crates.io-index" 3263 - checksum = "1a87aa2bb7d2af34197c04845522473242e1aa17c12f4935d5856491a7fb8c97" 3264 - dependencies = [ 3265 - "cesu8", 3266 - "cfg-if", 3267 - "combine", 3268 - "jni-sys", 3269 - "log", 3270 - "thiserror 1.0.69", 3271 - "walkdir", 3272 - "windows-sys 0.45.0", 3273 - ] 3274 - 3275 - [[package]] 3276 - name = "jni-sys" 3277 - version = "0.3.0" 3278 - source = "registry+https://github.com/rust-lang/crates.io-index" 3279 - checksum = "8eaf4bc02d17cbdd7ff4c7438cafcdf7fb9a4613313ad11b4f8fefe7d3fa0130" 3280 - 3281 - [[package]] 3282 3226 name = "jobserver" 3283 3227 version = "0.1.34" 3284 3228 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 3420 3364 3421 3365 [[package]] 3422 3366 name = "libc" 3423 - version = "0.2.182" 3367 + version = "0.2.183" 3424 3368 source = "registry+https://github.com/rust-lang/crates.io-index" 3425 - checksum = "6800badb6cb2082ffd7b6a67e6125bb39f18782f793520caee8cb8846be06112" 3369 + checksum = "b5b646652bf6661599e1da8901b3b9522896f01e736bad5f723fe7a3a27f899d" 3426 3370 3427 3371 [[package]] 3428 3372 name = "libm" ··· 3535 3479 3536 3480 [[package]] 3537 3481 name = "lz4_flex" 3538 - version = "0.11.5" 3482 + version = "0.11.6" 3539 3483 source = "registry+https://github.com/rust-lang/crates.io-index" 3540 - checksum = "08ab2867e3eeeca90e844d1940eab391c9dc5228783db2ed999acbc0a9ed375a" 3484 + checksum = "373f5eceeeab7925e0c1098212f2fbc4d416adec9d35051a6ab251e824c1854a" 3541 3485 dependencies = [ 3542 3486 "twox-hash", 3543 3487 ] ··· 3838 3782 "libc", 3839 3783 "mac-addr", 3840 3784 "netlink-packet-core", 3841 - "netlink-packet-route 0.29.0", 3785 + "netlink-packet-route", 3842 3786 "netlink-sys", 3843 3787 "objc2-core-foundation", 3844 3788 "objc2-system-configuration", ··· 3858 3802 3859 3803 [[package]] 3860 3804 name = "netlink-packet-route" 3861 - version = "0.28.0" 3862 - source = "registry+https://github.com/rust-lang/crates.io-index" 3863 - checksum = "4ce3636fa715e988114552619582b530481fd5ef176a1e5c1bf024077c2c9445" 3864 - dependencies = [ 3865 - "bitflags", 3866 - "libc", 3867 - "log", 3868 - "netlink-packet-core", 3869 - ] 3870 - 3871 - [[package]] 3872 - name = "netlink-packet-route" 3873 3805 version = "0.29.0" 3874 3806 source = "registry+https://github.com/rust-lang/crates.io-index" 3875 3807 checksum = "df9854ea6ad14e3f4698a7f03b65bce0833dd2d81d594a0e4a984170537146b6" ··· 3909 3841 3910 3842 [[package]] 3911 3843 name = "netwatch" 3912 - version = "0.14.0" 3844 + version = "0.15.0" 3913 3845 source = "registry+https://github.com/rust-lang/crates.io-index" 3914 - checksum = "454b8c0759b2097581f25ed5180b4a1d14c324fde6d0734932a288e044d06232" 3846 + checksum = "3b1b27babe89ef9f2237bc6c028bea24fa84163a1b6f8f17ff93573ebd7d861f" 3915 3847 dependencies = [ 3916 3848 "atomic-waker", 3917 3849 "bytes", 3918 3850 "cfg_aliases", 3919 3851 "derive_more", 3920 - "iroh-quinn-udp", 3921 3852 "js-sys", 3922 3853 "libc", 3923 3854 "n0-error", ··· 3925 3856 "n0-watcher", 3926 3857 "netdev", 3927 3858 "netlink-packet-core", 3928 - "netlink-packet-route 0.28.0", 3859 + "netlink-packet-route", 3929 3860 "netlink-proto", 3930 3861 "netlink-sys", 3862 + "noq-udp", 3931 3863 "objc2-core-foundation", 3932 3864 "objc2-system-configuration", 3933 3865 "pin-project-lite", 3934 3866 "serde", 3935 - "socket2 0.6.2", 3867 + "socket2 0.6.3", 3936 3868 "time", 3937 3869 "tokio", 3938 3870 "tokio-util", ··· 4002 3934 ] 4003 3935 4004 3936 [[package]] 3937 + name = "noq" 3938 + version = "0.17.0" 3939 + source = "registry+https://github.com/rust-lang/crates.io-index" 3940 + checksum = "8df966fb44ac763bc86da97fa6c811c54ae82ef656575949f93c6dae0c9f09bf" 3941 + dependencies = [ 3942 + "bytes", 3943 + "cfg_aliases", 3944 + "noq-proto", 3945 + "noq-udp", 3946 + "pin-project-lite", 3947 + "rustc-hash", 3948 + "rustls", 3949 + "socket2 0.6.3", 3950 + "thiserror 2.0.18", 3951 + "tokio", 3952 + "tokio-stream", 3953 + "tracing", 3954 + "web-time", 3955 + ] 3956 + 3957 + [[package]] 3958 + name = "noq-proto" 3959 + version = "0.16.0" 3960 + source = "registry+https://github.com/rust-lang/crates.io-index" 3961 + checksum = "5c61b72abd670eebc05b5cf720e077b04a3ef3354bc7bc19f1c3524cb424db7b" 3962 + dependencies = [ 3963 + "aes-gcm", 3964 + "bytes", 3965 + "derive_more", 3966 + "enum-assoc", 3967 + "fastbloom", 3968 + "getrandom 0.3.4", 3969 + "identity-hash", 3970 + "lru-slab", 3971 + "rand 0.9.2", 3972 + "ring", 3973 + "rustc-hash", 3974 + "rustls", 3975 + "rustls-pki-types", 3976 + "slab", 3977 + "sorted-index-buffer", 3978 + "thiserror 2.0.18", 3979 + "tinyvec", 3980 + "tracing", 3981 + "web-time", 3982 + ] 3983 + 3984 + [[package]] 3985 + name = "noq-udp" 3986 + version = "0.9.0" 3987 + source = "registry+https://github.com/rust-lang/crates.io-index" 3988 + checksum = "bb9be4fedd6b98f3ba82ccd3506f4d0219fb723c3f97c67e12fe1494aa020e44" 3989 + dependencies = [ 3990 + "cfg_aliases", 3991 + "libc", 3992 + "socket2 0.6.3", 3993 + "tracing", 3994 + "windows-sys 0.61.2", 3995 + ] 3996 + 3997 + [[package]] 4005 3998 name = "ntimestamp" 4006 3999 version = "1.0.0" 4007 4000 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 4117 4110 4118 4111 [[package]] 4119 4112 name = "num_enum" 4120 - version = "0.7.5" 4113 + version = "0.7.6" 4121 4114 source = "registry+https://github.com/rust-lang/crates.io-index" 4122 - checksum = "b1207a7e20ad57b847bbddc6776b968420d38292bbfe2089accff5e19e82454c" 4115 + checksum = "5d0bca838442ec211fa11de3a8b0e0e8f3a4522575b5c4c06ed722e005036f26" 4123 4116 dependencies = [ 4124 4117 "num_enum_derive", 4125 4118 "rustversion", ··· 4127 4120 4128 4121 [[package]] 4129 4122 name = "num_enum_derive" 4130 - version = "0.7.5" 4123 + version = "0.7.6" 4131 4124 source = "registry+https://github.com/rust-lang/crates.io-index" 4132 - checksum = "ff32365de1b6743cb203b710788263c44a03de03802daf96092f2da4fe6ba4d7" 4125 + checksum = "680998035259dcfcafe653688bf2aa6d3e2dc05e98be6ab46afb089dc84f1df8" 4133 4126 dependencies = [ 4134 4127 "proc-macro-crate", 4135 4128 "proc-macro2", ··· 4207 4200 4208 4201 [[package]] 4209 4202 name = "once_cell" 4210 - version = "1.21.3" 4203 + version = "1.21.4" 4211 4204 source = "registry+https://github.com/rust-lang/crates.io-index" 4212 - checksum = "42f5e15c9953c5e4ccceeb2e7382a716482c34515315f7b03532b8b4e8393d2d" 4205 + checksum = "9f7c3e4beb33f85d45ae3e3a1792185706c8e16d043238c593331cc7cd313b50" 4213 4206 dependencies = [ 4214 4207 "critical-section", 4215 4208 "portable-atomic", ··· 4222 4215 checksum = "384b8ab6d37215f3c5301a95a4accb5d64aa607f1fcb26a11b5303878451b4fe" 4223 4216 4224 4217 [[package]] 4218 + name = "opaque-debug" 4219 + version = "0.3.1" 4220 + source = "registry+https://github.com/rust-lang/crates.io-index" 4221 + checksum = "c08d65885ee38876c4f86fa503fb49d7b507c2b62552df7c70b2fce627e06381" 4222 + 4223 + [[package]] 4225 4224 name = "openssl" 4226 - version = "0.10.75" 4225 + version = "0.10.76" 4227 4226 source = "registry+https://github.com/rust-lang/crates.io-index" 4228 - checksum = "08838db121398ad17ab8531ce9de97b244589089e290a384c900cb9ff7434328" 4227 + checksum = "951c002c75e16ea2c65b8c7e4d3d51d5530d8dfa7d060b4776828c88cfb18ecf" 4229 4228 dependencies = [ 4230 4229 "bitflags", 4231 4230 "cfg-if", ··· 4255 4254 4256 4255 [[package]] 4257 4256 name = "openssl-sys" 4258 - version = "0.9.111" 4257 + version = "0.9.112" 4259 4258 source = "registry+https://github.com/rust-lang/crates.io-index" 4260 - checksum = "82cab2d520aa75e3c58898289429321eb788c3106963d0dc886ec7a5f4adc321" 4259 + checksum = "57d55af3b3e226502be1526dfdba67ab0e9c96fc293004e79576b2b9edb0dbdb" 4261 4260 dependencies = [ 4262 4261 "cc", 4263 4262 "libc", ··· 4474 4473 source = "registry+https://github.com/rust-lang/crates.io-index" 4475 4474 checksum = "2f950360d31be432c0c9467fba5024a94f55128e7f32bc9d32db140369f24c77" 4476 4475 dependencies = [ 4477 - "async-compat", 4478 4476 "base32", 4479 4477 "bytes", 4480 4478 "cfg_aliases", 4481 4479 "document-features", 4482 - "dyn-clone", 4483 4480 "ed25519-dalek 3.0.0-pre.1", 4484 - "futures-buffered", 4485 - "futures-lite", 4486 - "getrandom 0.4.1", 4487 - "log", 4488 - "lru", 4481 + "getrandom 0.4.2", 4489 4482 "ntimestamp", 4490 - "reqwest 0.13.2", 4491 4483 "self_cell", 4492 4484 "serde", 4493 - "sha1_smol", 4494 4485 "simple-dns", 4495 4486 "thiserror 2.0.18", 4496 - "tokio", 4497 - "tracing", 4498 - "url", 4499 - "wasm-bindgen-futures", 4500 4487 ] 4501 4488 4502 4489 [[package]] ··· 4550 4537 "pin-project-lite", 4551 4538 "rustix", 4552 4539 "windows-sys 0.61.2", 4540 + ] 4541 + 4542 + [[package]] 4543 + name = "polyval" 4544 + version = "0.6.2" 4545 + source = "registry+https://github.com/rust-lang/crates.io-index" 4546 + checksum = "9d1fe60d06143b2430aa532c94cfe9e29783047f06c0d7fd359a9a51b729fa25" 4547 + dependencies = [ 4548 + "cfg-if", 4549 + "cpufeatures", 4550 + "opaque-debug", 4551 + "universal-hash", 4553 4552 ] 4554 4553 4555 4554 [[package]] ··· 4563 4562 4564 4563 [[package]] 4565 4564 name = "portmapper" 4566 - version = "0.14.0" 4565 + version = "0.15.0" 4567 4566 source = "registry+https://github.com/rust-lang/crates.io-index" 4568 - checksum = "7d2a8825353ace3285138da3378b1e21860d60351942f7aa3b99b13b41f80318" 4567 + checksum = "74748bc706fa6b6aebac6bbe0bbe0de806b384cb5c557ea974f771360a4e3858" 4569 4568 dependencies = [ 4570 4569 "base64", 4571 4570 "bytes", ··· 4582 4581 "rand 0.9.2", 4583 4582 "serde", 4584 4583 "smallvec", 4585 - "socket2 0.6.2", 4584 + "socket2 0.6.3", 4586 4585 "time", 4587 4586 "tokio", 4588 4587 "tokio-util", ··· 4661 4660 4662 4661 [[package]] 4663 4662 name = "proc-macro-crate" 4664 - version = "3.4.0" 4663 + version = "3.5.0" 4665 4664 source = "registry+https://github.com/rust-lang/crates.io-index" 4666 - checksum = "219cb19e96be00ab2e37d6e299658a0cfa83e52429179969b0f0121b4ac46983" 4665 + checksum = "e67ba7e9b2b56446f1d419b1d807906278ffa1a658a8a5d8a39dcb1f5a78614f" 4667 4666 dependencies = [ 4668 4667 "toml_edit", 4669 4668 ] ··· 4710 4709 "quinn-udp", 4711 4710 "rustc-hash", 4712 4711 "rustls", 4713 - "socket2 0.6.2", 4712 + "socket2 0.6.3", 4714 4713 "thiserror 2.0.18", 4715 4714 "tokio", 4716 4715 "tracing", ··· 4723 4722 source = "registry+https://github.com/rust-lang/crates.io-index" 4724 4723 checksum = "434b42fec591c96ef50e21e886936e66d3cc3f737104fdb9b737c40ffb94c098" 4725 4724 dependencies = [ 4726 - "aws-lc-rs", 4727 4725 "bytes", 4728 4726 "getrandom 0.3.4", 4729 4727 "lru-slab", ··· 4748 4746 "cfg_aliases", 4749 4747 "libc", 4750 4748 "once_cell", 4751 - "socket2 0.6.2", 4749 + "socket2 0.6.3", 4752 4750 "tracing", 4753 4751 "windows-sys 0.60.2", 4754 4752 ] 4755 4753 4756 4754 [[package]] 4757 4755 name = "quote" 4758 - version = "1.0.44" 4756 + version = "1.0.45" 4759 4757 source = "registry+https://github.com/rust-lang/crates.io-index" 4760 - checksum = "21b2ebcf727b7760c461f091f9f0f539b77b8e87f2fd88131e7f1b433b3cece4" 4758 + checksum = "41f2619966050689382d2b44f664f4bc593e129785a36d6ee376ddf37259b924" 4761 4759 dependencies = [ 4762 4760 "proc-macro2", 4763 4761 ] ··· 4767 4765 version = "5.3.0" 4768 4766 source = "registry+https://github.com/rust-lang/crates.io-index" 4769 4767 checksum = "69cdb34c158ceb288df11e18b4bd39de994f6657d83847bdffdbd7f346754b0f" 4768 + 4769 + [[package]] 4770 + name = "r-efi" 4771 + version = "6.0.0" 4772 + source = "registry+https://github.com/rust-lang/crates.io-index" 4773 + checksum = "f8dcc9c7d52a811697d2151c701e0d08956f92b0e24136cf4cf27b57a6a0d9bf" 4770 4774 4771 4775 [[package]] 4772 4776 name = "radix_trie" ··· 4805 4809 source = "registry+https://github.com/rust-lang/crates.io-index" 4806 4810 checksum = "bc266eb313df6c5c09c1c7b1fbe2510961e5bcd3add930c1e31f7ed9da0feff8" 4807 4811 dependencies = [ 4808 - "getrandom 0.4.1", 4812 + "getrandom 0.4.2", 4809 4813 "rand_core 0.10.0", 4810 4814 ] 4811 4815 ··· 5007 5011 ] 5008 5012 5009 5013 [[package]] 5010 - name = "reqwest" 5011 - version = "0.13.2" 5012 - source = "registry+https://github.com/rust-lang/crates.io-index" 5013 - checksum = "ab3f43e3283ab1488b624b44b0e988d0acea0b3214e694730a055cb6b2efa801" 5014 - dependencies = [ 5015 - "base64", 5016 - "bytes", 5017 - "futures-core", 5018 - "http", 5019 - "http-body", 5020 - "http-body-util", 5021 - "hyper", 5022 - "hyper-rustls", 5023 - "hyper-util", 5024 - "js-sys", 5025 - "log", 5026 - "percent-encoding", 5027 - "pin-project-lite", 5028 - "quinn", 5029 - "rustls", 5030 - "rustls-pki-types", 5031 - "rustls-platform-verifier", 5032 - "sync_wrapper", 5033 - "tokio", 5034 - "tokio-rustls", 5035 - "tower", 5036 - "tower-http", 5037 - "tower-service", 5038 - "url", 5039 - "wasm-bindgen", 5040 - "wasm-bindgen-futures", 5041 - "web-sys", 5042 - ] 5043 - 5044 - [[package]] 5045 5014 name = "reqwest-eventsource" 5046 5015 version = "0.6.0" 5047 5016 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 5053 5022 "mime", 5054 5023 "nom 7.1.3", 5055 5024 "pin-project-lite", 5056 - "reqwest 0.12.28", 5025 + "reqwest", 5057 5026 "thiserror 1.0.69", 5058 5027 ] 5059 5028 ··· 5088 5057 "http", 5089 5058 "mime_guess", 5090 5059 "ordered-float 5.1.0", 5091 - "reqwest 0.12.28", 5060 + "reqwest", 5092 5061 "reqwest-eventsource", 5093 5062 "schemars", 5094 5063 "serde", ··· 5213 5182 source = "registry+https://github.com/rust-lang/crates.io-index" 5214 5183 checksum = "758025cb5fccfd3bc2fd74708fd4682be41d99e5dff73c377c0646c6012c73a4" 5215 5184 dependencies = [ 5216 - "aws-lc-rs", 5217 5185 "log", 5218 5186 "once_cell", 5219 5187 "ring", ··· 5224 5192 ] 5225 5193 5226 5194 [[package]] 5227 - name = "rustls-native-certs" 5228 - version = "0.8.3" 5229 - source = "registry+https://github.com/rust-lang/crates.io-index" 5230 - checksum = "612460d5f7bea540c490b2b6395d8e34a953e52b491accd6c86c8164c5932a63" 5231 - dependencies = [ 5232 - "openssl-probe", 5233 - "rustls-pki-types", 5234 - "schannel", 5235 - "security-framework 3.7.0", 5236 - ] 5237 - 5238 - [[package]] 5239 5195 name = "rustls-pki-types" 5240 5196 version = "1.14.0" 5241 5197 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 5246 5202 ] 5247 5203 5248 5204 [[package]] 5249 - name = "rustls-platform-verifier" 5250 - version = "0.6.2" 5251 - source = "registry+https://github.com/rust-lang/crates.io-index" 5252 - checksum = "1d99feebc72bae7ab76ba994bb5e121b8d83d910ca40b36e0921f53becc41784" 5253 - dependencies = [ 5254 - "core-foundation 0.10.1", 5255 - "core-foundation-sys", 5256 - "jni", 5257 - "log", 5258 - "once_cell", 5259 - "rustls", 5260 - "rustls-native-certs", 5261 - "rustls-platform-verifier-android", 5262 - "rustls-webpki", 5263 - "security-framework 3.7.0", 5264 - "security-framework-sys", 5265 - "webpki-root-certs", 5266 - "windows-sys 0.61.2", 5267 - ] 5268 - 5269 - [[package]] 5270 - name = "rustls-platform-verifier-android" 5271 - version = "0.1.1" 5272 - source = "registry+https://github.com/rust-lang/crates.io-index" 5273 - checksum = "f87165f0995f63a9fbeea62b64d10b4d9d8e78ec6d7d51fb2125fda7bb36788f" 5274 - 5275 - [[package]] 5276 5205 name = "rustls-webpki" 5277 5206 version = "0.103.9" 5278 5207 source = "registry+https://github.com/rust-lang/crates.io-index" 5279 5208 checksum = "d7df23109aa6c1567d1c575b9952556388da57401e4ace1d15f79eedad0d8f53" 5280 5209 dependencies = [ 5281 - "aws-lc-rs", 5282 5210 "ring", 5283 5211 "rustls-pki-types", 5284 5212 "untrusted", ··· 5319 5247 checksum = "9774ba4a74de5f7b1c1451ed6cd5285a32eddb5cccb8cc655a4e50009e06477f" 5320 5248 5321 5249 [[package]] 5322 - name = "same-file" 5323 - version = "1.0.6" 5324 - source = "registry+https://github.com/rust-lang/crates.io-index" 5325 - checksum = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502" 5326 - dependencies = [ 5327 - "winapi-util", 5328 - ] 5329 - 5330 - [[package]] 5331 5250 name = "scc" 5332 5251 version = "2.4.0" 5333 5252 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 5338 5257 5339 5258 [[package]] 5340 5259 name = "schannel" 5341 - version = "0.1.28" 5260 + version = "0.1.29" 5342 5261 source = "registry+https://github.com/rust-lang/crates.io-index" 5343 - checksum = "891d81b926048e76efe18581bf793546b4c0eaf8448d72be8de2bbee5fd166e1" 5262 + checksum = "91c1b7e4904c873ef0710c1f407dde2e6287de2bebc1bbbf7d430bb7cbffd939" 5344 5263 dependencies = [ 5345 5264 "windows-sys 0.61.2", 5346 5265 ] ··· 5618 5537 ] 5619 5538 5620 5539 [[package]] 5621 - name = "sha1_smol" 5622 - version = "1.0.1" 5623 - source = "registry+https://github.com/rust-lang/crates.io-index" 5624 - checksum = "bbfa15b3dddfee50a0fff136974b3e1bde555604ba463834a7eb7deb6417705d" 5625 - 5626 - [[package]] 5627 5540 name = "sha2" 5628 5541 version = "0.10.9" 5629 5542 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 5749 5662 5750 5663 [[package]] 5751 5664 name = "socket2" 5752 - version = "0.6.2" 5665 + version = "0.6.3" 5753 5666 source = "registry+https://github.com/rust-lang/crates.io-index" 5754 - checksum = "86f4aa3ad99f2088c990dfa82d367e19cb29268ed67c574d10d0a4bfe71f07e0" 5667 + checksum = "3a766e1110788c36f4fa1c2b71b387a7815aa65f88ce0229841826633d93723e" 5755 5668 dependencies = [ 5756 5669 "libc", 5757 - "windows-sys 0.60.2", 5670 + "windows-sys 0.61.2", 5758 5671 ] 5759 5672 5760 5673 [[package]] ··· 5852 5765 5853 5766 [[package]] 5854 5767 name = "strum" 5855 - version = "0.27.2" 5768 + version = "0.28.0" 5856 5769 source = "registry+https://github.com/rust-lang/crates.io-index" 5857 - checksum = "af23d6f6c1a224baef9d3f61e287d2761385a5b88fdab4eb4c6f11aeb54c4bcf" 5770 + checksum = "9628de9b8791db39ceda2b119bbe13134770b56c138ec1d3af810d045c04f9bd" 5858 5771 dependencies = [ 5859 5772 "strum_macros", 5860 5773 ] 5861 5774 5862 5775 [[package]] 5863 5776 name = "strum_macros" 5864 - version = "0.27.2" 5777 + version = "0.28.0" 5865 5778 source = "registry+https://github.com/rust-lang/crates.io-index" 5866 - checksum = "7695ce3845ea4b33927c055a39dc438a45b059f7c1b3d91d38d10355fb8cbca7" 5779 + checksum = "ab85eea0270ee17587ed4156089e10b9e6880ee688791d45a905f5b1ca36f664" 5867 5780 dependencies = [ 5868 5781 "heck", 5869 5782 "proc-macro2", ··· 5948 5861 5949 5862 [[package]] 5950 5863 name = "tempfile" 5951 - version = "3.26.0" 5864 + version = "3.27.0" 5952 5865 source = "registry+https://github.com/rust-lang/crates.io-index" 5953 - checksum = "82a72c767771b47409d2345987fda8628641887d5466101319899796367354a0" 5866 + checksum = "32497e9a4c7b38532efcdebeef879707aa9f794296a4f0244f6f69e9bc8574bd" 5954 5867 dependencies = [ 5955 5868 "fastrand", 5956 - "getrandom 0.4.1", 5869 + "getrandom 0.4.2", 5957 5870 "once_cell", 5958 5871 "rustix", 5959 5872 "windows-sys 0.61.2", ··· 6053 5966 "anyhow", 6054 5967 "async-std", 6055 5968 "axum", 5969 + "axum-macros", 6056 5970 "clap", 6057 5971 "futures-util", 6058 5972 "hf-hub", 6059 5973 "iroh", 6060 5974 "iroh-ping", 5975 + "iroh-tickets", 6061 5976 "keyring", 6062 5977 "owo-colors", 6063 - "reqwest 0.12.28", 5978 + "reqwest", 6064 5979 "rusqlite", 6065 5980 "rusqlite_migration", 6066 5981 "rustyline", ··· 6071 5986 "tempfile", 6072 5987 "tilekit", 6073 5988 "tokio", 6074 - "toml 1.0.3+spec-1.1.0", 5989 + "toml 1.0.6+spec-1.1.0", 6075 5990 "uuid", 6076 5991 "wiremock", 6077 5992 ] ··· 6131 6046 6132 6047 [[package]] 6133 6048 name = "tinyvec" 6134 - version = "1.10.0" 6049 + version = "1.11.0" 6135 6050 source = "registry+https://github.com/rust-lang/crates.io-index" 6136 - checksum = "bfa5fdc3bce6191a1dbc8c02d5c8bffcf557bafa17c124c5264a458f1b0613fa" 6051 + checksum = "3e61e67053d25a4e82c844e8424039d9745781b3fc4f32b8d55ed50f5f667ef3" 6137 6052 dependencies = [ 6138 6053 "tinyvec_macros", 6139 6054 ] ··· 6146 6061 6147 6062 [[package]] 6148 6063 name = "tokio" 6149 - version = "1.49.0" 6064 + version = "1.50.0" 6150 6065 source = "registry+https://github.com/rust-lang/crates.io-index" 6151 - checksum = "72a2903cd7736441aac9df9d7688bd0ce48edccaadf181c3b90be801e81d3d86" 6066 + checksum = "27ad5e34374e03cfffefc301becb44e9dc3c17584f414349ebe29ed26661822d" 6152 6067 dependencies = [ 6153 6068 "bytes", 6154 6069 "libc", ··· 6156 6071 "parking_lot", 6157 6072 "pin-project-lite", 6158 6073 "signal-hook-registry", 6159 - "socket2 0.6.2", 6074 + "socket2 0.6.3", 6160 6075 "tokio-macros", 6161 6076 "windows-sys 0.61.2", 6162 6077 ] ··· 6257 6172 6258 6173 [[package]] 6259 6174 name = "toml" 6260 - version = "1.0.3+spec-1.1.0" 6175 + version = "1.0.6+spec-1.1.0" 6261 6176 source = "registry+https://github.com/rust-lang/crates.io-index" 6262 - checksum = "c7614eaf19ad818347db24addfa201729cf2a9b6fdfd9eb0ab870fcacc606c0c" 6177 + checksum = "399b1124a3c9e16766831c6bba21e50192572cdd98706ea114f9502509686ffc" 6263 6178 dependencies = [ 6264 6179 "indexmap", 6265 6180 "serde_core", ··· 6290 6205 6291 6206 [[package]] 6292 6207 name = "toml_edit" 6293 - version = "0.23.10+spec-1.0.0" 6208 + version = "0.25.4+spec-1.1.0" 6294 6209 source = "registry+https://github.com/rust-lang/crates.io-index" 6295 - checksum = "84c8b9f757e028cee9fa244aea147aab2a9ec09d5325a9b01e0a49730c2b5269" 6210 + checksum = "7193cbd0ce53dc966037f54351dbbcf0d5a642c7f0038c382ef9e677ce8c13f2" 6296 6211 dependencies = [ 6297 6212 "indexmap", 6298 - "toml_datetime 0.7.5+spec-1.1.0", 6213 + "toml_datetime 1.0.0+spec-1.1.0", 6299 6214 "toml_parser", 6300 6215 "winnow", 6301 6216 ] ··· 6419 6334 6420 6335 [[package]] 6421 6336 name = "tracing-subscriber" 6422 - version = "0.3.22" 6337 + version = "0.3.23" 6423 6338 source = "registry+https://github.com/rust-lang/crates.io-index" 6424 - checksum = "2f30143827ddab0d256fd843b7a66d164e9f271cfa0dde49142c5ca0ca291f1e" 6339 + checksum = "cb7f578e5945fb242538965c2d0b04418d38ec25c79d160cd279bf0731c8d319" 6425 6340 dependencies = [ 6426 6341 "matchers", 6427 6342 "nu-ansi-term", ··· 6512 6427 checksum = "ebc1c04c71510c7f702b52b7c350734c9ff1295c464a03335b00bb84fc54f853" 6513 6428 6514 6429 [[package]] 6430 + name = "universal-hash" 6431 + version = "0.5.1" 6432 + source = "registry+https://github.com/rust-lang/crates.io-index" 6433 + checksum = "fc1de2c688dc15305988b563c3854064043356019f97a4b46276fe734c4f07ea" 6434 + dependencies = [ 6435 + "crypto-common 0.1.7", 6436 + "subtle", 6437 + ] 6438 + 6439 + [[package]] 6515 6440 name = "unsigned-varint" 6516 6441 version = "0.8.0" 6517 6442 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 6570 6495 6571 6496 [[package]] 6572 6497 name = "uuid" 6573 - version = "1.21.0" 6498 + version = "1.22.0" 6574 6499 source = "registry+https://github.com/rust-lang/crates.io-index" 6575 - checksum = "b672338555252d43fd2240c714dc444b8c6fb0a5c5335e65a07bba7742735ddb" 6500 + checksum = "a68d3c8f01c0cfa54a75291d83601161799e4a89a39e0929f4b0354d88757a37" 6576 6501 dependencies = [ 6577 - "getrandom 0.4.1", 6502 + "getrandom 0.4.2", 6578 6503 "js-sys", 6579 6504 "wasm-bindgen", 6580 6505 ] ··· 6671 6596 checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a" 6672 6597 6673 6598 [[package]] 6674 - name = "walkdir" 6675 - version = "2.5.0" 6676 - source = "registry+https://github.com/rust-lang/crates.io-index" 6677 - checksum = "29790946404f91d9c5d06f9874efddea1dc06c5efe94541a7d6863108e3a5e4b" 6678 - dependencies = [ 6679 - "same-file", 6680 - "winapi-util", 6681 - ] 6682 - 6683 - [[package]] 6684 6599 name = "want" 6685 6600 version = "0.3.1" 6686 6601 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 6840 6755 ] 6841 6756 6842 6757 [[package]] 6843 - name = "webpki-root-certs" 6844 - version = "1.0.6" 6845 - source = "registry+https://github.com/rust-lang/crates.io-index" 6846 - checksum = "804f18a4ac2676ffb4e8b5b5fa9ae38af06df08162314f96a68d2a363e21a8ca" 6847 - dependencies = [ 6848 - "rustls-pki-types", 6849 - ] 6850 - 6851 - [[package]] 6852 6758 name = "webpki-roots" 6853 6759 version = "0.26.11" 6854 6760 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 6889 6795 checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" 6890 6796 6891 6797 [[package]] 6892 - name = "winapi-util" 6893 - version = "0.1.11" 6894 - source = "registry+https://github.com/rust-lang/crates.io-index" 6895 - checksum = "c2a7b1c03c876122aa43f3020e6c3c3ee5c05081c9a00739faf7503aeba10d22" 6896 - dependencies = [ 6897 - "windows-sys 0.61.2", 6898 - ] 6899 - 6900 - [[package]] 6901 6798 name = "winapi-x86_64-pc-windows-gnu" 6902 6799 version = "0.4.0" 6903 6800 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 7017 6914 7018 6915 [[package]] 7019 6916 name = "windows-sys" 7020 - version = "0.45.0" 7021 - source = "registry+https://github.com/rust-lang/crates.io-index" 7022 - checksum = "75283be5efb2831d37ea142365f009c02ec203cd29a3ebecbc093d52315b66d0" 7023 - dependencies = [ 7024 - "windows-targets 0.42.2", 7025 - ] 7026 - 7027 - [[package]] 7028 - name = "windows-sys" 7029 6917 version = "0.48.0" 7030 6918 source = "registry+https://github.com/rust-lang/crates.io-index" 7031 6919 checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" ··· 7071 6959 7072 6960 [[package]] 7073 6961 name = "windows-targets" 7074 - version = "0.42.2" 7075 - source = "registry+https://github.com/rust-lang/crates.io-index" 7076 - checksum = "8e5180c00cd44c9b1c88adb3693291f1cd93605ded80c250a75d472756b4d071" 7077 - dependencies = [ 7078 - "windows_aarch64_gnullvm 0.42.2", 7079 - "windows_aarch64_msvc 0.42.2", 7080 - "windows_i686_gnu 0.42.2", 7081 - "windows_i686_msvc 0.42.2", 7082 - "windows_x86_64_gnu 0.42.2", 7083 - "windows_x86_64_gnullvm 0.42.2", 7084 - "windows_x86_64_msvc 0.42.2", 7085 - ] 7086 - 7087 - [[package]] 7088 - name = "windows-targets" 7089 6962 version = "0.48.5" 7090 6963 source = "registry+https://github.com/rust-lang/crates.io-index" 7091 6964 checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c" ··· 7143 7016 7144 7017 [[package]] 7145 7018 name = "windows_aarch64_gnullvm" 7146 - version = "0.42.2" 7147 - source = "registry+https://github.com/rust-lang/crates.io-index" 7148 - checksum = "597a5118570b68bc08d8d59125332c54f1ba9d9adeedeef5b99b02ba2b0698f8" 7149 - 7150 - [[package]] 7151 - name = "windows_aarch64_gnullvm" 7152 7019 version = "0.48.5" 7153 7020 source = "registry+https://github.com/rust-lang/crates.io-index" 7154 7021 checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" ··· 7167 7034 7168 7035 [[package]] 7169 7036 name = "windows_aarch64_msvc" 7170 - version = "0.42.2" 7171 - source = "registry+https://github.com/rust-lang/crates.io-index" 7172 - checksum = "e08e8864a60f06ef0d0ff4ba04124db8b0fb3be5776a5cd47641e942e58c4d43" 7173 - 7174 - [[package]] 7175 - name = "windows_aarch64_msvc" 7176 7037 version = "0.48.5" 7177 7038 source = "registry+https://github.com/rust-lang/crates.io-index" 7178 7039 checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" ··· 7191 7052 7192 7053 [[package]] 7193 7054 name = "windows_i686_gnu" 7194 - version = "0.42.2" 7195 - source = "registry+https://github.com/rust-lang/crates.io-index" 7196 - checksum = "c61d927d8da41da96a81f029489353e68739737d3beca43145c8afec9a31a84f" 7197 - 7198 - [[package]] 7199 - name = "windows_i686_gnu" 7200 7055 version = "0.48.5" 7201 7056 source = "registry+https://github.com/rust-lang/crates.io-index" 7202 7057 checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" ··· 7227 7082 7228 7083 [[package]] 7229 7084 name = "windows_i686_msvc" 7230 - version = "0.42.2" 7231 - source = "registry+https://github.com/rust-lang/crates.io-index" 7232 - checksum = "44d840b6ec649f480a41c8d80f9c65108b92d89345dd94027bfe06ac444d1060" 7233 - 7234 - [[package]] 7235 - name = "windows_i686_msvc" 7236 7085 version = "0.48.5" 7237 7086 source = "registry+https://github.com/rust-lang/crates.io-index" 7238 7087 checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" ··· 7251 7100 7252 7101 [[package]] 7253 7102 name = "windows_x86_64_gnu" 7254 - version = "0.42.2" 7255 - source = "registry+https://github.com/rust-lang/crates.io-index" 7256 - checksum = "8de912b8b8feb55c064867cf047dda097f92d51efad5b491dfb98f6bbb70cb36" 7257 - 7258 - [[package]] 7259 - name = "windows_x86_64_gnu" 7260 7103 version = "0.48.5" 7261 7104 source = "registry+https://github.com/rust-lang/crates.io-index" 7262 7105 checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" ··· 7272 7115 version = "0.53.1" 7273 7116 source = "registry+https://github.com/rust-lang/crates.io-index" 7274 7117 checksum = "9c3842cdd74a865a8066ab39c8a7a473c0778a3f29370b5fd6b4b9aa7df4a499" 7275 - 7276 - [[package]] 7277 - name = "windows_x86_64_gnullvm" 7278 - version = "0.42.2" 7279 - source = "registry+https://github.com/rust-lang/crates.io-index" 7280 - checksum = "26d41b46a36d453748aedef1486d5c7a85db22e56aff34643984ea85514e94a3" 7281 7118 7282 7119 [[package]] 7283 7120 name = "windows_x86_64_gnullvm" ··· 7299 7136 7300 7137 [[package]] 7301 7138 name = "windows_x86_64_msvc" 7302 - version = "0.42.2" 7303 - source = "registry+https://github.com/rust-lang/crates.io-index" 7304 - checksum = "9aec5da331524158c6d1a4ac0ab1541149c0b9505fde06423b02f5ef0106b9f0" 7305 - 7306 - [[package]] 7307 - name = "windows_x86_64_msvc" 7308 7139 version = "0.48.5" 7309 7140 source = "registry+https://github.com/rust-lang/crates.io-index" 7310 7141 checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" ··· 7323 7154 7324 7155 [[package]] 7325 7156 name = "winnow" 7326 - version = "0.7.14" 7157 + version = "0.7.15" 7327 7158 source = "registry+https://github.com/rust-lang/crates.io-index" 7328 - checksum = "5a5364e9d77fcdeeaa6062ced926ee3381faa2ee02d3eb83a5c27a8825540829" 7159 + checksum = "df79d97927682d2fd8adb29682d1140b343be4ac0f08fd68b7765d9c059d3945" 7329 7160 dependencies = [ 7330 7161 "memchr", 7331 7162 ] ··· 7537 7368 7538 7369 [[package]] 7539 7370 name = "zerocopy" 7540 - version = "0.8.40" 7371 + version = "0.8.42" 7541 7372 source = "registry+https://github.com/rust-lang/crates.io-index" 7542 - checksum = "a789c6e490b576db9f7e6b6d661bcc9799f7c0ac8352f56ea20193b2681532e5" 7373 + checksum = "f2578b716f8a7a858b7f02d5bd870c14bf4ddbbcf3a4c05414ba6503640505e3" 7543 7374 dependencies = [ 7544 7375 "zerocopy-derive", 7545 7376 ] 7546 7377 7547 7378 [[package]] 7548 7379 name = "zerocopy-derive" 7549 - version = "0.8.40" 7380 + version = "0.8.42" 7550 7381 source = "registry+https://github.com/rust-lang/crates.io-index" 7551 - checksum = "f65c489a7071a749c849713807783f70672b28094011623e200cb86dcb835953" 7382 + checksum = "7e6cc098ea4d3bd6246687de65af3f920c430e236bee1e3bf2e441463f08a02f" 7552 7383 dependencies = [ 7553 7384 "proc-macro2", 7554 7385 "quote",
+3 -1
modelfiles/qwen
··· 1 - FROM mlx-community/Qwen3.5-4B-MLX-4bit 1 + FROM mlx-community/Qwen3.5-0.8B-8bit 2 + # FROM mlx-community/Qwen3.5-0.8B-MLX-8bit 3 + # FROM mlx-community/Qwen3.5-4B-MLX-4bit 2 4 # FROM mlx-community/Qwen3-0.6B-4bit
+24 -1
tilekit/src/accounts.rs
··· 1 1 //! Handles stuff related to accounts, identity etc.. 2 2 3 + use std::str::FromStr; 4 + 3 5 use anyhow::Result; 4 - use ed25519_dalek::{SigningKey, ed25519::signature::rand_core::OsRng}; 6 + use ed25519_dalek::{SecretKey, SigningKey, VerifyingKey, ed25519::signature::rand_core::OsRng}; 5 7 use keyring::Entry; 6 8 use ucan::did::Ed25519Did; 7 9 ··· 24 26 Ok(did) 25 27 } 26 28 29 + /// Returns the `SecretKey` (ed25519_dalek type, but Private Key) 30 + /// 31 + /// # Arguments 32 + /// 33 + /// - `app`- The service for which Identity is made (for ex: tiles) 34 + /// - `did` - The `Identity` of the service 35 + pub fn get_secret_key(app: &str, did: &Identity) -> Result<SecretKey> { 36 + let entry = Entry::new(app, did)?; 37 + let mut bytes: [u8; 64] = [0u8; 64]; 38 + let secret_pair = entry.get_secret()?; 39 + 40 + bytes[..64].copy_from_slice(secret_pair.as_slice()); 41 + 42 + let signing_key = SigningKey::from_keypair_bytes(&bytes)?; 43 + Ok(signing_key.to_bytes()) 44 + } 45 + 46 + pub fn get_public_key_from_did(did: &str) -> Result<[u8; 32]> { 47 + let ed_did = Ed25519Did::from_str(did)?; 48 + Ok(ed_did.0.to_bytes()) 49 + } 27 50 #[cfg(test)] 28 51 mod tests { 29 52 use keyring::{mock, set_default_credential_builder};
+4 -2
tiles/Cargo.toml
··· 21 21 rusqlite_migration = "2.4.1" 22 22 uuid = {version = "1.21.0", features = ["v7"]} 23 23 axum = "0.8.8" 24 - iroh = "0.96.1" 25 - iroh-ping = "0.8.0" 24 + iroh = "0.97.0" 25 + iroh-ping = "0.9.0" 26 + iroh-tickets = "0.4.0" 27 + axum-macros = "0.5.0" 26 28 27 29 [dev-dependencies] 28 30 tempfile = "3"
+95 -15
tiles/src/core/network.rs
··· 1 1 //! The main module for networking 2 2 3 + use std::{any::Any, str::FromStr}; 4 + 3 5 use anyhow::Result; 4 - use iroh::{Endpoint, protocol::Router}; 6 + use iroh::{ 7 + Endpoint, EndpointId, PublicKey, SecretKey, 8 + endpoint::{BindError, presets}, 9 + protocol::Router, 10 + }; 5 11 use iroh_ping::Ping; 12 + use iroh_tickets::endpoint::EndpointTicket; 13 + use tilekit::accounts::get_secret_key; 14 + 15 + use crate::core::{ 16 + accounts::get_current_user, 17 + storage::db::{DBTYPE, get_db_conn}, 18 + }; 6 19 7 20 // Entrypoint of network connection 8 - pub async fn init() -> Result<()> { 9 - let endpoint = Endpoint::bind().await?; 10 - endpoint.online().await; 21 + pub async fn init(ticket: Option<&str>) -> Result<()> { 22 + if let Some(ticket_addr) = ticket { 23 + let sender_endpoint = Endpoint::bind(presets::N0).await?; 24 + println!("{:?}", sender_endpoint.addr()); 25 + let se_clone = sender_endpoint.clone(); 26 + let send_pinger = Ping::new(); 27 + let rtt = send_pinger 28 + .ping( 29 + &sender_endpoint, 30 + EndpointTicket::from_str(ticket_addr)? 31 + .endpoint_addr() 32 + .clone(), 33 + ) 34 + .await?; 11 35 12 - let ping = Ping::new(); 36 + println!("ping took: {:?} to complete", rtt); 37 + se_clone.close().await; 38 + } else { 39 + let endpoint = Endpoint::bind(presets::N0).await?; 40 + let ep = endpoint.clone(); 41 + let ep2 = endpoint.clone(); 42 + endpoint.online().await; 13 43 14 - let recv_router = Router::builder(endpoint) 15 - .accept(iroh_ping::ALPN, ping) 16 - .spawn(); 44 + let ping = Ping::new(); 17 45 18 - let addr = recv_router.endpoint().addr(); 46 + let ticket = EndpointTicket::new(endpoint.addr()); 19 47 20 - println!("{:?}", addr); 48 + println!("ticket\n{:?}", ticket.to_string()); 21 49 22 - // create a send side & send a ping 23 - let send_ep = Endpoint::bind().await?; 24 - let send_pinger = Ping::new(); 25 - let rtt = send_pinger.ping(&send_ep, addr).await?; 50 + let recv_router = Router::builder(ep).accept(iroh_ping::ALPN, ping).spawn(); 51 + ep2.close().await; 52 + recv_router.shutdown().await?; 53 + } 54 + Ok(()) 55 + } 26 56 27 - println!("ping took: {:?} to complete", rtt); 57 + pub async fn link(ticket: Option<String>) -> Result<()> { 58 + let ping = Ping::new(); 59 + if let Some(ticket) = ticket { 60 + let endpoint = create_endpoint(false).await?; 61 + endpoint.online().await; 62 + let endpoint_close = endpoint.clone(); 63 + let rtt = ping 64 + .ping( 65 + &endpoint, 66 + EndpointTicket::from_str(&ticket)?.endpoint_addr().clone(), 67 + ) 68 + .await?; 69 + 70 + println!("ping took: {:?} to complete", rtt); 71 + endpoint_close.close().await; 72 + } else { 73 + let endpoint = create_endpoint(true).await?; 74 + endpoint.online().await; 75 + let endpoint_close = endpoint.clone(); 76 + let ticket = EndpointTicket::new(endpoint.addr()); 77 + 78 + println!("ticket\n{:?}", ticket.to_string()); 79 + let recv_router = Router::builder(endpoint) 80 + .accept(iroh_ping::ALPN, ping) 81 + .spawn(); 82 + 83 + tokio::signal::ctrl_c().await?; 84 + recv_router.shutdown().await?; 85 + endpoint_close.close().await; 86 + } 28 87 Ok(()) 29 88 } 89 + 90 + async fn create_endpoint(use_app_key: bool) -> Result<Endpoint> { 91 + if use_app_key { 92 + let user_db_conn = get_db_conn(DBTYPE::COMMON)?; 93 + let user = get_current_user(&user_db_conn)?; 94 + 95 + let signing_key = get_secret_key("tiles", &user.user_id)?; 96 + 97 + let secret_key = SecretKey::from_bytes(&signing_key); 98 + 99 + Endpoint::builder(presets::N0) 100 + .secret_key(secret_key) 101 + .bind() 102 + .await 103 + .map_err(<BindError as Into<anyhow::Error>>::into) 104 + } else { 105 + Endpoint::bind(presets::N0) 106 + .await 107 + .map_err(<BindError as Into<anyhow::Error>>::into) 108 + } 109 + }
+36 -15
tiles/src/daemon.rs
··· 7 7 }; 8 8 9 9 use anyhow::{Result, anyhow}; 10 - use axum::{Router, extract::State, routing::get}; 10 + use axum::{ 11 + Router, 12 + extract::{Query, State}, 13 + response::IntoResponse, 14 + routing::get, 15 + }; 16 + use axum_macros::debug_handler; 11 17 use reqwest::Client; 12 18 use std::fs::OpenOptions; 13 19 use std::sync::Mutex; ··· 20 26 21 27 struct AppState { 22 28 pub shutdown_sender: Mutex<Option<oneshot::Sender<bool>>>, 29 + } 30 + 31 + #[derive(serde::Deserialize)] 32 + pub struct SendParams { 33 + ticket: String, 23 34 } 24 35 25 36 const DEFAULT_PORT: u32 = 1729; ··· 27 38 if cfg!(debug_assertions) { 28 39 start_server(port).await 29 40 } else { 30 - start_daemon().await 41 + start_daemon(port).await 31 42 } 32 43 } 33 44 ··· 41 52 // allow zombie, since this process is expected to be 42 53 // running in background and have commands to stop if needed 43 54 #[allow(clippy::zombie_processes)] 44 - async fn start_daemon() -> Result<()> { 45 - if (ping().await).is_ok() { 55 + async fn start_daemon(port: Option<u32>) -> Result<()> { 56 + if (ping(port).await).is_ok() { 46 57 return Ok(()); 47 58 } 48 59 let data_dir = DefaultProvider.get_data_dir()?; ··· 63 74 .spawn() 64 75 .expect("Failed to start daemon"); 65 76 66 - wait_until_server_is_up().await 77 + wait_until_server_is_up(port).await 67 78 } 68 79 69 80 pub async fn start_server(port: Option<u32>) -> Result<()> { ··· 78 89 let app = Router::new() 79 90 .route("/", get(root)) 80 91 .route("/shutdown", get(shutdown)) 81 - .route("/link/ping", get(send_ping)) 92 + .route("/link/sender", get(send_ping)) 93 + .route("/link/receiver", get(receive_ping)) 82 94 .with_state(shared_state); 83 95 84 96 let addr = format!("127.0.0.1:{}", dyn_port); ··· 103 115 let _ = sender_real.send(true); 104 116 } 105 117 106 - async fn send_ping(State(_state): State<Arc<AppState>>) { 118 + #[debug_handler] 119 + async fn send_ping(State(_state): State<Arc<AppState>>, Query(params): Query<SendParams>) { 107 120 println!("Trying to send ping"); 108 - let _ = network::init().await; 121 + let _ = network::init(Some(&params.ticket)).await; 122 + } 123 + 124 + async fn receive_ping(State(_state): State<Arc<AppState>>) { 125 + println!("Trying to receive ping"); 126 + let _ = network::init(None).await; 109 127 } 110 128 111 129 async fn stop_server(port: Option<u32>) -> Result<()> { ··· 119 137 _ => Ok(()), 120 138 } 121 139 } 122 - pub async fn ping() -> Result<(), String> { 140 + pub async fn ping(port: Option<u32>) -> Result<(), String> { 141 + let dyn_port = get_port(port); 123 142 let client = Client::new(); 124 - let res = client.get("http://127.0.0.1:1729").send().await; 143 + let addr = format!("http://127.0.0.1:{}", dyn_port); 144 + 145 + let res = client.get(addr).send().await; 125 146 126 147 match res { 127 148 Err(err) => Err(format!("Pong failed: {:?}", err)), ··· 129 150 } 130 151 } 131 152 132 - async fn wait_until_server_is_up() -> Result<()> { 153 + async fn wait_until_server_is_up(port: Option<u32>) -> Result<()> { 133 154 let mut retry_count = 5; 134 155 let mut error: String = String::new(); 135 156 loop { ··· 139 160 } 140 161 return Err(anyhow!(error)); 141 162 } 142 - match ping().await { 163 + match ping(port).await { 143 164 Ok(()) => return Ok(()), 144 165 Err(err) => { 145 166 retry_count -= 1; ··· 171 192 tokio::spawn(async move { 172 193 let _ = start_server(None).await; 173 194 }); 174 - assert!(ping().await.is_err()); 195 + assert!(ping(None).await.is_err()); 175 196 stop_server(None).await 176 197 } 177 198 ··· 181 202 tokio::spawn(async move { 182 203 let _ = start_server(None).await; 183 204 }); 184 - wait_until_server_is_up().await?; 185 - assert!(ping().await.is_ok()); 205 + wait_until_server_is_up(None).await?; 206 + assert!(ping(None).await.is_ok()); 186 207 187 208 stop_server(None).await 188 209 }
+9
tiles/src/main.rs
··· 2 2 3 3 use clap::{Args, Parser, Subcommand}; 4 4 use tiles::{ 5 + core::network::link, 5 6 daemon::{start_cmd, start_server, stop_cmd}, 6 7 runtime::{RunArgs, build_runtime}, 7 8 utils::installer, ··· 60 61 61 62 /// Daemon configurations 62 63 Daemon(DaemonArgs), 64 + 65 + Link { 66 + ticket: Option<String>, 67 + }, 63 68 } 64 69 65 70 #[derive(Debug, Args)] ··· 219 224 .inspect(|_| println!("Daemon stopped successfully"))?, 220 225 _ => start_server(None).await?, 221 226 }, 227 + Some(Commands::Link { ticket }) => { 228 + // TODO: Move these direct call to core 229 + link(ticket).await? 230 + } 222 231 } 223 232 Ok(()) 224 233 }