From b0c833e72b7bea73a820a7efa9d633cb8252e1ee Mon Sep 17 00:00:00 2001 From: dawn <90008@gaze.systems> Date: Wed, 25 Mar 2026 10:10:33 +0000 Subject: [PATCH] [deps] use jacquard from crates io --- Cargo.lock | 519 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Cargo.toml | 15 ++++++++------- src/resolver.rs | 13 +++++++++++-- src/types.rs | 4 ++-- src/util.rs | 8 ++++++++ src/backfill/mod.rs | 4 ++-- src/db/types.rs | 11 ++++++++++- src/ingest/stream.rs | 2 +- 8 file(s) changed, 278 insertion(s)(+), 298 deletion(s)(-) diff --git a/Cargo.lock b/Cargo.lock --- a/Cargo.lock +++ b/Cargo.lock @@ -173,7 +173,7 @@ "sha1", "sync_wrapper", "tokio", - "tokio-tungstenite", + "tokio-tungstenite 0.28.0", "tower", "tower-layer", "tower-service", @@ -309,6 +309,12 @@ ] [[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" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -392,12 +398,6 @@ "libc", "shlex", ] - -[[package]] -name = "cesu8" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d43a04d8753f35258c91f8ec639f792891f748a1edbd759cf1dcea3382ad83c" [[package]] name = "cfg-if" @@ -493,16 +493,6 @@ checksum = "0fa961b519f0b462e3a3b4a34b64d119eeaca1d59af726fe450bbba07a9fc0a1" 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]] @@ -622,15 +612,6 @@ 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" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -696,6 +677,7 @@ "fiat-crypto", "rustc_version", "subtle", + "zeroize", ] [[package]] @@ -892,8 +874,10 @@ "curve25519-dalek", "ed25519", "rand_core 0.6.4", + "serde", "sha2", "subtle", + "zeroize", ] [[package]] @@ -1033,6 +1017,17 @@ ] [[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" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -1052,12 +1047,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" @@ -1248,13 +1237,11 @@ 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 @@ 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 @@ 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 @@ [[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 @@ "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 @@ [[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 @@ dependencies = [ "arc-swap", "axum", + "bytes", "chrono", "cid", "data-encoding", @@ -1521,7 +1505,7 @@ "tempfile", "thiserror 2.0.18", "tokio", - "tokio-tungstenite", + "tokio-tungstenite 0.28.0", "tower-http", "tracing", "tracing-subscriber", @@ -1565,6 +1549,7 @@ "tokio", "tokio-rustls", "tower-service", + "webpki-roots", ] [[package]] @@ -1829,27 +1814,23 @@ [[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 @@ "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 @@ "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 @@ "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 @@ [[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 @@ "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 @@ [[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", @@ -1985,28 +1973,6 @@ "tokio", "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" @@ -2071,6 +2037,12 @@ ] [[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" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -2108,6 +2080,15 @@ "scoped-tls", "tracing", "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]] @@ -2149,17 +2130,15 @@ [[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]] @@ -2261,23 +2240,6 @@ ] [[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" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -2299,12 +2261,6 @@ "serde", "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" @@ -2371,10 +2327,6 @@ 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" @@ -2476,6 +2428,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" @@ -2645,7 +2639,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "434b42fec591c96ef50e21e886936e66d3cc3f737104fdb9b737c40ffb94c098" dependencies = [ - "aws-lc-rs", "bytes", "getrandom 0.3.4", "lru-slab", @@ -2698,11 +2691,22 @@ [[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", ] @@ -2715,6 +2719,16 @@ "chacha20", "getrandom 0.4.2", "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]] @@ -2761,6 +2775,26 @@ ] [[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" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -2797,9 +2831,9 @@ [[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 @@ "quinn", "rustls", "rustls-pki-types", - "rustls-platform-verifier", "serde", "serde_json", + "serde_urlencoded", "sync_wrapper", "tokio", "tokio-rustls", @@ -2836,6 +2870,7 @@ "wasm-bindgen-futures", "wasm-streams", "web-sys", + "webpki-roots", ] [[package]] @@ -2928,6 +2963,7 @@ "aws-lc-rs", "log", "once_cell", + "ring", "rustls-pki-types", "rustls-webpki", "subtle", @@ -2955,33 +2991,6 @@ "web-time", "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" @@ -3012,15 +3021,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" @@ -3327,6 +3327,12 @@ 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" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -3489,12 +3495,6 @@ "core-foundation-sys", "libc", ] - -[[package]] -name = "tagptr" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b2093cf4c8eb1e67749a6762251bc9cd836b6fc171623bd0a9d324d37af2417" [[package]] name = "tempfile" @@ -3662,6 +3662,22 @@ [[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" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d25a406cddcc431a75d3d9afc6a7c0f7428d4891dd973e4d54c56b46127bf857" @@ -3673,7 +3689,26 @@ "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]] @@ -3823,6 +3858,26 @@ [[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" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8628dcc84e5a09eb3d8423d6cb682965dea9133204e8fb3efee74c2a0c259442" @@ -3920,12 +3975,6 @@ ] [[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" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -3936,17 +3985,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" @@ -3965,16 +4003,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" @@ -4092,9 +4120,9 @@ [[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 @@ ] [[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", ] @@ -4149,15 +4177,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" @@ -4231,15 +4250,6 @@ [[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" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" @@ -4272,21 +4282,6 @@ checksum = "ae137229bcbd6cdf0f7b80a31df61766145077ddf49416a728b02cb3921ff3fc" 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]] @@ -4339,12 +4334,6 @@ [[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" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" @@ -4363,12 +4352,6 @@ [[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" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" @@ -4384,12 +4367,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" @@ -4423,12 +4400,6 @@ [[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" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" @@ -4444,12 +4415,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" @@ -4471,12 +4436,6 @@ [[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" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" @@ -4492,12 +4451,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" diff --git a/Cargo.toml b/Cargo.toml --- a/Cargo.toml +++ b/Cargo.toml @@ -25,18 +25,19 @@ 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/resolver.rs b/src/resolver.rs --- 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; @@ -18,6 +19,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 { @@ -72,7 +75,9 @@ 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 @@ .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 --- a/src/types.rs +++ b/src/types.rs @@ -241,7 +241,7 @@ pub status: Option>, } -use jacquard_common::bytes::Bytes; +use bytes::Bytes; #[derive(Serialize, Deserialize, Clone)] pub(crate) enum StoredData { @@ -291,7 +291,7 @@ } 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 --- 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; @@ -153,4 +155,10 @@ 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() } diff --git a/src/backfill/mod.rs b/src/backfill/mod.rs --- a/src/backfill/mod.rs +++ b/src/backfill/mod.rs @@ -32,7 +32,7 @@ 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 @@ // 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 --- 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 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 --- 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, -- tangled.sh