diff --git a/Cargo.lock b/Cargo.lock index 106fe64..e431984 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -173,7 +173,7 @@ dependencies = [ "sha1", "sync_wrapper", "tokio", - "tokio-tungstenite", + "tokio-tungstenite 0.28.0", "tower", "tower-layer", "tower-service", @@ -308,6 +308,12 @@ dependencies = [ "syn", ] +[[package]] +name = "borrow-or-share" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc0b364ead1874514c8c2855ab558056ebfeb775653e7ae45ff72f28f8f3166c" + [[package]] name = "borsh" version = "1.6.1" @@ -393,12 +399,6 @@ dependencies = [ "shlex", ] -[[package]] -name = "cesu8" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d43a04d8753f35258c91f8ec639f792891f748a1edbd759cf1dcea3382ad83c" - [[package]] name = "cfg-if" version = "1.0.4" @@ -495,16 +495,6 @@ dependencies = [ "thiserror 2.0.18", ] -[[package]] -name = "combine" -version = "4.6.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba5a308b75df32fe02788e748662718f03fde005016435c444eea572398219fd" -dependencies = [ - "bytes", - "memchr", -] - [[package]] name = "compare" version = "0.0.6" @@ -621,15 +611,6 @@ version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "790eea4361631c5e7d22598ecd5723ff611904e3344ce8720784c93e3d83d40b" -[[package]] -name = "crossbeam-channel" -version = "0.5.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "82b8f8f868b36967f9606790d1903570de9ceaf870a7bf9fbbd3016d636a2cb2" -dependencies = [ - "crossbeam-utils", -] - [[package]] name = "crossbeam-epoch" version = "0.9.18" @@ -696,6 +677,7 @@ dependencies = [ "fiat-crypto", "rustc_version", "subtle", + "zeroize", ] [[package]] @@ -892,8 +874,10 @@ dependencies = [ "curve25519-dalek", "ed25519", "rand_core 0.6.4", + "serde", "sha2", "subtle", + "zeroize", ] [[package]] @@ -1032,6 +1016,17 @@ dependencies = [ "miniz_oxide", ] +[[package]] +name = "fluent-uri" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bc74ac4d8359ae70623506d512209619e5cf8f347124910440dbc221714b328e" +dependencies = [ + "borrow-or-share", + "ref-cast", + "serde", +] + [[package]] name = "flume" version = "0.12.0" @@ -1053,12 +1048,6 @@ version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d9c4f5dac5e15c24eb999c26181a6ca40b39fe946cbe4c263c7209467bc83af2" -[[package]] -name = "foldhash" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77ce24cb58228fbb8aa041425bb1050850ac19177686ea6e0f41a70416f56fdb" - [[package]] name = "form_urlencoded" version = "1.2.2" @@ -1248,13 +1237,11 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0de51e6874e94e7bf76d726fc5d13ba782deca734ff60d5bb2fb2607c7406555" dependencies = [ "cfg-if", - "js-sys", "libc", "r-efi 6.0.0", "rand_core 0.10.0", "wasip2", "wasip3", - "wasm-bindgen", ] [[package]] @@ -1331,7 +1318,9 @@ version = "0.15.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9229cfe53dfd69f0609a49f65461bd93001ea1ef889cd5529dd176593f5338a1" dependencies = [ - "foldhash 0.1.5", + "allocator-api2", + "equivalent", + "foldhash", ] [[package]] @@ -1339,11 +1328,6 @@ name = "hashbrown" version = "0.16.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "841d1cc9bed7f9236f321df977030373f4a4163ae1a7dbfe1a51a2c1a51d9100" -dependencies = [ - "allocator-api2", - "equivalent", - "foldhash 0.2.0", -] [[package]] name = "heapless" @@ -1379,9 +1363,9 @@ checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" [[package]] name = "hickory-proto" -version = "0.25.2" +version = "0.24.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8a6fe56c0038198998a6f217ca4e7ef3a5e51f46163bd6dd60b5c71ca6c6502" +checksum = "92652067c9ce6f66ce53cc38d1169daa36e6e7eb7dd3b63b5103bd9d97117248" dependencies = [ "async-trait", "cfg-if", @@ -1393,9 +1377,8 @@ dependencies = [ "idna", "ipnet", "once_cell", - "rand 0.9.2", - "ring", - "thiserror 2.0.18", + "rand 0.8.5", + "thiserror 1.0.69", "tinyvec", "tokio", "tracing", @@ -1404,21 +1387,21 @@ dependencies = [ [[package]] name = "hickory-resolver" -version = "0.25.2" +version = "0.24.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc62a9a99b0bfb44d2ab95a7208ac952d31060efc16241c87eaf36406fecf87a" +checksum = "cbb117a1ca520e111743ab2f6688eddee69db4e0ea242545a604dce8a66fd22e" dependencies = [ "cfg-if", "futures-util", "hickory-proto", "ipconfig", - "moka", + "lru-cache", "once_cell", "parking_lot", - "rand 0.9.2", + "rand 0.8.5", "resolv-conf", "smallvec", - "thiserror 2.0.18", + "thiserror 1.0.69", "tokio", "tracing", ] @@ -1489,6 +1472,7 @@ version = "0.1.0" dependencies = [ "arc-swap", "axum", + "bytes", "chrono", "cid", "data-encoding", @@ -1521,7 +1505,7 @@ dependencies = [ "tempfile", "thiserror 2.0.18", "tokio", - "tokio-tungstenite", + "tokio-tungstenite 0.28.0", "tower-http", "tracing", "tracing-subscriber", @@ -1565,6 +1549,7 @@ dependencies = [ "tokio", "tokio-rustls", "tower-service", + "webpki-roots", ] [[package]] @@ -1829,27 +1814,23 @@ checksum = "92ecc6618181def0457392ccd0ee51198e065e016d1d527a7ac1b6dc7c1f09d2" [[package]] name = "jacquard-api" -version = "0.9.5" -source = "git+https://tangled.org/ptr.pet/jacquard#681819111ac12a3c7ef92f1ec0b80c6f732d8b4a" +version = "0.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f4bba022e9c632f737de481d7c894b5736dd1a503362876ca4da49b9255a7e61" dependencies = [ - "bon", - "bytes", "jacquard-common", "jacquard-derive", "jacquard-lexicon", "miette", - "rustversion", "serde", - "serde_bytes", - "serde_ipld_dagcbor", "thiserror 2.0.18", - "unicode-segmentation", ] [[package]] name = "jacquard-common" -version = "0.9.5" -source = "git+https://tangled.org/ptr.pet/jacquard#681819111ac12a3c7ef92f1ec0b80c6f732d8b4a" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9631f08f1e65d19e204bc6774d00b4e0b69fb649d7d7ac59ccf97797bd9a196e" dependencies = [ "base64", "bon", @@ -1859,9 +1840,11 @@ dependencies = [ "ciborium-io", "cid", "ed25519-dalek", + "fluent-uri", + "futures", "getrandom 0.2.17", - "getrandom 0.4.2", - "hashbrown 0.16.1", + "getrandom 0.3.4", + "hashbrown 0.15.5", "http", "ipld-core", "k256", @@ -1869,15 +1852,18 @@ dependencies = [ "miette", "multibase", "multihash", + "n0-future", "ouroboros", "oxilangtag", "p256", + "phf", "postcard", "rand 0.9.2", "regex", "regex-automata", "regex-lite", "reqwest", + "rustversion", "serde", "serde_bytes", "serde_html_form", @@ -1888,16 +1874,18 @@ dependencies = [ "spin 0.10.0", "thiserror 2.0.18", "tokio", + "tokio-tungstenite-wasm", "tokio-util", "tracing", "trait-variant", - "url", + "unicode-segmentation", ] [[package]] name = "jacquard-derive" -version = "0.9.5" -source = "git+https://tangled.org/ptr.pet/jacquard#681819111ac12a3c7ef92f1ec0b80c6f732d8b4a" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "22904bd0f9a959591e14ee9e1dab91a9110209cb8b292930e584134f96a83ece" dependencies = [ "heck 0.5.0", "jacquard-lexicon", @@ -1908,19 +1896,18 @@ dependencies = [ [[package]] name = "jacquard-identity" -version = "0.9.5" -source = "git+https://tangled.org/ptr.pet/jacquard#681819111ac12a3c7ef92f1ec0b80c6f732d8b4a" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b84a9302ea9dd39c49d748a8eba21faf365570088571ff327ebb00117dbd65b8" dependencies = [ "bon", "bytes", "hickory-resolver", "http", - "jacquard-api", "jacquard-common", "jacquard-lexicon", "miette", "n0-future", - "percent-encoding", "reqwest", "serde", "serde_html_form", @@ -1929,14 +1916,13 @@ dependencies = [ "tokio", "tracing", "trait-variant", - "url", - "urlencoding", ] [[package]] name = "jacquard-lexicon" -version = "0.9.5" -source = "git+https://tangled.org/ptr.pet/jacquard#681819111ac12a3c7ef92f1ec0b80c6f732d8b4a" +version = "0.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fd7863d4f56a49f07391b5f775e82be12e6381156642ee83574f481ca73e8b0e" dependencies = [ "cid", "dashmap", @@ -1962,13 +1948,15 @@ dependencies = [ [[package]] name = "jacquard-repo" -version = "0.9.6" -source = "git+https://tangled.org/ptr.pet/jacquard#681819111ac12a3c7ef92f1ec0b80c6f732d8b4a" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b0c924640eed28b608767e034f7db741a4f3b33c4631db8defc33c5a05f4834e" dependencies = [ "bytes", "cid", "ed25519-dalek", "iroh-car", + "jacquard-api", "jacquard-common", "jacquard-derive", "k256", @@ -1986,28 +1974,6 @@ dependencies = [ "trait-variant", ] -[[package]] -name = "jni" -version = "0.21.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a87aa2bb7d2af34197c04845522473242e1aa17c12f4935d5856491a7fb8c97" -dependencies = [ - "cesu8", - "cfg-if", - "combine", - "jni-sys", - "log", - "thiserror 1.0.69", - "walkdir", - "windows-sys 0.45.0", -] - -[[package]] -name = "jni-sys" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8eaf4bc02d17cbdd7ff4c7438cafcdf7fb9a4613313ad11b4f8fefe7d3fa0130" - [[package]] name = "jobserver" version = "0.1.34" @@ -2070,6 +2036,12 @@ dependencies = [ "libc", ] +[[package]] +name = "linked-hash-map" +version = "0.5.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0717cef1bc8b636c6e1c1bbdefc09e6322da8a9321966e8928ef80d20f7f770f" + [[package]] name = "linux-raw-sys" version = "0.12.1" @@ -2110,6 +2082,15 @@ dependencies = [ "tracing-subscriber", ] +[[package]] +name = "lru-cache" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "31e24f1ad8321ca0e8a1e0ac13f23cb668e6f5466c2c57319f6a5cf1cc8e3b1c" +dependencies = [ + "linked-hash-map", +] + [[package]] name = "lru-slab" version = "0.1.2" @@ -2149,17 +2130,15 @@ dependencies = [ [[package]] name = "maitake-sync" -version = "0.2.2" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "748f86d9befd480b602c3bebc9ef30dbf2f3dfc8acc4a73d07b90f0117e6de3f" +checksum = "6816ab14147f80234c675b80ed6dc4f440d8a1cefc158e766067aedb84c0bcd5" dependencies = [ "cordyceps", "loom", - "mutex-traits", "mycelium-bitfield", "pin-project", "portable-atomic", - "tracing", ] [[package]] @@ -2260,23 +2239,6 @@ dependencies = [ "windows-sys 0.61.2", ] -[[package]] -name = "moka" -version = "0.12.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85f8024e1c8e71c778968af91d43700ce1d11b219d127d79fb2934153b82b42b" -dependencies = [ - "crossbeam-channel", - "crossbeam-epoch", - "crossbeam-utils", - "equivalent", - "parking_lot", - "portable-atomic", - "smallvec", - "tagptr", - "uuid", -] - [[package]] name = "multibase" version = "0.9.2" @@ -2300,12 +2262,6 @@ dependencies = [ "unsigned-varint 0.8.0", ] -[[package]] -name = "mutex-traits" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3929f2b5633d29cf7b6624992e5f3c1e9334f1193423e12d17be4faf678cde3f" - [[package]] name = "mycelium-bitfield" version = "0.1.5" @@ -2371,10 +2327,6 @@ name = "once_cell" version = "1.21.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9f7c3e4beb33f85d45ae3e3a1792185706c8e16d043238c593331cc7cd313b50" -dependencies = [ - "critical-section", - "portable-atomic", -] [[package]] name = "openssl-probe" @@ -2477,6 +2429,48 @@ version = "2.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9b4f627cb1b25917193a259e49bdad08f671f8d9708acfd5fe0a8c1455d87220" +[[package]] +name = "phf" +version = "0.11.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1fd6780a80ae0c52cc120a26a1a42c1ae51b247a253e4e06113d23d2c2edd078" +dependencies = [ + "phf_macros", + "phf_shared", +] + +[[package]] +name = "phf_generator" +version = "0.11.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3c80231409c20246a13fddb31776fb942c38553c51e871f8cbd687a4cfb5843d" +dependencies = [ + "phf_shared", + "rand 0.8.5", +] + +[[package]] +name = "phf_macros" +version = "0.11.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f84ac04429c13a7ff43785d75ad27569f2951ce0ffd30a3321230db2fc727216" +dependencies = [ + "phf_generator", + "phf_shared", + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "phf_shared" +version = "0.11.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "67eabc2ef2a60eb7faa00097bd1ffdb5bd28e62bf39990626a582201b7a754e5" +dependencies = [ + "siphasher", +] + [[package]] name = "pin-project" version = "1.1.11" @@ -2645,7 +2639,6 @@ version = "0.11.14" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "434b42fec591c96ef50e21e886936e66d3cc3f737104fdb9b737c40ffb94c098" dependencies = [ - "aws-lc-rs", "bytes", "getrandom 0.3.4", "lru-slab", @@ -2696,13 +2689,24 @@ version = "6.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f8dcc9c7d52a811697d2151c701e0d08956f92b0e24136cf4cf27b57a6a0d9bf" +[[package]] +name = "rand" +version = "0.8.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" +dependencies = [ + "libc", + "rand_chacha 0.3.1", + "rand_core 0.6.4", +] + [[package]] name = "rand" version = "0.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6db2770f06117d490610c7488547d543617b21bfa07796d7a12f6f1bd53850d1" dependencies = [ - "rand_chacha", + "rand_chacha 0.9.0", "rand_core 0.9.5", ] @@ -2717,6 +2721,16 @@ dependencies = [ "rand_core 0.10.0", ] +[[package]] +name = "rand_chacha" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" +dependencies = [ + "ppv-lite86", + "rand_core 0.6.4", +] + [[package]] name = "rand_chacha" version = "0.9.0" @@ -2760,6 +2774,26 @@ dependencies = [ "bitflags", ] +[[package]] +name = "ref-cast" +version = "1.0.25" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f354300ae66f76f1c85c5f84693f0ce81d747e2c3f21a45fef496d89c960bf7d" +dependencies = [ + "ref-cast-impl", +] + +[[package]] +name = "ref-cast-impl" +version = "1.0.25" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b7186006dcb21920990093f30e3dea63b7d6e977bf1256be20c3563a5db070da" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + [[package]] name = "regex" version = "1.12.3" @@ -2797,9 +2831,9 @@ checksum = "dc897dd8d9e8bd1ed8cdad82b5966c3e0ecae09fb1907d58efaa013543185d0a" [[package]] name = "reqwest" -version = "0.13.2" +version = "0.12.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab3f43e3283ab1488b624b44b0e988d0acea0b3214e694730a055cb6b2efa801" +checksum = "eddd3ca559203180a307f12d114c268abf583f59b03cb906fd0b3ff8646c1147" dependencies = [ "base64", "bytes", @@ -2821,9 +2855,9 @@ dependencies = [ "quinn", "rustls", "rustls-pki-types", - "rustls-platform-verifier", "serde", "serde_json", + "serde_urlencoded", "sync_wrapper", "tokio", "tokio-rustls", @@ -2836,6 +2870,7 @@ dependencies = [ "wasm-bindgen-futures", "wasm-streams", "web-sys", + "webpki-roots", ] [[package]] @@ -2928,6 +2963,7 @@ dependencies = [ "aws-lc-rs", "log", "once_cell", + "ring", "rustls-pki-types", "rustls-webpki", "subtle", @@ -2956,33 +2992,6 @@ dependencies = [ "zeroize", ] -[[package]] -name = "rustls-platform-verifier" -version = "0.6.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d99feebc72bae7ab76ba994bb5e121b8d83d910ca40b36e0921f53becc41784" -dependencies = [ - "core-foundation 0.10.1", - "core-foundation-sys", - "jni", - "log", - "once_cell", - "rustls", - "rustls-native-certs", - "rustls-platform-verifier-android", - "rustls-webpki", - "security-framework", - "security-framework-sys", - "webpki-root-certs", - "windows-sys 0.61.2", -] - -[[package]] -name = "rustls-platform-verifier-android" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f87165f0995f63a9fbeea62b64d10b4d9d8e78ec6d7d51fb2125fda7bb36788f" - [[package]] name = "rustls-webpki" version = "0.103.9" @@ -3013,15 +3022,6 @@ version = "5.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "16c7f49c9d5caa3bf4b3106900484b447b9253fe99670ceb81cb6cb5027855e1" -[[package]] -name = "same-file" -version = "1.0.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502" -dependencies = [ - "winapi-util", -] - [[package]] name = "scc" version = "3.6.10" @@ -3326,6 +3326,12 @@ version = "0.3.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e320a6c5ad31d271ad523dcf3ad13e2767ad8b1cb8f047f75a8aeaf8da139da2" +[[package]] +name = "siphasher" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b2aa850e253778c88a04c3d7323b043aeda9d3e30d5971937c1855769763678e" + [[package]] name = "slab" version = "0.4.12" @@ -3490,12 +3496,6 @@ dependencies = [ "libc", ] -[[package]] -name = "tagptr" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b2093cf4c8eb1e67749a6762251bc9cd836b6fc171623bd0a9d324d37af2417" - [[package]] name = "tempfile" version = "3.27.0" @@ -3660,6 +3660,22 @@ dependencies = [ "tokio", ] +[[package]] +name = "tokio-tungstenite" +version = "0.24.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "edc5f74e248dc973e0dbb7b74c7e0d6fcc301c694ff50049504004ef4d0cdcd9" +dependencies = [ + "futures-util", + "log", + "rustls", + "rustls-native-certs", + "rustls-pki-types", + "tokio", + "tokio-rustls", + "tungstenite 0.24.0", +] + [[package]] name = "tokio-tungstenite" version = "0.28.0" @@ -3673,7 +3689,26 @@ dependencies = [ "rustls-pki-types", "tokio", "tokio-rustls", - "tungstenite", + "tungstenite 0.28.0", +] + +[[package]] +name = "tokio-tungstenite-wasm" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e21a5c399399c3db9f08d8297ac12b500e86bca82e930253fdc62eaf9c0de6ae" +dependencies = [ + "futures-channel", + "futures-util", + "http", + "httparse", + "js-sys", + "rustls", + "thiserror 1.0.69", + "tokio", + "tokio-tungstenite 0.24.0", + "wasm-bindgen", + "web-sys", ] [[package]] @@ -3821,6 +3856,26 @@ version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b" +[[package]] +name = "tungstenite" +version = "0.24.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "18e5b8366ee7a95b16d32197d0b2604b43a0be89dc5fac9f8e96ccafbaedda8a" +dependencies = [ + "byteorder", + "bytes", + "data-encoding", + "http", + "httparse", + "log", + "rand 0.8.5", + "rustls", + "rustls-pki-types", + "sha1", + "thiserror 1.0.69", + "utf-8", +] + [[package]] name = "tungstenite" version = "0.28.0" @@ -3919,12 +3974,6 @@ dependencies = [ "serde_derive", ] -[[package]] -name = "urlencoding" -version = "2.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "daf8dba3b7eb870caf1ddeed7bc9d2a049f3cfdfae7cb521b087cc33ae4c49da" - [[package]] name = "utf-8" version = "0.7.6" @@ -3937,17 +3986,6 @@ version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b6c140620e7ffbb22c2dee59cafe6084a59b5ffc27a8859a5f0d494b5d52b6be" -[[package]] -name = "uuid" -version = "1.22.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a68d3c8f01c0cfa54a75291d83601161799e4a89a39e0929f4b0354d88757a37" -dependencies = [ - "getrandom 0.4.2", - "js-sys", - "wasm-bindgen", -] - [[package]] name = "valuable" version = "0.1.1" @@ -3966,16 +4004,6 @@ version = "0.9.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a" -[[package]] -name = "walkdir" -version = "2.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "29790946404f91d9c5d06f9874efddea1dc06c5efe94541a7d6863108e3a5e4b" -dependencies = [ - "same-file", - "winapi-util", -] - [[package]] name = "want" version = "0.3.1" @@ -4092,9 +4120,9 @@ dependencies = [ [[package]] name = "wasm-streams" -version = "0.5.0" +version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d1ec4f6517c9e11ae630e200b2b65d193279042e28edd4a2cda233e46670bbb" +checksum = "15053d8d85c7eccdbefef60f06769760a563c7f0a9d6902a13d35c7800b0ad65" dependencies = [ "futures-util", "js-sys", @@ -4136,10 +4164,10 @@ dependencies = [ ] [[package]] -name = "webpki-root-certs" +name = "webpki-roots" version = "1.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "804f18a4ac2676ffb4e8b5b5fa9ae38af06df08162314f96a68d2a363e21a8ca" +checksum = "22cfaf3c063993ff62e73cb4311efde4db1efb31ab78a3e5c457939ad5cc0bed" dependencies = [ "rustls-pki-types", ] @@ -4150,15 +4178,6 @@ version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "72069c3113ab32ab29e5584db3c6ec55d416895e60715417b5b883a357c3e471" -[[package]] -name = "winapi-util" -version = "0.1.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c2a7b1c03c876122aa43f3020e6c3c3ee5c05081c9a00739faf7503aeba10d22" -dependencies = [ - "windows-sys 0.61.2", -] - [[package]] name = "windows-core" version = "0.62.2" @@ -4229,15 +4248,6 @@ dependencies = [ "windows-link", ] -[[package]] -name = "windows-sys" -version = "0.45.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75283be5efb2831d37ea142365f009c02ec203cd29a3ebecbc093d52315b66d0" -dependencies = [ - "windows-targets 0.42.2", -] - [[package]] name = "windows-sys" version = "0.48.0" @@ -4274,21 +4284,6 @@ dependencies = [ "windows-link", ] -[[package]] -name = "windows-targets" -version = "0.42.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e5180c00cd44c9b1c88adb3693291f1cd93605ded80c250a75d472756b4d071" -dependencies = [ - "windows_aarch64_gnullvm 0.42.2", - "windows_aarch64_msvc 0.42.2", - "windows_i686_gnu 0.42.2", - "windows_i686_msvc 0.42.2", - "windows_x86_64_gnu 0.42.2", - "windows_x86_64_gnullvm 0.42.2", - "windows_x86_64_msvc 0.42.2", -] - [[package]] name = "windows-targets" version = "0.48.5" @@ -4337,12 +4332,6 @@ dependencies = [ "windows_x86_64_msvc 0.53.1", ] -[[package]] -name = "windows_aarch64_gnullvm" -version = "0.42.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "597a5118570b68bc08d8d59125332c54f1ba9d9adeedeef5b99b02ba2b0698f8" - [[package]] name = "windows_aarch64_gnullvm" version = "0.48.5" @@ -4361,12 +4350,6 @@ version = "0.53.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a9d8416fa8b42f5c947f8482c43e7d89e73a173cead56d044f6a56104a6d1b53" -[[package]] -name = "windows_aarch64_msvc" -version = "0.42.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e08e8864a60f06ef0d0ff4ba04124db8b0fb3be5776a5cd47641e942e58c4d43" - [[package]] name = "windows_aarch64_msvc" version = "0.48.5" @@ -4385,12 +4368,6 @@ version = "0.53.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b9d782e804c2f632e395708e99a94275910eb9100b2114651e04744e9b125006" -[[package]] -name = "windows_i686_gnu" -version = "0.42.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c61d927d8da41da96a81f029489353e68739737d3beca43145c8afec9a31a84f" - [[package]] name = "windows_i686_gnu" version = "0.48.5" @@ -4421,12 +4398,6 @@ version = "0.53.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fa7359d10048f68ab8b09fa71c3daccfb0e9b559aed648a8f95469c27057180c" -[[package]] -name = "windows_i686_msvc" -version = "0.42.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44d840b6ec649f480a41c8d80f9c65108b92d89345dd94027bfe06ac444d1060" - [[package]] name = "windows_i686_msvc" version = "0.48.5" @@ -4445,12 +4416,6 @@ version = "0.53.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1e7ac75179f18232fe9c285163565a57ef8d3c89254a30685b57d83a38d326c2" -[[package]] -name = "windows_x86_64_gnu" -version = "0.42.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8de912b8b8feb55c064867cf047dda097f92d51efad5b491dfb98f6bbb70cb36" - [[package]] name = "windows_x86_64_gnu" version = "0.48.5" @@ -4469,12 +4434,6 @@ version = "0.53.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9c3842cdd74a865a8066ab39c8a7a473c0778a3f29370b5fd6b4b9aa7df4a499" -[[package]] -name = "windows_x86_64_gnullvm" -version = "0.42.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26d41b46a36d453748aedef1486d5c7a85db22e56aff34643984ea85514e94a3" - [[package]] name = "windows_x86_64_gnullvm" version = "0.48.5" @@ -4493,12 +4452,6 @@ version = "0.53.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0ffa179e2d07eee8ad8f57493436566c7cc30ac536a3379fdf008f47f6bb7ae1" -[[package]] -name = "windows_x86_64_msvc" -version = "0.42.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9aec5da331524158c6d1a4ac0ab1541149c0b9505fde06423b02f5ef0106b9f0" - [[package]] name = "windows_x86_64_msvc" version = "0.48.5" diff --git a/Cargo.toml b/Cargo.toml index f24a2de..6bb150e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -25,18 +25,19 @@ lsm-tree = { git = "https://github.com/90-008/lsm-tree.git", features = ["lz4", serde_ipld_dagcbor = "0.6" serde_urlencoded = "0.7" -url = "2.5" +bytes = { version = "1.11.1", features = ["serde"] } +url = { version = "2.5", features = ["serde"] } smol_str = "0.3" futures = "0.3" -reqwest = { version = "0.13.2", features = ["json", "rustls", "stream", "gzip", "brotli", "zstd", "http2"], default-features = false } +reqwest = { version = "0.12.8", features = ["json", "rustls-tls", "stream", "gzip", "brotli", "zstd", "http2"], default-features = false } axum = { version = "0.8.8", features = ["ws", "macros"] } tower-http = { version = "0.6.6", features = ["cors", "trace"] } -jacquard-common = { git = "https://tangled.org/ptr.pet/jacquard", default-features = false, features = ["tracing", "std", "crypto"] } -jacquard-api = { git = "https://tangled.org/ptr.pet/jacquard" } -jacquard-identity = { git = "https://tangled.org/ptr.pet/jacquard", features = ["dns", "tracing"] } -jacquard-repo = { git = "https://tangled.org/ptr.pet/jacquard" } -jacquard-derive = { git = "https://tangled.org/ptr.pet/jacquard" } +jacquard-common = { version = "0.11", default-features = false, features = ["tracing", "std", "crypto"] } +jacquard-api = { version = "0.11" } +jacquard-identity = { version = "0.11", features = ["dns", "tracing"] } +jacquard-repo = { version = "0.11" } +jacquard-derive = { version = "0.11" } chrono = { version = "0.4.43", features = ["serde"] } humantime = "2.3.0" diff --git a/src/backfill/mod.rs b/src/backfill/mod.rs index 87b6c44..b793c9a 100644 --- a/src/backfill/mod.rs +++ b/src/backfill/mod.rs @@ -32,7 +32,7 @@ use tracing::{Instrument, debug, error, info, trace, warn}; pub mod manager; use crate::ingest::{BufferTx, IngestMessage}; -use crate::util::WatchEnabledExt; +use crate::util::{WatchEnabledExt, url_to_fluent_uri}; pub struct BackfillWorker { state: Arc, @@ -445,7 +445,7 @@ async fn process_did<'i>( // 2. fetch repo (car) let start = Instant::now(); let req = GetRepo::new().did(did.clone()).build(); - let resp = http.xrpc(pds).send(&req).await?; + let resp = http.xrpc(url_to_fluent_uri(&pds)).send(&req).await?; let car_bytes = match resp.into_output() { Ok(o) => o, diff --git a/src/db/types.rs b/src/db/types.rs index 2e56bd8..c0f8420 100644 --- a/src/db/types.rs +++ b/src/db/types.rs @@ -1,6 +1,6 @@ use data_encoding::BASE32_NOPAD; use fjall::UserKey; -use jacquard_common::types::crypto::{PublicKey, code_of, encode_uvarint}; +use jacquard_common::types::crypto::{PublicKey, encode_uvarint}; use jacquard_common::types::string::Did; use jacquard_common::types::tid::Tid; use jacquard_common::{CowStr, IntoStatic}; @@ -392,6 +392,15 @@ impl std::fmt::Display for DidKey<'_> { impl From> for DidKey<'static> { fn from(value: PublicKey<'_>) -> Self { + use jacquard_common::types::crypto::KeyCodec; + fn code_of(codec: KeyCodec) -> u64 { + match codec { + KeyCodec::Ed25519 => 0xED, + KeyCodec::Secp256k1 => 0xE7, + KeyCodec::P256 => 0x1200, + KeyCodec::Unknown(c) => c, + } + } let mut bytes = Vec::with_capacity(8 + value.bytes.len()); bytes.append(&mut encode_uvarint(code_of(value.codec))); bytes.extend_from_slice(&value.bytes); diff --git a/src/ingest/stream.rs b/src/ingest/stream.rs index ee1cae0..244a291 100644 --- a/src/ingest/stream.rs +++ b/src/ingest/stream.rs @@ -1,8 +1,8 @@ use std::convert::Infallible; use std::option::Option; +use bytes::Bytes; use futures::StreamExt; -use jacquard_common::bytes::Bytes; use jacquard_common::error::DecodeError; use jacquard_common::{ CowStr, diff --git a/src/resolver.rs b/src/resolver.rs index 6bc96a6..623f9aa 100644 --- a/src/resolver.rs +++ b/src/resolver.rs @@ -1,4 +1,5 @@ use std::ops::Not; +use std::str::FromStr; use std::sync::Arc; use std::sync::atomic::{AtomicUsize, Ordering}; use std::time::Duration; @@ -19,6 +20,8 @@ use smol_str::SmolStr; use thiserror::Error; use url::Url; +use crate::util::url_to_fluent_uri; + #[derive(Debug, Diagnostic, Error)] pub enum ResolverError { #[error("{0}")] @@ -72,7 +75,9 @@ impl Resolver { for url in plc_urls { let mut opts = ResolverOptions::default(); - opts.plc_source = PlcSource::PlcDirectory { base: url }; + opts.plc_source = PlcSource::PlcDirectory { + base: url_to_fluent_uri(&url), + }; opts.request_timeout = Some(Duration::from_secs(3)); jacquards.push(JacquardResolver::new(http.clone(), opts).with_system_dns()); @@ -171,7 +176,11 @@ impl Resolver { .then(|| handles.remove(0).into_static()); let key = doc.atproto_public_key().ok().flatten(); - let mini = MiniDoc { pds, handle, key }; + let mini = MiniDoc { + pds: Url::from_str(pds.as_str()).expect("that url is valid"), + handle, + key, + }; let _ = self.inner.cache.put_async(did_static, mini.clone()).await; Ok(mini) } diff --git a/src/types.rs b/src/types.rs index edfd804..94aaf3d 100644 --- a/src/types.rs +++ b/src/types.rs @@ -241,7 +241,7 @@ pub struct AccountEvt<'i> { pub status: Option>, } -use jacquard_common::bytes::Bytes; +use bytes::Bytes; #[derive(Serialize, Deserialize, Clone)] pub(crate) enum StoredData { @@ -291,7 +291,7 @@ pub(crate) struct StoredEvent<'i> { } mod serde_bytes_squared { - use jacquard_common::bytes::Bytes; + use bytes::Bytes; use serde::{Deserialize, Deserializer, Serializer}; pub fn serialize(v: impl AsRef<[u8]>, s: S) -> Result { diff --git a/src/util.rs b/src/util.rs index 06c6cce..7465c78 100644 --- a/src/util.rs +++ b/src/util.rs @@ -1,10 +1,12 @@ use std::time::Duration; +use jacquard_common::deps::fluent_uri; use rand::RngExt; use reqwest::StatusCode; use serde::{Deserialize, Deserializer, Serializer}; use tokio::sync::watch; use tracing::info; +use url::Url; use crate::types::RepoStatus; @@ -154,3 +156,9 @@ pub fn opt_cid_serialize_str(v: &Option, s: S) -> Resul pub fn repo_status_serialize_str(v: &RepoStatus, s: S) -> Result { s.serialize_str(&v.to_string()) } + +pub fn url_to_fluent_uri(url: &Url) -> fluent_uri::Uri { + fluent_uri::Uri::parse(url.as_str()) + .expect("that url is validated") + .to_owned() +}