diff --git a/Cargo.lock b/Cargo.lock index 63edfe585..23223c2f2 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -472,6 +472,45 @@ dependencies = [ "term", ] +[[package]] +name = "asn1-rs" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "56624a96882bb8c26d61312ae18cb45868e5a9992ea73c58e45c3101e56a1e60" +dependencies = [ + "asn1-rs-derive", + "asn1-rs-impl", + "displaydoc", + "nom 7.1.3", + "num-traits", + "rusticata-macros", + "thiserror 2.0.16", + "time", +] + +[[package]] +name = "asn1-rs-derive" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3109e49b1e4909e9db6515a30c633684d68cdeaa252f215214cb4fa1a5bfee2c" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.106", + "synstructure", +] + +[[package]] +name = "asn1-rs-impl" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7b18050c2cd6fe86c3a76584ef5e0baf286d038cda203eb6223df2cc413565f7" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.106", +] + [[package]] name = "assert-json-diff" version = "2.0.2" @@ -530,6 +569,19 @@ dependencies = [ "pin-project-lite", ] +[[package]] +name = "async-compression" +version = "0.4.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "977eb15ea9efd848bb8a4a1a2500347ed7f0bf794edf0dc3ddcf439f43d36b23" +dependencies = [ + "compression-codecs", + "compression-core", + "futures-core", + "pin-project-lite", + "tokio", +] + [[package]] name = "async-executor" version = "1.13.2" @@ -910,13 +962,30 @@ dependencies = [ "zeroize", ] +[[package]] +name = "aws-lc-fips-sys" +version = "0.13.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e78aabce84ab79501f4777e89cdcaec2a6ba9b051e6e6f26496598a84215c26" +dependencies = [ + "bindgen 0.72.1", + "cc", + "cmake", + "dunce", + "fs_extra", + "libloading", + "regex", +] + [[package]] name = "aws-lc-rs" version = "1.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "93fcc8f365936c834db5514fc45aee5b1202d677e6b40e48468aaaa8183ca8c7" dependencies = [ + "aws-lc-fips-sys", "aws-lc-sys", + "untrusted 0.7.1", "zeroize", ] @@ -926,7 +995,7 @@ version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "61b1d86e7705efe1be1b569bab41d4fa1e14e220b60a160f78de2db687add079" dependencies = [ - "bindgen", + "bindgen 0.69.5", "cc", "cmake", "dunce", @@ -1563,6 +1632,26 @@ dependencies = [ "which", ] +[[package]] +name = "bindgen" +version = "0.72.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "993776b509cfb49c750f11b8f07a46fa23e0a1386ffc01fb1e7d343efc387895" +dependencies = [ + "bitflags 2.9.1", + "cexpr", + "clang-sys", + "itertools 0.13.0", + "log", + "prettyplease", + "proc-macro2", + "quote", + "regex", + "rustc-hash 2.1.1", + "shlex", + "syn 2.0.106", +] + [[package]] name = "bit-set" version = "0.5.3" @@ -2052,7 +2141,7 @@ dependencies = [ "ref-cast", "serde", "serde_json", - "smol_str", + "smol_str 0.2.2", "thiserror 1.0.69", ] @@ -2074,7 +2163,7 @@ dependencies = [ "serde", "serde_json", "serde_with", - "smol_str", + "smol_str 0.2.2", "stacker", "thiserror 1.0.69", ] @@ -2090,7 +2179,7 @@ dependencies = [ "serde", "serde_json", "serde_with", - "smol_str", + "smol_str 0.2.2", "stacker", "thiserror 1.0.69", "unicode-security", @@ -2354,6 +2443,26 @@ dependencies = [ "static_assertions", ] +[[package]] +name = "compression-codecs" +version = "0.4.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "485abf41ac0c8047c07c87c72c8fb3eb5197f6e9d7ded615dfd1a00ae00a0f64" +dependencies = [ + "brotli", + "compression-core", + "flate2", + "memchr", + "zstd 0.13.3", + "zstd-safe 7.2.4", +] + +[[package]] +name = "compression-core" +version = "0.4.29" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e47641d3deaf41fb1538ac1f54735925e275eaf3bf4d55c81b137fba797e5cbb" + [[package]] name = "concurrent-queue" version = "2.5.0" @@ -2531,6 +2640,12 @@ dependencies = [ "cfg-if", ] +[[package]] +name = "critical-section" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "790eea4361631c5e7d22598ecd5723ff611904e3344ce8720784c93e3d83d40b" + [[package]] name = "crossbeam-channel" version = "0.5.15" @@ -3417,6 +3532,20 @@ dependencies = [ "zeroize", ] +[[package]] +name = "der-parser" +version = "10.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "07da5016415d5a3c4dd39b11ed26f915f52fc4e0dc197d87908bc916e51bc1a6" +dependencies = [ + "asn1-rs", + "displaydoc", + "nom 7.1.3", + "num-bigint", + "num-traits", + "rusticata-macros", +] + [[package]] name = "deranged" version = "0.4.0" @@ -4420,6 +4549,7 @@ checksum = "4a3d7db9596fecd151c5f638c0ee5d5bd487b6e0ea232e5dc96d5250f6f94b1d" dependencies = [ "crc32fast", "libz-rs-sys", + "libz-sys", "miniz_oxide", ] @@ -4437,6 +4567,7 @@ checksum = "da0e4dd2a88388a1f4ccc7c9ce104604dab68d9f408dc34cd45823d5a9069095" dependencies = [ "futures-core", "futures-sink", + "nanorand", "spin 0.9.8", ] @@ -4458,7 +4589,28 @@ version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f6f339eb8adc052cd2ca78910fda869aefa38d22d5cb648e6485e4d3fc06f3b1" dependencies = [ - "foreign-types-shared", + "foreign-types-shared 0.1.1", +] + +[[package]] +name = "foreign-types" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d737d9aa519fb7b749cbc3b962edcf310a8dd1f4b67c91c4f83975dbdd17d965" +dependencies = [ + "foreign-types-macros", + "foreign-types-shared 0.3.1", +] + +[[package]] +name = "foreign-types-macros" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1a5c6c585bc94aaf2c7b51dd4c2ba22680844aba4c687be581871a6f518c5742" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.106", ] [[package]] @@ -4467,6 +4619,12 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" +[[package]] +name = "foreign-types-shared" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aa9a19cbb55df58761df49b23516a86d432839add4af60fc256da840f66ed35b" + [[package]] name = "form_urlencoded" version = "1.2.2" @@ -4502,6 +4660,16 @@ version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "42703706b716c37f96a77aea830392ad231f44c9e9a67872fa5548707e11b11c" +[[package]] +name = "fslock" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "04412b8935272e3a9bae6f48c7bfff74c2911f60525404edfdd28e49884c3bfb" +dependencies = [ + "libc", + "winapi", +] + [[package]] name = "fsst" version = "0.33.0" @@ -5088,6 +5256,31 @@ dependencies = [ "url", ] +[[package]] +name = "hickory-proto" +version = "0.25.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8a6fe56c0038198998a6f217ca4e7ef3a5e51f46163bd6dd60b5c71ca6c6502" +dependencies = [ + "async-trait", + "cfg-if", + "data-encoding", + "enum-as-inner", + "futures-channel", + "futures-io", + "futures-util", + "idna", + "ipnet", + "once_cell", + "rand 0.9.1", + "ring 0.17.14", + "thiserror 2.0.16", + "tinyvec", + "tokio", + "tracing", + "url", +] + [[package]] name = "hickory-resolver" version = "0.24.4" @@ -5096,7 +5289,7 @@ checksum = "cbb117a1ca520e111743ab2f6688eddee69db4e0ea242545a604dce8a66fd22e" dependencies = [ "cfg-if", "futures-util", - "hickory-proto", + "hickory-proto 0.24.4", "ipconfig", "lru-cache", "once_cell", @@ -5109,6 +5302,27 @@ dependencies = [ "tracing", ] +[[package]] +name = "hickory-resolver" +version = "0.25.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc62a9a99b0bfb44d2ab95a7208ac952d31060efc16241c87eaf36406fecf87a" +dependencies = [ + "cfg-if", + "futures-util", + "hickory-proto 0.25.2", + "ipconfig", + "moka", + "once_cell", + "parking_lot", + "rand 0.9.1", + "resolv-conf", + "smallvec", + "thiserror 2.0.16", + "tokio", + "tracing", +] + [[package]] name = "hkdf" version = "0.12.4" @@ -5210,6 +5424,12 @@ dependencies = [ "pin-project-lite", ] +[[package]] +name = "http-range-header" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9171a2ea8a68358193d15dd5d70c1c10a2afc3e7e4c5bc92bc9f025cebd7359c" + [[package]] name = "httparse" version = "1.10.1" @@ -6632,6 +6852,17 @@ dependencies = [ "zlib-rs", ] +[[package]] +name = "libz-sys" +version = "1.1.22" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b70e7a7df205e92a1a4cd9aaae7898dac0aa555503cc0a649494d0d60e7651d" +dependencies = [ + "cc", + "pkg-config", + "vcpkg", +] + [[package]] name = "linfa-linalg" version = "0.1.0" @@ -6695,7 +6926,10 @@ checksum = "419e0dc8046cb947daa77eb95ae174acfbddb7673b4151f56d1eed8e93fbfaca" dependencies = [ "cfg-if", "generator", + "pin-utils", "scoped-tls", + "serde", + "serde_json", "tracing", "tracing-subscriber", ] @@ -6940,6 +7174,12 @@ dependencies = [ "digest", ] +[[package]] +name = "md5" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ae960838283323069879657ca3de837e9f7bbb4c7bf6ea7f1b290d5e9476d2e0" + [[package]] name = "measure_time" version = "0.9.0" @@ -7103,8 +7343,8 @@ dependencies = [ "futures-io", "futures-util", "hex", - "hickory-proto", - "hickory-resolver", + "hickory-proto 0.24.4", + "hickory-resolver 0.24.4", "hmac", "macro_magic", "md-5", @@ -7205,6 +7445,15 @@ dependencies = [ "rand 0.8.5", ] +[[package]] +name = "nanorand" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6a51313c5820b0b02bd422f4b44776fbf47961755c74ce64afc73bfad10226c3" +dependencies = [ + "getrandom 0.2.16", +] + [[package]] name = "native-tls" version = "0.2.14" @@ -7585,11 +7834,24 @@ dependencies = [ "tokio", ] +[[package]] +name = "oid-registry" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "12f40cff3dde1b6087cc5d5f5d4d65712f34016a03ed60e9c08dcc392736b5b7" +dependencies = [ + "asn1-rs", +] + [[package]] name = "once_cell" version = "1.21.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "42f5e15c9953c5e4ccceeb2e7382a716482c34515315f7b03532b8b4e8393d2d" +dependencies = [ + "critical-section", + "portable-atomic", +] [[package]] name = "oneshot" @@ -7679,7 +7941,7 @@ checksum = "8505734d46c8ab1e19a1dce3aef597ad87dcb4c37e7188231769bd6bd51cebf8" dependencies = [ "bitflags 2.9.1", "cfg-if", - "foreign-types", + "foreign-types 0.3.2", "libc", "once_cell", "openssl-macros", @@ -8528,6 +8790,15 @@ dependencies = [ "prost", ] +[[package]] +name = "psl" +version = "2.1.148" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "53297a72c400b31c5facd8e50894d08d20b74ee74925b28a20d51fe48c863583" +dependencies = [ + "psl-types", +] + [[package]] name = "psl-types" version = "2.0.11" @@ -8730,63 +9001,499 @@ dependencies = [ ] [[package]] -name = "rand" -version = "0.8.5" +name = "rama" +version = "0.3.0-alpha.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" +checksum = "8b9abba26d2a4a60eb94a17224755035ce03f06fd1f3448915cbd8bf02dd838d" dependencies = [ - "libc", - "rand_chacha 0.3.1", - "rand_core 0.6.4", + "pin-project-lite", + "rama-core", + "rama-crypto", + "rama-dns", + "rama-http", + "rama-http-backend", + "rama-http-core", + "rama-net", + "rama-socks5", + "rama-tcp", + "rama-tls-boring", + "rama-tower", + "rama-ua", + "rama-unix", + "rama-utils", + "rama-ws", + "rustversion", + "tokio", ] [[package]] -name = "rand" -version = "0.9.1" +name = "rama-boring" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9fbfd9d094a40bf3ae768db9361049ace4c0e04a4fd6b359518bd7b73a73dd97" +checksum = "c6c52217ff947d630f3807cde9f8fe4cc69005b17a1e81fc99fa432cb3fb9c78" dependencies = [ - "rand_chacha 0.9.0", - "rand_core 0.9.3", + "bitflags 2.9.1", + "foreign-types 0.5.0", + "libc", + "openssl-macros", + "rama-boring-sys", ] [[package]] -name = "rand_chacha" -version = "0.3.1" +name = "rama-boring-sys" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" +checksum = "1c7fd7057828ca9fa148c704f1bf0fff12f6367891212c9c0caad63ae17902a7" dependencies = [ - "ppv-lite86", - "rand_core 0.6.4", + "autocfg", + "bindgen 0.72.1", + "cmake", + "fs_extra", + "fslock", ] [[package]] -name = "rand_chacha" -version = "0.9.0" +name = "rama-boring-tokio" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3022b5f1df60f26e1ffddd6c66e8aa15de382ae63b3a0c1bfc0e4d3e3f325cb" +checksum = "b07c71d66f9fa0b52b02055b94c779e98fc27d228e67105c6e528cfd1f19a7a4" dependencies = [ - "ppv-lite86", - "rand_core 0.9.3", + "rama-boring", + "rama-boring-sys", + "tokio", ] [[package]] -name = "rand_core" -version = "0.6.4" +name = "rama-core" +version = "0.3.0-alpha.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" +checksum = "ea03771324b3d27a4d5d450bdd288fdeac87638f7cdb5870f3d1da6503542483" dependencies = [ - "getrandom 0.2.16", + "async-stream", + "bytes", + "futures", + "parking_lot", + "pin-project-lite", + "rama-error", + "rama-macros", + "rama-utils", + "tokio", + "tokio-graceful", + "tracing", ] [[package]] -name = "rand_core" -version = "0.9.3" +name = "rama-crypto" +version = "0.3.0-alpha.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "99d9a13982dcf210057a8a78572b2217b667c3beacbf3a0d8b454f6f82837d38" +checksum = "91965fc4cb4bc45bd2980f6388f97dbc955bcf164fdbd81fc0e9155c4e9abe2f" dependencies = [ - "getrandom 0.3.3", -] + "aws-lc-rs", + "base64 0.22.1", + "rama-core", + "rama-utils", + "rcgen", + "rustls-pki-types", + "serde", + "serde_json", + "x509-parser 0.18.0", +] + +[[package]] +name = "rama-dns" +version = "0.3.0-alpha.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7556de219395b9b170f9fdbff10ee6a1c022749207a2d013c0c89e197bbaae3c" +dependencies = [ + "hickory-resolver 0.25.2", + "rama-core", + "rama-net", + "rama-utils", + "serde", + "tokio", +] + +[[package]] +name = "rama-error" +version = "0.3.0-alpha.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1b3236ea868a50937223cbe56130b99725235c001ca8886cc01bf599736c9766" + +[[package]] +name = "rama-http" +version = "0.3.0-alpha.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "52279e9b6c364ac8db44209707544eac45a3b79c1953cb3cd3985272565d9818" +dependencies = [ + "async-compression", + "bitflags 2.9.1", + "chrono", + "const_format", + "csv", + "flate2", + "http-range-header", + "httpdate", + "iri-string", + "matchit 0.8.4", + "mime", + "mime_guess", + "percent-encoding", + "pin-project-lite", + "rama-core", + "rama-error", + "rama-http-headers", + "rama-http-types", + "rama-net", + "rama-ua", + "rama-utils", + "rand 0.9.1", + "rawzip", + "regex", + "serde", + "serde_html_form", + "serde_json", + "smol_str 0.3.2", + "tokio", + "tokio-util", + "uuid 1.18.1", +] + +[[package]] +name = "rama-http-backend" +version = "0.3.0-alpha.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f53a4fab6c60854a5d53dccdfdec7b86be697269d523adfff3ff13cca7455a9" +dependencies = [ + "const_format", + "futures", + "h2 0.4.10", + "pin-project-lite", + "rama-core", + "rama-http", + "rama-http-core", + "rama-http-headers", + "rama-http-types", + "rama-net", + "rama-tcp", + "rama-unix", + "rama-utils", + "tokio", +] + +[[package]] +name = "rama-http-core" +version = "0.3.0-alpha.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "42d2a4dc0b90d0ff7a2b7eda9993b51c7ad234b343c700f480ff83f7dea46966" +dependencies = [ + "atomic-waker", + "futures-channel", + "httparse", + "httpdate", + "indexmap 2.11.4", + "itoa", + "pin-project-lite", + "rama-core", + "rama-http", + "rama-http-types", + "rama-net", + "slab", + "smallvec", + "tokio", + "tokio-test", + "tokio-util", + "want", +] + +[[package]] +name = "rama-http-headers" +version = "0.3.0-alpha.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c49d5a5f7c95eaffab07609767ed60d52f6c56e7c2115565311545e7141ecd23" +dependencies = [ + "base64 0.22.1", + "httpdate", + "mime", + "rama-core", + "rama-error", + "rama-http-types", + "rama-macros", + "rama-net", + "rama-utils", + "rand 0.9.1", + "serde", + "sha1", +] + +[[package]] +name = "rama-http-types" +version = "0.3.0-alpha.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "020137823b0d45de8eb78d261a45dc92a6d2cf763a948fc01ff922cd23eeabd3" +dependencies = [ + "const_format", + "fnv", + "http 1.3.1", + "http-body 1.0.1", + "http-body-util", + "itoa", + "memchr", + "mime", + "mime_guess", + "nom 8.0.0", + "pin-project-lite", + "rama-core", + "rama-error", + "rama-macros", + "rama-utils", + "rand 0.9.1", + "serde", + "serde_json", + "smallvec", + "smol_str 0.3.2", + "sync_wrapper 1.0.2", + "tokio", + "tokio-util", +] + +[[package]] +name = "rama-macros" +version = "0.3.0-alpha.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e8531184c892978544f6799b132e2ff7c00ceaf8b7d68c2d693ad441d351cbf5" +dependencies = [ + "proc-macro-crate 3.3.0", + "proc-macro2", + "quote", +] + +[[package]] +name = "rama-net" +version = "0.3.0-alpha.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5f2ca3d7c32de50880b81fc7d923fa3d9c9cf8d89c6557abdbd7e58758087926" +dependencies = [ + "const_format", + "flume", + "hex", + "ipnet", + "itertools 0.14.0", + "md5", + "nom 8.0.0", + "parking_lot", + "pin-project-lite", + "psl", + "radix_trie", + "rama-core", + "rama-http-types", + "rama-macros", + "rama-utils", + "serde", + "sha2", + "smol_str 0.3.2", + "socket2 0.6.0", + "tokio", +] + +[[package]] +name = "rama-socks5" +version = "0.3.0-alpha.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2aeb01a3889de2d2a30e2a9143ffd26e1ed805f04fc477b02883dc0b907533b2" +dependencies = [ + "byteorder", + "rama-core", + "rama-dns", + "rama-net", + "rama-tcp", + "rama-udp", + "rama-utils", + "rand 0.9.1", + "smallvec", + "tokio", +] + +[[package]] +name = "rama-tcp" +version = "0.3.0-alpha.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "90f6b443f656ccf6d4d3cf5e288f73d5484f92c17dbe9836a1cdf13b4c9a4f67" +dependencies = [ + "rama-core", + "rama-dns", + "rama-http-types", + "rama-net", + "rama-utils", + "rand 0.9.1", + "tokio", +] + +[[package]] +name = "rama-tls-boring" +version = "0.3.0-alpha.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fed51b8ae893be304f578b94702f92d564e5d293928349e92d6151d9ab78bf90" +dependencies = [ + "brotli", + "flate2", + "flume", + "itertools 0.14.0", + "moka", + "parking_lot", + "pin-project-lite", + "rama-boring", + "rama-boring-tokio", + "rama-core", + "rama-http-types", + "rama-net", + "rama-ua", + "rama-utils", + "schannel", + "tokio", + "zstd 0.13.3", +] + +[[package]] +name = "rama-tower" +version = "0.3.0-alpha.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f2236eed00294ddc68befaaf565e6924d1918c97eaf63d71e2448d6ab961d52c" +dependencies = [ + "rama-core", + "rama-http-types", + "tokio", + "tower-layer", + "tower-service", +] + +[[package]] +name = "rama-ua" +version = "0.3.0-alpha.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e496c2926de78dd36d3190fe852b11e39260079b05590c531b187c997078818c" +dependencies = [ + "itertools 0.14.0", + "rama-core", + "rama-http-headers", + "rama-http-types", + "rama-net", + "rama-utils", + "rand 0.9.1", + "serde", + "serde_json", +] + +[[package]] +name = "rama-udp" +version = "0.3.0-alpha.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0460c8db3b802ffa1d1f91bd375ee431da3780d6625d2503891e881ab115339a" +dependencies = [ + "rama-core", + "rama-net", + "tokio", + "tokio-util", +] + +[[package]] +name = "rama-unix" +version = "0.3.0-alpha.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fa5e3efecbd7ba29667df34c9a949ed36da1d7b4f8f7b43b3b45e6234bbd932f" +dependencies = [ + "rama-core", + "rama-net", + "tokio", + "tokio-util", +] + +[[package]] +name = "rama-utils" +version = "0.3.0-alpha.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "02fd73071ddb078866fb7fca5def45bbfa12e7ea1cd819a0e3b701bf09ba2c72" +dependencies = [ + "parking_lot", + "pin-project-lite", + "rama-macros", + "serde", + "smol_str 0.3.2", + "tokio", +] + +[[package]] +name = "rama-ws" +version = "0.3.0-alpha.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6a6d2cc376163a79bdb2b49e8caad99b6b9c204424f8307c52b04c6627fd8e0b" +dependencies = [ + "flate2", + "rama-core", + "rama-http", + "rama-net", + "rama-utils", + "rand 0.9.1", + "tokio", +] + +[[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.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9fbfd9d094a40bf3ae768db9361049ace4c0e04a4fd6b359518bd7b73a73dd97" +dependencies = [ + "rand_chacha 0.9.0", + "rand_core 0.9.3", +] + +[[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" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3022b5f1df60f26e1ffddd6c66e8aa15de382ae63b3a0c1bfc0e4d3e3f325cb" +dependencies = [ + "ppv-lite86", + "rand_core 0.9.3", +] + +[[package]] +name = "rand_core" +version = "0.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" +dependencies = [ + "getrandom 0.2.16", +] + +[[package]] +name = "rand_core" +version = "0.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "99d9a13982dcf210057a8a78572b2217b667c3beacbf3a0d8b454f6f82837d38" +dependencies = [ + "getrandom 0.3.3", +] [[package]] name = "rand_distr" @@ -8900,6 +9607,12 @@ version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "60a357793950651c4ed0f3f52338f53b2f809f32d83a07f72909fa13e4c6c1e3" +[[package]] +name = "rawzip" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "70171b805bd97a69690df1b634104649ad193430aa60d8305dfb9b470fe690a8" + [[package]] name = "rayon" version = "1.10.0" @@ -8931,6 +9644,20 @@ dependencies = [ "crossbeam-utils", ] +[[package]] +name = "rcgen" +version = "0.14.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0068c5b3cab1d4e271e0bb6539c87563c43411cad90b057b15c79958fbeb41f7" +dependencies = [ + "aws-lc-rs", + "pem 3.0.5", + "rustls-pki-types", + "time", + "x509-parser 0.17.0", + "yasna", +] + [[package]] name = "reblessive" version = "0.4.3" @@ -9356,6 +10083,7 @@ dependencies = [ "opentelemetry_sdk", "ordered-float", "quick-xml", + "rama", "rayon", "reqwest 0.12.23", "reqwest-eventsource", @@ -9935,6 +10663,15 @@ dependencies = [ "semver", ] +[[package]] +name = "rusticata-macros" +version = "4.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "faf0c4a6ece9950b9abdb62b1cfcf2a68b3b67a10ba445b3bb85be2a293d0632" +dependencies = [ + "nom 7.1.3", +] + [[package]] name = "rustix" version = "0.38.44" @@ -10501,6 +11238,19 @@ dependencies = [ "syn 2.0.106", ] +[[package]] +name = "serde_html_form" +version = "0.2.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b2f2d7ff8a2140333718bb329f5c40fc5f0865b84c426183ce14c97d2ab8154f" +dependencies = [ + "form_urlencoded", + "indexmap 2.11.4", + "itoa", + "ryu", + "serde_core", +] + [[package]] name = "serde_json" version = "1.0.143" @@ -10829,6 +11579,16 @@ dependencies = [ "serde", ] +[[package]] +name = "smol_str" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9676b89cd56310a87b93dec47b11af744f34d5fc9f367b829474eec0a891350d" +dependencies = [ + "borsh", + "serde", +] + [[package]] name = "snafu" version = "0.8.9" @@ -12102,6 +12862,19 @@ dependencies = [ "windows-sys 0.59.0", ] +[[package]] +name = "tokio-graceful" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "45740b38b48641855471cd402922e89156bdfbd97b69b45eeff170369cc18c7d" +dependencies = [ + "loom", + "pin-project-lite", + "slab", + "tokio", + "tracing", +] + [[package]] name = "tokio-macros" version = "2.5.0" @@ -13836,6 +14609,41 @@ dependencies = [ "tap", ] +[[package]] +name = "x509-parser" +version = "0.17.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4569f339c0c402346d4a75a9e39cf8dad310e287eef1ff56d4c68e5067f53460" +dependencies = [ + "asn1-rs", + "data-encoding", + "der-parser", + "lazy_static", + "nom 7.1.3", + "oid-registry", + "ring 0.17.14", + "rusticata-macros", + "thiserror 2.0.16", + "time", +] + +[[package]] +name = "x509-parser" +version = "0.18.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eb3e137310115a65136898d2079f003ce33331a6c4b0d51f1531d1be082b6425" +dependencies = [ + "asn1-rs", + "data-encoding", + "der-parser", + "lazy_static", + "nom 7.1.3", + "oid-registry", + "rusticata-macros", + "thiserror 2.0.16", + "time", +] + [[package]] name = "xattr" version = "1.5.1" @@ -13870,6 +14678,15 @@ version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "09041cd90cf85f7f8b2df60c646f853b7f535ce68f85244eb6731cf89fa498ec" +[[package]] +name = "yasna" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e17bb3549cc1321ae1296b9cdc2698e2b6cb1992adfa19a8c72e5b7a738f44cd" +dependencies = [ + "time", +] + [[package]] name = "yoke" version = "0.7.5" diff --git a/Cargo.toml b/Cargo.toml index 4b2a813b7..5c931ee78 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -84,7 +84,7 @@ tokio-rusqlite = { version = "0.6.0", default-features = false } tokio-test = "0.4.4" tracing = "0.1.41" tracing-subscriber = "0.3.19" -uuid = "1.17.0" +uuid = "1.18.0" worker = "0.6" zerocopy = "0.8.26" reqwest-eventsource = "0.6.0" diff --git a/rig-core/Cargo.toml b/rig-core/Cargo.toml index cd7945010..88cf9231d 100644 --- a/rig-core/Cargo.toml +++ b/rig-core/Cargo.toml @@ -46,6 +46,7 @@ tokio = { workspace = true, features = ["rt", "sync"] } http = "1.3.1" tracing-futures = { version = "0.2.5", features = ["futures-03"] } serenity = { version = "0.12.4", optional = true } +rama = { version = "0.3.0-alpha.3", features = ["http-full"], optional = true } # requires cmake [dev-dependencies] anyhow = { workspace = true } @@ -99,6 +100,7 @@ reqwest-rustls = [ "reqwest/http2", "reqwest/macos-system-configuration", ] +rama = ["dep:rama"] [[test]] name = "embed_macro" diff --git a/rig-core/src/http_client.rs b/rig-core/src/http_client.rs index 6d4eda8eb..9e0cb4eee 100644 --- a/rig-core/src/http_client.rs +++ b/rig-core/src/http_client.rs @@ -170,3 +170,129 @@ impl HttpClientExt for reqwest::Client { } } } + +#[cfg(feature = "rama")] +#[cfg_attr(docsrs, doc(cfg(feature = "rama")))] +impl HttpClientExt + for rama::http::client::EasyHttpWebClient< + (), + rama::http::Body, + rama::net::client::EstablishedClientConnection>, + > +where + ModifiedBody: rama::http::dep::http_body::Body> + + Unpin + + Send + + 'static, + ConnResponse: rama::Service< + (), + Request, + Response = rama::http::Response, + Error = rama::error::BoxError, + >, +{ + fn send( + &self, + req: Request, + ) -> impl Future>>> + WasmCompatSend + 'static + where + T: Into, + U: From + WasmCompatSend, + { + use rama::http::dep::http_body_util::BodyExt; + let client = self.clone(); + use rama::Service; + let (parts, body) = req.into_parts(); + + let mut request = rama::http::Request::builder() + .uri(parts.uri) + .method(parts.method); + + for (key, val) in parts.headers { + request = request.header(key.unwrap(), val); + } + + let bytes: Bytes = body.into(); + let body = rama::http::Body::from(bytes); + + let req = request.body(body).unwrap(); + + async move { + let response = client + .serve(rama::Context::new((), rama::rt::Executor::new()), req) + .await + .map_err(instance_error)?; + + let mut res = Response::builder() + .status(response.status()) + .version(response.version()); + + if let Some(hs) = res.headers_mut() { + *hs = response.headers().clone(); + } + + let body: LazyBody = Box::pin(async move { + let bytes = response.into_body(); + let bytes = bytes.collect().await.unwrap().to_bytes(); + + let body = U::from(bytes); + Ok(body) + }); + + res.body(body).map_err(Error::Protocol) + } + } + + fn send_streaming( + &self, + req: Request, + ) -> impl Future> + WasmCompatSend + 'static + where + T: Into, + { + let client = self.clone(); + use futures::StreamExt; + use rama::Service; + let (parts, body) = req.into_parts(); + + let mut request = rama::http::Request::builder() + .uri(parts.uri) + .method(parts.method); + + for (key, val) in parts.headers { + request = request.header(key.unwrap(), val); + } + + let bytes: Bytes = body.into(); + let body = rama::http::Body::from(bytes); + + let req = request.body(body).unwrap(); + + async move { + let response = client + .serve(rama::Context::new((), rama::rt::Executor::new()), req) + .await + .unwrap(); + + #[cfg(not(target_family = "wasm"))] + let mut res = Response::builder() + .status(response.status()) + .version(response.version()); + + #[cfg(target_family = "wasm")] + let mut res = Response::builder().status(response.status()); + + if let Some(hs) = res.headers_mut() { + *hs = response.headers().clone(); + } + + let stream = response.into_body().into_data_stream(); + + let boxed_stream: std::pin::Pin< + Box> + Send>, + > = Box::pin(stream.map(|result| result.map_err(Error::Instance))); + res.body(boxed_stream) + .map_err(|_| Error::Instance("failed to build response".into())) + } + } +}