diff --git a/Cargo.lock b/Cargo.lock index 22c655b73d..bac382efc9 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -18,78 +18,24 @@ dependencies = [ "winapi", ] -[[package]] -name = "aead" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7fc95d1bdb8e6666b2b217308eeeb09f2d6728d104be3e31916cc74d15420331" -dependencies = [ - "generic-array", -] - -[[package]] -name = "aes" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "884391ef1066acaa41e766ba8f596341b96e93ce34f9a43e7d24bf0a0eaf0561" -dependencies = [ - "aes-soft", - "aesni", - "cipher 0.2.5", -] - [[package]] name = "aes" version = "0.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b169f7a6d4742236a0a00c541b845991d0ac43e546831af1249753ab4c3aa3a0" dependencies = [ - "cfg-if 1.0.4", - "cipher 0.4.4", + "cfg-if", + "cipher", "cpufeatures", ] -[[package]] -name = "aes-gcm" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5278b5fabbb9bd46e24aa69b2fdea62c99088e0a950a9be40e3e0101298f88da" -dependencies = [ - "aead", - "aes 0.6.0", - "cipher 0.2.5", - "ctr", - "ghash", - "subtle", -] - -[[package]] -name = "aes-soft" -version = "0.6.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be14c7498ea50828a38d0e24a765ed2effe92a705885b57d029cd67d45744072" -dependencies = [ - "cipher 0.2.5", - "opaque-debug", -] - -[[package]] -name = "aesni" -version = "0.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ea2e11f5e94c2f7d386164cc2aa1f97823fed6f259e486940a71c174dd01b0ce" -dependencies = [ - "cipher 0.2.5", - "opaque-debug", -] - [[package]] name = "ahash" version = "0.8.12" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5a15f179cd60c4584b8a8c596927aadc462e27f2ca70c04e0071964a73ba7a75" dependencies = [ - "cfg-if 1.0.4", + "cfg-if", "getrandom 0.3.4", "once_cell", "serde", @@ -198,18 +144,6 @@ version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3d62b7694a562cdf5a74227903507c56ab2cc8bdd1f781ed5cb4cf9c9f810bfc" -[[package]] -name = "arrayref" -version = "0.3.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76a2e8124351fda1ef8aaaa3bbd7ebbcb486bbcd4225aca0aa0d84bb2db8fecb" - -[[package]] -name = "arrayvec" -version = "0.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23b62fc65de8e4e7f52534fb52b0f3ed04746ae267519eef2a83941e8085068b" - [[package]] name = "asn1-rs" version = "0.7.1" @@ -223,7 +157,7 @@ dependencies = [ "num-traits", "rusticata-macros", "thiserror 2.0.18", - "time 0.3.47", + "time", ] [[package]] @@ -249,262 +183,6 @@ dependencies = [ "syn 2.0.117", ] -[[package]] -name = "async-channel" -version = "1.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81953c529336010edd6d8e358f886d9581267795c61b19475b71314bffa46d35" -dependencies = [ - "concurrent-queue", - "event-listener 2.5.3", - "futures-core", -] - -[[package]] -name = "async-channel" -version = "2.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "924ed96dd52d1b75e9c1a3e6275715fd320f5f9439fb5a4a11fa51f4221158d2" -dependencies = [ - "concurrent-queue", - "event-listener-strategy", - "futures-core", - "pin-project-lite 0.2.17", -] - -[[package]] -name = "async-dup" -version = "1.2.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7c2886ab563af5038f79ec016dd7b87947ed138b794e8dd64992962c9cca0411" -dependencies = [ - "async-lock 3.4.2", - "futures-io", -] - -[[package]] -name = "async-executor" -version = "1.14.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c96bf972d85afc50bf5ab8fe2d54d1586b4e0b46c97c50a0c9e71e2f7bcd812a" -dependencies = [ - "async-task", - "concurrent-queue", - "fastrand 2.4.1", - "futures-lite 2.6.1", - "pin-project-lite 0.2.17", - "slab", -] - -[[package]] -name = "async-global-executor" -version = "2.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05b1b633a2115cd122d73b955eadd9916c18c8f510ec9cd1686404c60ad1c29c" -dependencies = [ - "async-channel 2.5.0", - "async-executor", - "async-io 2.6.0", - "async-lock 3.4.2", - "blocking", - "futures-lite 2.6.1", - "once_cell", - "tokio", -] - -[[package]] -name = "async-global-executor" -version = "3.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "13f937e26114b93193065fd44f507aa2e9169ad0cdabbb996920b1fe1ddea7ba" -dependencies = [ - "async-channel 2.5.0", - "async-executor", - "async-io 2.6.0", - "async-lock 3.4.2", - "blocking", - "futures-lite 2.6.1", -] - -[[package]] -name = "async-h1" -version = "2.3.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d1d1dae8cb2c4258a79d6ed088b7fb9b4763bf4e9b22d040779761e046a2971" -dependencies = [ - "async-channel 1.9.0", - "async-dup", - "async-global-executor 2.4.1", - "async-io 1.13.0", - "futures-lite 1.13.0", - "http-types", - "httparse", - "log", - "pin-project", -] - -[[package]] -name = "async-io" -version = "1.13.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fc5b45d93ef0529756f812ca52e44c221b35341892d3dcc34132ac02f3dd2af" -dependencies = [ - "async-lock 2.8.0", - "autocfg", - "cfg-if 1.0.4", - "concurrent-queue", - "futures-lite 1.13.0", - "log", - "parking", - "polling 2.8.0", - "rustix 0.37.28", - "slab", - "socket2 0.4.10", - "waker-fn", -] - -[[package]] -name = "async-io" -version = "2.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "456b8a8feb6f42d237746d4b3e9a178494627745c3c56c6ea55d92ba50d026fc" -dependencies = [ - "autocfg", - "cfg-if 1.0.4", - "concurrent-queue", - "futures-io", - "futures-lite 2.6.1", - "parking", - "polling 3.11.0", - "rustix 1.1.4", - "slab", - "windows-sys 0.61.2", -] - -[[package]] -name = "async-lock" -version = "2.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "287272293e9d8c41773cec55e365490fe034813a2f172f502d6ddcf75b2f582b" -dependencies = [ - "event-listener 2.5.3", -] - -[[package]] -name = "async-lock" -version = "3.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "290f7f2596bd5b78a9fec8088ccd89180d7f9f55b94b0576823bbbdc72ee8311" -dependencies = [ - "event-listener 5.4.1", - "event-listener-strategy", - "pin-project-lite 0.2.17", -] - -[[package]] -name = "async-process" -version = "2.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fc50921ec0055cdd8a16de48773bfeec5c972598674347252c0399676be7da75" -dependencies = [ - "async-channel 2.5.0", - "async-io 2.6.0", - "async-lock 3.4.2", - "async-signal", - "async-task", - "blocking", - "cfg-if 1.0.4", - "event-listener 5.4.1", - "futures-lite 2.6.1", - "rustix 1.1.4", -] - -[[package]] -name = "async-session" -version = "2.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "345022a2eed092cd105cc1b26fd61c341e100bd5fcbbd792df4baf31c2cc631f" -dependencies = [ - "anyhow", - "async-std", - "async-trait", - "base64 0.12.3", - "bincode", - "blake3", - "chrono", - "hmac 0.8.1", - "kv-log-macro", - "rand 0.7.3", - "serde", - "serde_json", - "sha2 0.9.9", -] - -[[package]] -name = "async-signal" -version = "0.2.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "52b5aaafa020cf5053a01f2a60e8ff5dccf550f0f77ec54a4e47285ac2bab485" -dependencies = [ - "async-io 2.6.0", - "async-lock 3.4.2", - "atomic-waker", - "cfg-if 1.0.4", - "futures-core", - "futures-io", - "rustix 1.1.4", - "signal-hook-registry", - "slab", - "windows-sys 0.61.2", -] - -[[package]] -name = "async-sse" -version = "4.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53bba003996b8fd22245cd0c59b869ba764188ed435392cf2796d03b805ade10" -dependencies = [ - "async-channel 1.9.0", - "async-std", - "http-types", - "log", - "memchr", - "pin-project-lite 0.1.12", -] - -[[package]] -name = "async-std" -version = "1.13.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2c8e079a4ab67ae52b7403632e4618815d6db36d2a010cfe41b02c1b1578f93b" -dependencies = [ - "async-channel 1.9.0", - "async-global-executor 2.4.1", - "async-io 2.6.0", - "async-lock 3.4.2", - "async-process", - "crossbeam-utils", - "futures-channel", - "futures-core", - "futures-io", - "futures-lite 2.6.1", - "gloo-timers", - "kv-log-macro", - "log", - "memchr", - "once_cell", - "pin-project-lite 0.2.17", - "pin-utils", - "slab", - "wasm-bindgen-futures", -] - -[[package]] -name = "async-task" -version = "4.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b75356056920673b02621b35afd0f7dda9306d03c79a30f5c56c44cf256e3de" - [[package]] name = "async-trait" version = "0.1.89" @@ -529,22 +207,56 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c08606f8c3cbf4ce6ec8e28fb0014a2c086708fe954eaa885384a6165172e7e8" [[package]] -name = "base-x" -version = "0.2.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4cbbc9d0964165b47557570cce6c952866c2678457aca742aafc9fb771d30270" - -[[package]] -name = "base64" -version = "0.12.3" +name = "axum" +version = "0.8.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3441f0f7b02788e948e47f457ca01f1d7e6d92c693bc132c22b087d3141c03ff" +checksum = "31b698c5f9a010f6573133b09e0de5408834d0c82f8d7475a89fc1867a71cd90" +dependencies = [ + "axum-core", + "bytes", + "form_urlencoded", + "futures-util", + "http", + "http-body", + "http-body-util", + "hyper", + "hyper-util", + "itoa", + "matchit", + "memchr", + "mime", + "percent-encoding", + "pin-project-lite", + "serde_core", + "serde_json", + "serde_path_to_error", + "serde_urlencoded", + "sync_wrapper", + "tokio", + "tower", + "tower-layer", + "tower-service", + "tracing", +] [[package]] -name = "base64" -version = "0.13.1" +name = "axum-core" +version = "0.5.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8" +checksum = "08c78f31d7b1291f7ee735c1c6780ccde7785daae9a9206026862dab7d8792d1" +dependencies = [ + "bytes", + "futures-core", + "http", + "http-body", + "http-body-util", + "mime", + "pin-project-lite", + "sync_wrapper", + "tower-layer", + "tower-service", + "tracing", +] [[package]] name = "base64" @@ -603,30 +315,6 @@ dependencies = [ "serde_core", ] -[[package]] -name = "blake3" -version = "0.3.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b64485778c4f16a6a5a9d335e80d449ac6c70cdd6a06d2af18a6f6f775a125b3" -dependencies = [ - "arrayref", - "arrayvec", - "cc", - "cfg-if 0.1.10", - "constant_time_eq", - "crypto-mac 0.8.0", - "digest 0.9.0", -] - -[[package]] -name = "block-buffer" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4152116fd6e9dadb291ae18fc1ec3575ed6d84c29642d97890f4b4a3417297e4" -dependencies = [ - "generic-array", -] - [[package]] name = "block-buffer" version = "0.10.4" @@ -636,19 +324,6 @@ dependencies = [ "generic-array", ] -[[package]] -name = "blocking" -version = "1.6.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e83f8d02be6967315521be875afa792a316e28d57b5a2d401897e2a7921b7f21" -dependencies = [ - "async-channel 2.5.0", - "async-task", - "futures-io", - "futures-lite 2.6.1", - "piper", -] - [[package]] name = "bloomfilter" version = "1.0.16" @@ -715,12 +390,6 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6d43a04d8753f35258c91f8ec639f792891f748a1edbd759cf1dcea3382ad83c" -[[package]] -name = "cfg-if" -version = "0.1.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4785bdd1c96b2a846b2bd7cc02e86b6b3dbf14e7e53446c4f54c92a361040822" - [[package]] name = "cfg-if" version = "1.0.4" @@ -746,10 +415,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c673075a2e0e5f4a1dde27ce9dee1ea4558c7ffe648f576438a20ca1d2acc4b0" dependencies = [ "iana-time-zone", - "js-sys", "num-traits", "serde", - "wasm-bindgen", "windows-link", ] @@ -780,15 +447,6 @@ dependencies = [ "half", ] -[[package]] -name = "cipher" -version = "0.2.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "12f8e7987cbd042a63249497f41aed09f8e65add917ea6566effbc56578d6801" -dependencies = [ - "generic-array", -] - [[package]] name = "cipher" version = "0.4.4" @@ -876,12 +534,6 @@ version = "0.9.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c2459377285ad874054d797f3ccebf984978aa39129f6eafde5cdc8315b612f8" -[[package]] -name = "const_fn" -version = "0.4.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "413d67b29ef1021b4d60f4aa1e925ca031751e213832b4b1d588fae623c05c60" - [[package]] name = "const_format" version = "0.2.35" @@ -902,29 +554,6 @@ dependencies = [ "unicode-xid", ] -[[package]] -name = "constant_time_eq" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "245097e9a4535ee1e3e3931fcfcd55a796a44c643e8596ff6566d68f09b87bbc" - -[[package]] -name = "cookie" -version = "0.14.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "03a5d7b21829bc7b4bf4754a978a241ae54ea55a40f92bb20216e54096f4b951" -dependencies = [ - "aes-gcm", - "base64 0.13.1", - "hkdf", - "hmac 0.10.1", - "percent-encoding", - "rand 0.8.5", - "sha2 0.9.9", - "time 0.2.27", - "version_check", -] - [[package]] name = "core-foundation" version = "0.10.1" @@ -950,19 +579,13 @@ dependencies = [ "libc", ] -[[package]] -name = "cpuid-bool" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dcb25d077389e53838a8158c8e99174c5a9d902dee4904320db714f3c653ffba" - [[package]] name = "crc32fast" version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9481c1c90cbf2ac953f07c8d4a58aa3945c425b7185c9154d67a65e4230da511" dependencies = [ - "cfg-if 1.0.4", + "cfg-if", ] [[package]] @@ -1070,35 +693,6 @@ dependencies = [ "typenum", ] -[[package]] -name = "crypto-mac" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b584a330336237c1eecd3e94266efb216c56ed91225d634cb2991c5f3fd1aeab" -dependencies = [ - "generic-array", - "subtle", -] - -[[package]] -name = "crypto-mac" -version = "0.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4857fd85a0c34b3c3297875b747c1e02e06b6a0ea32dd892d8192b9ce0813ea6" -dependencies = [ - "generic-array", - "subtle", -] - -[[package]] -name = "ctr" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fb4a30d54f7443bf3d6191dcd486aca19e67cb3c49fa7a06a319966346707e7f" -dependencies = [ - "cipher 0.2.5", -] - [[package]] name = "darling" version = "0.23.0" @@ -1191,7 +785,7 @@ checksum = "799a97264921d8623a957f6c3b9011f3b5492f557bbb7a5a19b7fa6d06ba8dcb" dependencies = [ "proc-macro2", "quote", - "rustc_version 0.4.1", + "rustc_version", "syn 2.0.117", ] @@ -1201,22 +795,13 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6184e33543162437515c2e2b48714794e37845ec9851711914eec9d308f6ebe8" -[[package]] -name = "digest" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3dd60d1080a57a05ab032377049e0591415d2b31afd7028356dbf3cc6dcb066" -dependencies = [ - "generic-array", -] - [[package]] name = "digest" version = "0.10.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" dependencies = [ - "block-buffer 0.10.4", + "block-buffer", "const-oid", "crypto-common", "subtle", @@ -1243,12 +828,6 @@ dependencies = [ "windows-sys 0.61.2", ] -[[package]] -name = "discard" -version = "1.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "212d0f5754cb6769937f4501cc0e67f4f4483c8d2c3e1e922ee9edbe4ab4c7c0" - [[package]] name = "displaydoc" version = "0.2.5" @@ -1290,17 +869,6 @@ version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "877a4ace8713b0bcf2a4e7eec82529c029f1d0619886d18145fea96c3ffe5c0f" -[[package]] -name = "erased-serde" -version = "0.4.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2add8a07dd6a8d93ff627029c51de145e12686fbc36ecb298ac22e74cf02dec" -dependencies = [ - "serde", - "serde_core", - "typeid", -] - [[package]] name = "errno" version = "0.2.8" @@ -1332,12 +900,6 @@ dependencies = [ "libc", ] -[[package]] -name = "event-listener" -version = "2.5.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0206175f82b8d6bf6652ff7d71a1e27fd2e4efde587fd368662814d6ec1d9ce0" - [[package]] name = "event-listener" version = "5.4.1" @@ -1346,17 +908,7 @@ checksum = "e13b66accf52311f30a0db42147dadea9850cb48cd070028831ae5f5d4b856ab" dependencies = [ "concurrent-queue", "parking", - "pin-project-lite 0.2.17", -] - -[[package]] -name = "event-listener-strategy" -version = "0.5.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8be9f3dfaaffdae2972880079a491a1a8bb7cbed0b8dd7a347f668b4150a3b93" -dependencies = [ - "event-listener 5.4.1", - "pin-project-lite 0.2.17", + "pin-project-lite", ] [[package]] @@ -1382,37 +934,12 @@ dependencies = [ "siphasher", ] -[[package]] -name = "fastrand" -version = "1.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e51093e27b0797c359783294ca4f0a911c270184cb10f85783b118614a1501be" -dependencies = [ - "instant", -] - [[package]] name = "fastrand" version = "2.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9f1f227452a390804cdb637b74a86990f2a7d7ba4b7d5693aac9b4dd6defd8d6" -[[package]] -name = "femme" -version = "2.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cc04871e5ae3aa2952d552dae6b291b3099723bf779a8054281c1366a54613ef" -dependencies = [ - "cfg-if 1.0.4", - "js-sys", - "log", - "serde", - "serde_derive", - "serde_json", - "wasm-bindgen", - "web-sys", -] - [[package]] name = "filepath" version = "0.1.3" @@ -1545,34 +1072,6 @@ version = "0.3.32" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cecba35d7ad927e23624b22ad55235f2239cfa44fd10428eecbeba6d6a717718" -[[package]] -name = "futures-lite" -version = "1.13.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49a9d51ce47660b1e808d3c990b4709f2f415d928835a17dfd16991515c46bce" -dependencies = [ - "fastrand 1.9.0", - "futures-core", - "futures-io", - "memchr", - "parking", - "pin-project-lite 0.2.17", - "waker-fn", -] - -[[package]] -name = "futures-lite" -version = "2.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f78e10609fe0e0b3f4157ffab1876319b5b0db102a2c60dc4626306dc46b44ad" -dependencies = [ - "fastrand 2.4.1", - "futures-core", - "futures-io", - "parking", - "pin-project-lite 0.2.17", -] - [[package]] name = "futures-macro" version = "0.3.32" @@ -1609,7 +1108,7 @@ dependencies = [ "futures-sink", "futures-task", "memchr", - "pin-project-lite 0.2.17", + "pin-project-lite", "slab", ] @@ -1623,27 +1122,16 @@ dependencies = [ "version_check", ] -[[package]] -name = "getrandom" -version = "0.1.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8fc3cb4d91f53b50155bdcfd23f6a4c39ae1969c2ae85982b135750cccaf5fce" -dependencies = [ - "cfg-if 1.0.4", - "libc", - "wasi 0.9.0+wasi-snapshot-preview1", -] - [[package]] name = "getrandom" version = "0.2.17" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ff2abc00be7fca6ebc474524697ae276ad847ad0a6b3faa4bcb027e9a4614ad0" dependencies = [ - "cfg-if 1.0.4", + "cfg-if", "js-sys", "libc", - "wasi 0.11.1+wasi-snapshot-preview1", + "wasi", "wasm-bindgen", ] @@ -1653,7 +1141,7 @@ version = "0.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "899def5c37c4fd7b2664648c28120ecec138e4d395b459e5ca34f9cce2dd77fd" dependencies = [ - "cfg-if 1.0.4", + "cfg-if", "js-sys", "libc", "r-efi 5.3.0", @@ -1667,23 +1155,13 @@ version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0de51e6874e94e7bf76d726fc5d13ba782deca734ff60d5bb2fb2607c7406555" dependencies = [ - "cfg-if 1.0.4", + "cfg-if", "libc", "r-efi 6.0.0", "wasip2", "wasip3", ] -[[package]] -name = "ghash" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97304e4cd182c3846f7575ced3890c53012ce534ad9114046b0a9e00bb30a375" -dependencies = [ - "opaque-debug", - "polyval", -] - [[package]] name = "git-version" version = "0.3.9" @@ -1704,25 +1182,13 @@ dependencies = [ "syn 2.0.117", ] -[[package]] -name = "gloo-timers" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bbb143cf96099802033e0d4f4963b19fd2e0b728bcf076cd9cf7f6634f092994" -dependencies = [ - "futures-channel", - "futures-core", - "js-sys", - "wasm-bindgen", -] - [[package]] name = "half" version = "2.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6ea2d84b969582b4b1864a92dc5d27cd2b77b622a8d79306834f1be5ba20d84b" dependencies = [ - "cfg-if 1.0.4", + "cfg-if", "crunchy", "zerocopy", ] @@ -1764,16 +1230,10 @@ dependencies = [ ] [[package]] -name = "heck" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" - -[[package]] -name = "hermit-abi" -version = "0.3.9" +name = "heck" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d231dfb89cfffdbc30e7fc41579ed6066ad03abda9e567ccafae602b97ec5024" +checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" [[package]] name = "hermit-abi" @@ -1787,43 +1247,13 @@ version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" -[[package]] -name = "hkdf" -version = "0.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "51ab2f639c231793c5f6114bdb9bbe50a7dbbfcd7c7c6bd8475dec2d991e964f" -dependencies = [ - "digest 0.9.0", - "hmac 0.10.1", -] - -[[package]] -name = "hmac" -version = "0.8.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "126888268dcc288495a26bf004b38c5fdbb31682f992c84ceb046a1f0fe38840" -dependencies = [ - "crypto-mac 0.8.0", - "digest 0.9.0", -] - -[[package]] -name = "hmac" -version = "0.10.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1441c6b1e930e2817404b5046f1f989899143a12bf92de603b69f4e0aee1e15" -dependencies = [ - "crypto-mac 0.10.0", - "digest 0.9.0", -] - [[package]] name = "hmac" version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6c49c37c09c17a53d937dfbb742eb3a961d65a994e6bcdcf37e7399d0cc8ab5e" dependencies = [ - "digest 0.10.7", + "digest", ] [[package]] @@ -1846,37 +1276,26 @@ dependencies = [ ] [[package]] -name = "http-client" -version = "6.5.3" +name = "http-body" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1947510dc91e2bf586ea5ffb412caad7673264e14bb39fb9078da114a94ce1a5" +checksum = "1efedce1fb8e6913f23e0c92de8e62cd5b772a67e7b3946df930a62566c93184" dependencies = [ - "async-trait", - "cfg-if 1.0.4", - "http-types", - "log", + "bytes", + "http", ] [[package]] -name = "http-types" -version = "2.12.0" +name = "http-body-util" +version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e9b187a72d63adbfba487f48095306ac823049cb504ee195541e91c7775f5ad" +checksum = "b021d93e26becf5dc7e1b75b1bed1fd93124b374ceb73f43d4d4eafec896a64a" dependencies = [ - "anyhow", - "async-channel 1.9.0", - "async-std", - "base64 0.13.1", - "cookie", - "futures-lite 1.13.0", - "infer", - "pin-project-lite 0.2.17", - "rand 0.7.3", - "serde", - "serde_json", - "serde_qs", - "serde_urlencoded", - "url", + "bytes", + "futures-core", + "http", + "http-body", + "pin-project-lite", ] [[package]] @@ -1885,12 +1304,53 @@ version = "1.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6dbf3de79e51f3d586ab4cb9d5c3e2c14aa28ed23d180cf89b4df0454a69cc87" +[[package]] +name = "httpdate" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9" + [[package]] name = "humantime" version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "135b12329e5e3ce057a9f972339ea52bc954fe1e9358ef27f95e89716fbc5424" +[[package]] +name = "hyper" +version = "1.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6299f016b246a94207e63da54dbe807655bf9e00044f73ded42c3ac5305fbcca" +dependencies = [ + "atomic-waker", + "bytes", + "futures-channel", + "futures-core", + "http", + "http-body", + "httparse", + "httpdate", + "itoa", + "pin-project-lite", + "smallvec", + "tokio", +] + +[[package]] +name = "hyper-util" +version = "0.1.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "96547c2556ec9d12fb1578c4eaf448b04993e7fb79cbaad930a656880a6bdfa0" +dependencies = [ + "bytes", + "http", + "http-body", + "hyper", + "pin-project-lite", + "tokio", + "tower-service", +] + [[package]] name = "iana-time-zone" version = "0.1.65" @@ -2053,12 +1513,6 @@ dependencies = [ "serde_core", ] -[[package]] -name = "infer" -version = "0.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "64e9829a50b42bb782c1df523f78d332fe371b10c661e78b7a3c34b0198e9fac" - [[package]] name = "inout" version = "0.1.4" @@ -2068,15 +1522,6 @@ dependencies = [ "generic-array", ] -[[package]] -name = "instant" -version = "0.1.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e0242819d153cba4b4b05a5a8f2a7e9bbf97b6055b2a002b395c96b5ff3c0222" -dependencies = [ - "cfg-if 1.0.4", -] - [[package]] name = "io-kit-sys" version = "0.4.1" @@ -2087,17 +1532,6 @@ dependencies = [ "mach2", ] -[[package]] -name = "io-lifetimes" -version = "1.0.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eae7b9aee968036d54dce06cebaefd919e4472e753296daccd6d344e3e2df0c2" -dependencies = [ - "hermit-abi 0.3.9", - "libc", - "windows-sys 0.48.0", -] - [[package]] name = "ipnetwork" version = "0.20.0" @@ -2162,7 +1596,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1a87aa2bb7d2af34197c04845522473242e1aa17c12f4935d5856491a7fb8c97" dependencies = [ "cesu8", - "cfg-if 1.0.4", + "cfg-if", "combine", "jni-sys 0.3.1", "log", @@ -2205,8 +1639,6 @@ version = "0.3.94" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2e04e2ef80ce82e13552136fabeef8a5ed1f985a96805761cbb9a2c34e7664d9" dependencies = [ - "cfg-if 1.0.4", - "futures-util", "once_cell", "wasm-bindgen", ] @@ -2230,7 +1662,7 @@ checksum = "f2eef4e82b548e08ac880d307c8e8838b45f497a08d3202f3b26c9debaed8058" dependencies = [ "ahash", "anyhow", - "base64 0.22.1", + "base64", "bytecount", "fancy-regex", "fraction", @@ -2245,7 +1677,7 @@ dependencies = [ "regex", "serde", "serde_json", - "time 0.3.47", + "time", "url", "uuid-simd", ] @@ -2268,15 +1700,6 @@ dependencies = [ "hashbrown 0.14.5", ] -[[package]] -name = "kv-log-macro" -version = "1.0.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0de8b303297635ad57c9f5059fd9cee7a47f8e8daa09df0fcd07dd39fb22977f" -dependencies = [ - "log", -] - [[package]] name = "lazy_static" version = "1.5.0" @@ -2310,7 +1733,7 @@ version = "0.8.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d7c4b02199fee7c5d21a5ae7d8cfa79a6ef5bb2fc834d6e9058e89c825efdc55" dependencies = [ - "cfg-if 1.0.4", + "cfg-if", "windows-link", ] @@ -2329,12 +1752,6 @@ dependencies = [ "libc", ] -[[package]] -name = "linux-raw-sys" -version = "0.3.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ef53942eb7bf7ff43a617b3e2c1c4a5ecf5944a7c1bc12d7ee39bbb15e5c1519" - [[package]] name = "linux-raw-sys" version = "0.12.1" @@ -2361,10 +1778,6 @@ name = "log" version = "0.4.29" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5e5032e24019045c762d3c0f28f5b6b8bbf38563a65908389bf7978758920897" -dependencies = [ - "serde_core", - "value-bag", -] [[package]] name = "lru-slab" @@ -2374,9 +1787,9 @@ checksum = "112b39cec0b298b6c1999fee3e31427f74f676e4cb9879ed1a121b43661a4154" [[package]] name = "lz4_flex" -version = "0.10.0" +version = "0.11.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b8c72594ac26bfd34f2d99dfced2edfaddfe8a476e3ff2ca0eb293d925c4f83" +checksum = "373f5eceeeab7925e0c1098212f2fbc4d416adec9d35051a6ab251e824c1854a" dependencies = [ "twox-hash", ] @@ -2399,6 +1812,12 @@ dependencies = [ "regex-automata", ] +[[package]] +name = "matchit" +version = "0.8.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "47e1ffaa40ddd1f3ed91f717a33c8c0ee23fff369e3aa8772b9605cc1d22f4c3" + [[package]] name = "memchr" version = "2.8.0" @@ -2414,6 +1833,12 @@ dependencies = [ "autocfg", ] +[[package]] +name = "mime" +version = "0.3.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" + [[package]] name = "minimal-lexical" version = "0.2.1" @@ -2438,7 +1863,7 @@ checksum = "50b7e5b27aa02a74bac8c3f23f448f8d87ff11f92d3aac1a6ed369ee08cc56c1" dependencies = [ "libc", "log", - "wasi 0.11.1+wasi-snapshot-preview1", + "wasi", "windows-sys 0.61.2", ] @@ -2477,7 +1902,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "598beaf3cc6fdd9a5dfb1630c2800c7acd31df7aaf0f565796fba2b53ca1af1b" dependencies = [ "bitflags 1.3.2", - "cfg-if 1.0.4", + "cfg-if", "libc", ] @@ -2488,7 +1913,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2eb04e9c688eff1c89d72b407f168cf79bb9e867a9d3323ed6c01519eb9cc053" dependencies = [ "bitflags 2.11.0", - "cfg-if 1.0.4", + "cfg-if", "libc", "memoffset", ] @@ -2500,7 +1925,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "71e2746dc3a24dd78b3cfcb7be93368c6de9963d30f43a6a73998a9cf4b17b46" dependencies = [ "bitflags 2.11.0", - "cfg-if 1.0.4", + "cfg-if", "cfg_aliases 0.2.1", "libc", ] @@ -2662,7 +2087,7 @@ version = "1.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "91df4bbde75afed763b708b7eee1e8e7651e02d97f6d5dd763e89367e957b23b" dependencies = [ - "hermit-abi 0.5.2", + "hermit-abi", "libc", ] @@ -2693,12 +2118,6 @@ version = "11.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d6790f58c7ff633d8771f42965289203411a5e5c68388703c06e14f24770b41e" -[[package]] -name = "opaque-debug" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c08d65885ee38876c4f86fa503fb49d7b507c2b62552df7c70b2fce627e06381" - [[package]] name = "openssl-probe" version = "0.2.1" @@ -2739,7 +2158,7 @@ version = "0.9.12" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2621685985a2ebf1c516881c026032ac7deafcda1a2c9b7850dc81e3dfcb64c1" dependencies = [ - "cfg-if 1.0.4", + "cfg-if", "libc", "redox_syscall", "smallvec", @@ -2758,7 +2177,7 @@ version = "3.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1d30c53c26bc5b31a98cd02d20f25a7c8567146caf63ed593a9d87b2775291be" dependencies = [ - "base64 0.22.1", + "base64", "serde_core", ] @@ -2817,7 +2236,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "89815c69d36021a140146f26659a81d6c2afa33d216d736dd4be5381a7362220" dependencies = [ "pest", - "sha2 0.10.9", + "sha2", ] [[package]] @@ -2859,7 +2278,7 @@ version = "0.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "135ace3a761e564ec88c03a77317a7c6b80bb7f7135ef2544dbe054243b89737" dependencies = [ - "fastrand 2.4.1", + "fastrand", "phf_shared", ] @@ -2885,55 +2304,12 @@ dependencies = [ "siphasher", ] -[[package]] -name = "pin-project" -version = "1.1.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1749c7ed4bcaf4c3d0a3efc28538844fb29bcdd7d2b67b2be7e20ba861ff517" -dependencies = [ - "pin-project-internal", -] - -[[package]] -name = "pin-project-internal" -version = "1.1.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d9b20ed30f105399776b9c883e68e536ef602a16ae6f596d2c473591d6ad64c6" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.117", -] - -[[package]] -name = "pin-project-lite" -version = "0.1.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "257b64915a082f7811703966789728173279bdebb956b143dbcd23f6f970a777" - [[package]] name = "pin-project-lite" version = "0.2.17" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a89322df9ebe1c1578d689c92318e070967d1042b512afbe49518723f4e6d5cd" -[[package]] -name = "pin-utils" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" - -[[package]] -name = "piper" -version = "0.2.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c835479a4443ded371d6c535cbfd8d31ad92c5d23ae9770a61bc155e4992a3c1" -dependencies = [ - "atomic-waker", - "fastrand 2.4.1", - "futures-io", -] - [[package]] name = "pkcs1" version = "0.7.5" @@ -3015,47 +2391,6 @@ dependencies = [ "winapi", ] -[[package]] -name = "polling" -version = "2.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4b2d323e8ca7996b3e23126511a523f7e62924d93ecd5ae73b333815b0eb3dce" -dependencies = [ - "autocfg", - "bitflags 1.3.2", - "cfg-if 1.0.4", - "concurrent-queue", - "libc", - "log", - "pin-project-lite 0.2.17", - "windows-sys 0.48.0", -] - -[[package]] -name = "polling" -version = "3.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d0e4f59085d47d8241c88ead0f274e8a0cb551f3625263c05eb8dd897c34218" -dependencies = [ - "cfg-if 1.0.4", - "concurrent-queue", - "hermit-abi 0.5.2", - "pin-project-lite 0.2.17", - "rustix 1.1.4", - "windows-sys 0.61.2", -] - -[[package]] -name = "polyval" -version = "0.4.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eebcc4aa140b9abd2bc40d9c3f7ccec842679cd79045ac3a7ac698c1a064b7cd" -dependencies = [ - "cpuid-bool", - "opaque-debug", - "universal-hash", -] - [[package]] name = "portable-atomic" version = "1.13.1" @@ -3135,12 +2470,6 @@ dependencies = [ "toml_edit", ] -[[package]] -name = "proc-macro-hack" -version = "0.5.20+deprecated" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc375e1527247fe1a97d8b7156678dfe7c1af2fc075c9a4db3690ecd2a148068" - [[package]] name = "proc-macro2" version = "1.0.106" @@ -3256,7 +2585,7 @@ checksum = "b9e20a958963c291dc322d98411f541009df2ced7b5a4f2bd52337638cfccf20" dependencies = [ "bytes", "cfg_aliases 0.2.1", - "pin-project-lite 0.2.17", + "pin-project-lite", "quinn-proto", "quinn-udp", "rustc-hash", @@ -3326,19 +2655,6 @@ version = "6.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f8dcc9c7d52a811697d2151c701e0d08956f92b0e24136cf4cf27b57a6a0d9bf" -[[package]] -name = "rand" -version = "0.7.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a6b1679d49b24bbfe0c803429aa1874472f50d9b363131f0e89fc356b544d03" -dependencies = [ - "getrandom 0.1.16", - "libc", - "rand_chacha 0.2.2", - "rand_core 0.5.1", - "rand_hc", -] - [[package]] name = "rand" version = "0.8.5" @@ -3360,16 +2676,6 @@ dependencies = [ "rand_core 0.9.5", ] -[[package]] -name = "rand_chacha" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f4c8ed856279c9737206bf725bf36935d8666ead7aa69b52be55af369d193402" -dependencies = [ - "ppv-lite86", - "rand_core 0.5.1", -] - [[package]] name = "rand_chacha" version = "0.3.1" @@ -3390,15 +2696,6 @@ dependencies = [ "rand_core 0.9.5", ] -[[package]] -name = "rand_core" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90bde5296fc891b0cef12a6d03ddccc162ce7b2aff54160af9338f8d40df6d19" -dependencies = [ - "getrandom 0.1.16", -] - [[package]] name = "rand_core" version = "0.6.4" @@ -3417,15 +2714,6 @@ dependencies = [ "getrandom 0.3.4", ] -[[package]] -name = "rand_hc" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca3129af7b92a17112d59ad498c6f81eaf463253766b90396d39ea7a39d6613c" -dependencies = [ - "rand_core 0.5.1", -] - [[package]] name = "rayon" version = "1.11.0" @@ -3455,7 +2743,7 @@ dependencies = [ "pem", "ring", "rustls-pki-types", - "time 0.3.47", + "time", "x509-parser", "yasna", ] @@ -3536,7 +2824,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a4689e6c2294d81e88dc6261c768b63bc4fcdb852be6d1352498b114f61383b7" dependencies = [ "cc", - "cfg-if 1.0.4", + "cfg-if", "getrandom 0.2.17", "libc", "untrusted", @@ -3567,12 +2855,6 @@ dependencies = [ "unicode-ident", ] -[[package]] -name = "route-recognizer" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56770675ebc04927ded3e60633437841581c285dc6236109ea25fbf3beb7b59e" - [[package]] name = "rsa" version = "0.9.10" @@ -3580,7 +2862,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b8573f03f5883dcaebdfcf4725caa1ecb9c15b2ef50c43a07b816e06799bb12d" dependencies = [ "const-oid", - "digest 0.10.7", + "digest", "num-bigint-dig", "num-integer", "num-traits", @@ -3599,22 +2881,13 @@ version = "2.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "94300abf3f1ae2e2b8ffb7b58043de3d399c73fa6f4b73826402a5c457614dbe" -[[package]] -name = "rustc_version" -version = "0.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "138e3e0acb6c9fb258b19b67cb8abd63c00679d2851805ea151465464fe9030a" -dependencies = [ - "semver 0.9.0", -] - [[package]] name = "rustc_version" version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cfcb3a22ef46e85b45de6ee7e79d063319ebb6594faafcf1c225ea92ab6e9b92" dependencies = [ - "semver 1.0.28", + "semver", ] [[package]] @@ -3626,20 +2899,6 @@ dependencies = [ "nom 7.1.3", ] -[[package]] -name = "rustix" -version = "0.37.28" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "519165d378b97752ca44bbe15047d5d3409e875f39327546b42ac81d7e18c1b6" -dependencies = [ - "bitflags 1.3.2", - "errno 0.3.14", - "io-lifetimes", - "libc", - "linux-raw-sys 0.3.8", - "windows-sys 0.48.0", -] - [[package]] name = "rustix" version = "1.1.4" @@ -3649,7 +2908,7 @@ dependencies = [ "bitflags 2.11.0", "errno 0.3.14", "libc", - "linux-raw-sys 0.12.1", + "linux-raw-sys", "windows-sys 0.61.2", ] @@ -3844,27 +3103,12 @@ dependencies = [ "libc", ] -[[package]] -name = "semver" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d7eb9ef2c18661902cc47e535f9bc51b78acd254da71d375c2f6720d9a40403" -dependencies = [ - "semver-parser", -] - [[package]] name = "semver" version = "1.0.28" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8a7852d02fc848982e0c167ef163aaff9cd91dc640ba85e263cb1ce46fae51cd" -[[package]] -name = "semver-parser" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3" - [[package]] name = "serde" version = "1.0.228" @@ -3906,15 +3150,6 @@ dependencies = [ "syn 2.0.117", ] -[[package]] -name = "serde_fmt" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e497af288b3b95d067a23a4f749f2861121ffcb2f6d8379310dcda040c345ed" -dependencies = [ - "serde_core", -] - [[package]] name = "serde_json" version = "1.0.149" @@ -3929,14 +3164,14 @@ dependencies = [ ] [[package]] -name = "serde_qs" -version = "0.8.5" +name = "serde_path_to_error" +version = "0.1.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c7715380eec75f029a4ef7de39a9200e0a63823176b759d055b613f5a87df6a6" +checksum = "10a9ff822e371bb5403e391ecd83e182e0e77ba7f6fe0160b795797109d1b457" dependencies = [ - "percent-encoding", + "itoa", "serde", - "thiserror 1.0.69", + "serde_core", ] [[package]] @@ -3966,7 +3201,7 @@ version = "3.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dd5414fad8e6907dbdd5bc441a50ae8d6e26151a03b1de04d89a5576de61d01f" dependencies = [ - "base64 0.22.1", + "base64", "chrono", "hex", "indexmap 1.9.3", @@ -3976,7 +3211,7 @@ dependencies = [ "serde_core", "serde_json", "serde_with_macros", - "time 0.3.47", + "time", ] [[package]] @@ -4011,54 +3246,26 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a4d91116f97173694f1642263b2ff837f80d933aa837e2314969f6728f661df3" dependencies = [ "bitflags 2.11.0", - "cfg-if 1.0.4", + "cfg-if", "core-foundation", "core-foundation-sys", "io-kit-sys", "mach2", "nix 0.26.4", "scopeguard", - "unescaper", - "windows-sys 0.52.0", -] - -[[package]] -name = "sha1" -version = "0.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1da05c97445caa12d05e848c4a4fcbbea29e748ac28f7e80e9b010392063770" -dependencies = [ - "sha1_smol", -] - -[[package]] -name = "sha1" -version = "0.10.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3bf829a2d51ab4a5ddf1352d8470c140cadc8301b2ae1789db023f01cedd6ba" -dependencies = [ - "cfg-if 1.0.4", - "cpufeatures", - "digest 0.10.7", -] - -[[package]] -name = "sha1_smol" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bbfa15b3dddfee50a0fff136974b3e1bde555604ba463834a7eb7deb6417705d" + "unescaper", + "windows-sys 0.52.0", +] [[package]] -name = "sha2" -version = "0.9.9" +name = "sha1" +version = "0.10.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d58a1e1bf39749807d89cf2d98ac2dfa0ff1cb3faa38fbb64dd88ac8013d800" +checksum = "e3bf829a2d51ab4a5ddf1352d8470c140cadc8301b2ae1789db023f01cedd6ba" dependencies = [ - "block-buffer 0.9.0", - "cfg-if 1.0.4", + "cfg-if", "cpufeatures", - "digest 0.9.0", - "opaque-debug", + "digest", ] [[package]] @@ -4067,9 +3274,9 @@ version = "0.10.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a7507d819769d01a365ab707794a4084392c824f54a7a6a7862f8c3d0892b283" dependencies = [ - "cfg-if 1.0.4", + "cfg-if", "cpufeatures", - "digest 0.10.7", + "digest", ] [[package]] @@ -4084,7 +3291,7 @@ version = "0.10.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "75872d278a8f37ef87fa0ddbda7802605cb18344497949862c0d4dcb291eba60" dependencies = [ - "digest 0.10.7", + "digest", "keccak", ] @@ -4112,23 +3319,13 @@ version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" -[[package]] -name = "signal-hook-registry" -version = "1.4.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4db69cba1110affc0e9f7bcd48bbf87b3f4fc7c61fc9155afd4c469eb3d6c1b" -dependencies = [ - "errno 0.3.14", - "libc", -] - [[package]] name = "signature" version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "77549399552de45a898a580c1b41d445bf730df867cc44e6c0233bbc4b8329de" dependencies = [ - "digest 0.10.7", + "digest", "rand_core 0.6.4", ] @@ -4156,16 +3353,6 @@ version = "1.15.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "67b1b7a3b5fe4f1376887184045fcf45c69e92af734b7aaddc05fb777b6fbd03" -[[package]] -name = "socket2" -version = "0.4.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f7916fc008ca5542385b89a3d3ce689953c143e9304a9bf8beec1de48994c0d" -dependencies = [ - "libc", - "winapi", -] - [[package]] name = "socket2" version = "0.5.10" @@ -4227,7 +3414,7 @@ version = "72.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f7b54832a9a1f92a0e55e74a5c0332744426edc515bb3fbad82f10b874a87f0d" dependencies = [ - "rustc_version 0.4.1", + "rustc_version", "rustversion", "sha2-const-stable", "stabby-macros", @@ -4252,15 +3439,6 @@ version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6ce2be8dc25455e1f91df71bfa12ad37d7af1092ae736f3a6cd0e37bc7810596" -[[package]] -name = "standback" -version = "0.2.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e113fb6f3de07a243d434a56ec6f186dfd51cb08448239fe7bcae73f87ff28ff" -dependencies = [ - "version_check", -] - [[package]] name = "static_assertions" version = "1.1.0" @@ -4295,55 +3473,6 @@ dependencies = [ "syn 1.0.109", ] -[[package]] -name = "stdweb" -version = "0.4.20" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d022496b16281348b52d0e30ae99e01a73d737b2f45d38fed4edf79f9325a1d5" -dependencies = [ - "discard", - "rustc_version 0.2.3", - "stdweb-derive", - "stdweb-internal-macros", - "stdweb-internal-runtime", - "wasm-bindgen", -] - -[[package]] -name = "stdweb-derive" -version = "0.5.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c87a60a40fccc84bef0652345bbbbbe20a605bf5d0ce81719fc476f5c03b50ef" -dependencies = [ - "proc-macro2", - "quote", - "serde", - "serde_derive", - "syn 1.0.109", -] - -[[package]] -name = "stdweb-internal-macros" -version = "0.2.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "58fa5ff6ad0d98d1ffa8cb115892b6e69d67799f6763e162a1c9db421dc22e11" -dependencies = [ - "base-x", - "proc-macro2", - "quote", - "serde", - "serde_derive", - "serde_json", - "sha1 0.6.1", - "syn 1.0.109", -] - -[[package]] -name = "stdweb-internal-runtime" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "213701ba3370744dcd1a12960caa4843b3d68b4d1c0a5d575e0d65b2ee9d16c0" - [[package]] name = "strsim" version = "0.11.1" @@ -4356,84 +3485,6 @@ version = "2.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292" -[[package]] -name = "sval" -version = "2.18.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2eb9318255ebd817902d7e279d8f8e39b35b1b9954decd5eb9ea0e30e5fd2b6a" - -[[package]] -name = "sval_buffer" -version = "2.18.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "12571299185e653fdb0fbfe36cd7f6529d39d4e747a60b15a3f34574b7b97c61" -dependencies = [ - "sval", - "sval_ref", -] - -[[package]] -name = "sval_dynamic" -version = "2.18.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "39526f24e997706c0de7f03fb7371f7f5638b66a504ded508e20ad173d0a3677" -dependencies = [ - "sval", -] - -[[package]] -name = "sval_fmt" -version = "2.18.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "933dd3bb26965d682280fcc49400ac2a05036f4ee1e6dbd61bf8402d5a5c3a54" -dependencies = [ - "itoa", - "ryu", - "sval", -] - -[[package]] -name = "sval_json" -version = "2.18.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a0cda08f6d5c9948024a6551077557b1fdcc3880ff2f20ae839667d2ec2d87ed" -dependencies = [ - "itoa", - "ryu", - "sval", -] - -[[package]] -name = "sval_nested" -version = "2.18.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "88d49d5e6c1f9fd0e53515819b03a97ca4eb1bff5c8ee097c43391c09ecfb19f" -dependencies = [ - "sval", - "sval_buffer", - "sval_ref", -] - -[[package]] -name = "sval_ref" -version = "2.18.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "14f876c5a78405375b4e19cbb9554407513b59c93dea12dc6a4af4e1d30899ca" -dependencies = [ - "sval", -] - -[[package]] -name = "sval_serde" -version = "2.18.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f9ccd3b7f7200239a655e517dd3fd48d960b9111ad24bd6a5e055bef17607c7" -dependencies = [ - "serde_core", - "sval", - "sval_nested", -] - [[package]] name = "syn" version = "1.0.109" @@ -4456,6 +3507,12 @@ dependencies = [ "unicode-ident", ] +[[package]] +name = "sync_wrapper" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0bf256ce5efdfa370213c1dabab5935a12e49f2c58d15e9eac2870d3b4f27263" + [[package]] name = "synstructure" version = "0.13.2" @@ -4479,10 +3536,10 @@ version = "3.27.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "32497e9a4c7b38532efcdebeef879707aa9f794296a4f0244f6f69e9bc8574bd" dependencies = [ - "fastrand 2.4.1", + "fastrand", "getrandom 0.4.2", "once_cell", - "rustix 1.1.4", + "rustix", "windows-sys 0.61.2", ] @@ -4501,7 +3558,7 @@ version = "3.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "adcb7fd841cd518e279be3d5a3eb0636409487998a4aff22f3de87b81e88384f" dependencies = [ - "cfg-if 1.0.4", + "cfg-if", "proc-macro2", "quote", "syn 2.0.117", @@ -4566,7 +3623,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cfe075d7053dae61ac5413a34ea7d4913b6e6207844fd726bdd858b37ff72bf5" dependencies = [ "bitflags 2.11.0", - "cfg-if 1.0.4", + "cfg-if", "libc", "log", "rustversion", @@ -4579,45 +3636,7 @@ version = "1.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f60246a4944f24f6e018aa17cdeffb7818b76356965d03b07d6a9886e8962185" dependencies = [ - "cfg-if 1.0.4", -] - -[[package]] -name = "tide" -version = "0.16.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c459573f0dd2cc734b539047f57489ea875af8ee950860ded20cf93a79a1dee0" -dependencies = [ - "async-h1", - "async-session", - "async-sse", - "async-std", - "async-trait", - "femme", - "futures-util", - "http-client", - "http-types", - "kv-log-macro", - "log", - "pin-project-lite 0.2.17", - "route-recognizer", - "serde", - "serde_json", -] - -[[package]] -name = "time" -version = "0.2.27" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4752a97f8eebd6854ff91f1c1824cd6160626ac4bd44287f7f4ea2035a02a242" -dependencies = [ - "const_fn", - "libc", - "standback", - "stdweb", - "time-macros 0.1.1", - "version_check", - "winapi", + "cfg-if", ] [[package]] @@ -4632,7 +3651,7 @@ dependencies = [ "powerfmt", "serde_core", "time-core", - "time-macros 0.2.27", + "time-macros", ] [[package]] @@ -4641,16 +3660,6 @@ version = "0.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7694e1cfe791f8d31026952abf09c69ca6f6fa4e1a1229e18988f06a04a12dca" -[[package]] -name = "time-macros" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "957e9c6e26f12cb6d0dd7fc776bb67a706312e7299aed74c8dd5b17ebb27e2f1" -dependencies = [ - "proc-macro-hack", - "time-macros-impl", -] - [[package]] name = "time-macros" version = "0.2.27" @@ -4661,19 +3670,6 @@ dependencies = [ "time-core", ] -[[package]] -name = "time-macros-impl" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fd3c141a1b43194f3f56a1411225df8646c55781d5f26db825b3d98507eb482f" -dependencies = [ - "proc-macro-hack", - "proc-macro2", - "quote", - "standback", - "syn 1.0.109", -] - [[package]] name = "tinystr" version = "0.8.3" @@ -4716,7 +3712,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1461056cc1ef47003f7ee16e4cef3741068d4c7f6b627bfce49b7c00c120a530" dependencies = [ "futures-util", - "pin-project-lite 0.2.17", + "pin-project-lite", "thiserror 2.0.18", "tokio", "tokio-rustls", @@ -4742,7 +3738,7 @@ dependencies = [ "bytes", "libc", "mio", - "pin-project-lite 0.2.17", + "pin-project-lite", "socket2 0.6.3", "tokio-macros", "windows-sys 0.61.2", @@ -4775,7 +3771,7 @@ version = "5.4.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "aa1d5427f11ba7c5e6384521cfd76f2d64572ff29f3f4f7aa0f496282923fdc8" dependencies = [ - "cfg-if 1.0.4", + "cfg-if", "futures", "log", "mio-serial", @@ -4805,7 +3801,7 @@ dependencies = [ "futures-core", "futures-sink", "futures-util", - "pin-project-lite 0.2.17", + "pin-project-lite", "tokio", ] @@ -4882,6 +3878,50 @@ version = "1.1.1+spec-1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "756daf9b1013ebe47a8776667b466417e2d4c5679d441c26230efd9ef78692db" +[[package]] +name = "tower" +version = "0.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ebe5ef63511595f1344e2d5cfa636d973292adc0eec1f0ad45fae9f0851ab1d4" +dependencies = [ + "futures-core", + "futures-util", + "pin-project-lite", + "sync_wrapper", + "tokio", + "tower-layer", + "tower-service", + "tracing", +] + +[[package]] +name = "tower-http" +version = "0.6.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "68d6fdd9f81c2819c9a8b0e0cd91660e7746a8e6ea2ba7c6b2b057985f6bcb51" +dependencies = [ + "bitflags 2.11.0", + "bytes", + "http", + "http-body", + "pin-project-lite", + "tower-layer", + "tower-service", + "tracing", +] + +[[package]] +name = "tower-layer" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "121c2a6cda46980bb0fcd1647ffaf6cd3fc79a013de288782836f6df9c48780e" + +[[package]] +name = "tower-service" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8df9b6e13f2d32c91b9bd719c00d1958837bc7dec474d94952798cc8e69eeec3" + [[package]] name = "tracing" version = "0.1.44" @@ -4889,7 +3929,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "63e71662fa4b2a2c3a26f570f037eb95bb1f85397f3cd8076caed2f026a6d100" dependencies = [ "log", - "pin-project-lite 0.2.17", + "pin-project-lite", "tracing-attributes", "tracing-core", ] @@ -4993,20 +4033,16 @@ dependencies = [ "httparse", "log", "rand 0.8.5", - "sha1 0.10.6", + "sha1", "thiserror 1.0.69", "utf-8", ] [[package]] name = "twox-hash" -version = "1.6.3" +version = "2.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97fee6b57c6a41524a810daee9286c02d7752c4253064d0b05472833a438f675" -dependencies = [ - "cfg-if 1.0.4", - "static_assertions", -] +checksum = "9ea3136b675547379c4bd395ca6b938e5ad3c3d20fad76e7fe85f9e0d011419c" [[package]] name = "typeid" @@ -5061,16 +4097,6 @@ version = "0.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ebc1c04c71510c7f702b52b7c350734c9ff1295c464a03335b00bb84fc54f853" -[[package]] -name = "universal-hash" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8326b2c654932e3e4f9196e69d08fdf7cfd718e1dc6f66b347e6024a0c961402" -dependencies = [ - "generic-array", - "subtle", -] - [[package]] name = "unix-named-pipe" version = "0.2.0" @@ -5114,7 +4140,6 @@ dependencies = [ "idna", "percent-encoding", "serde", - "serde_derive", ] [[package]] @@ -5187,42 +4212,6 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ba73ea9cf16a25df0c8caa16c51acb937d5712a8429db78a3ee29d5dcacd3a65" -[[package]] -name = "value-bag" -version = "1.12.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ba6f5989077681266825251a52748b8c1d8a4ad098cc37e440103d0ea717fc0" -dependencies = [ - "value-bag-serde1", - "value-bag-sval2", -] - -[[package]] -name = "value-bag-serde1" -version = "1.12.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "16530907bfe2999a1773ca5900a65101e092c70f642f25cc23ca0c43573262c5" -dependencies = [ - "erased-serde", - "serde_core", - "serde_fmt", -] - -[[package]] -name = "value-bag-sval2" -version = "1.12.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d00ae130edd690eaa877e4f40605d534790d1cf1d651e7685bd6a144521b251f" -dependencies = [ - "sval", - "sval_buffer", - "sval_dynamic", - "sval_fmt", - "sval_json", - "sval_ref", - "sval_serde", -] - [[package]] name = "vec_map" version = "0.8.2" @@ -5251,12 +4240,6 @@ dependencies = [ "nix 0.27.1", ] -[[package]] -name = "waker-fn" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "317211a0dc0ceedd78fb2ca9a44aed3d7b9b26f81870d485c07122b4350673b7" - [[package]] name = "walkdir" version = "2.5.0" @@ -5267,12 +4250,6 @@ dependencies = [ "winapi-util", ] -[[package]] -name = "wasi" -version = "0.9.0+wasi-snapshot-preview1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cccddf32554fecc6acb585f82a32a72e28b48f8c4c1883ddfeeeaa96f7d8e519" - [[package]] name = "wasi" version = "0.11.1+wasi-snapshot-preview1" @@ -5303,25 +4280,13 @@ version = "0.2.117" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0551fc1bb415591e3372d0bc4780db7e587d84e2a7e79da121051c5c4b89d0b0" dependencies = [ - "cfg-if 1.0.4", + "cfg-if", "once_cell", "rustversion", - "serde", - "serde_json", "wasm-bindgen-macro", "wasm-bindgen-shared", ] -[[package]] -name = "wasm-bindgen-futures" -version = "0.4.67" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "03623de6905b7206edd0a75f69f747f134b7f0a2323392d664448bf2d3c5d87e" -dependencies = [ - "js-sys", - "wasm-bindgen", -] - [[package]] name = "wasm-bindgen-macro" version = "0.2.117" @@ -5385,7 +4350,7 @@ dependencies = [ "bitflags 2.11.0", "hashbrown 0.15.5", "indexmap 2.13.1", - "semver 1.0.28", + "semver", ] [[package]] @@ -5434,7 +4399,7 @@ checksum = "24d643ce3fd3e5b54854602a080f34fb10ab75e0b813ee32d00ca2b44fa74762" dependencies = [ "either", "env_home", - "rustix 1.1.4", + "rustix", "winsafe", ] @@ -5559,15 +4524,6 @@ 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" -dependencies = [ - "windows-targets 0.48.5", -] - [[package]] name = "windows-sys" version = "0.52.0" @@ -5610,21 +4566,6 @@ dependencies = [ "windows_x86_64_msvc 0.42.2", ] -[[package]] -name = "windows-targets" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c" -dependencies = [ - "windows_aarch64_gnullvm 0.48.5", - "windows_aarch64_msvc 0.48.5", - "windows_i686_gnu 0.48.5", - "windows_i686_msvc 0.48.5", - "windows_x86_64_gnu 0.48.5", - "windows_x86_64_gnullvm 0.48.5", - "windows_x86_64_msvc 0.48.5", -] - [[package]] name = "windows-targets" version = "0.52.6" @@ -5664,12 +4605,6 @@ 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" - [[package]] name = "windows_aarch64_gnullvm" version = "0.52.6" @@ -5694,12 +4629,6 @@ 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" - [[package]] name = "windows_aarch64_msvc" version = "0.52.6" @@ -5724,12 +4653,6 @@ 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" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" - [[package]] name = "windows_i686_gnu" version = "0.52.6" @@ -5766,12 +4689,6 @@ 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" - [[package]] name = "windows_i686_msvc" version = "0.52.6" @@ -5796,12 +4713,6 @@ 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" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" - [[package]] name = "windows_x86_64_gnu" version = "0.52.6" @@ -5820,12 +4731,6 @@ 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" - [[package]] name = "windows_x86_64_gnullvm" version = "0.52.6" @@ -5850,12 +4755,6 @@ 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" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" - [[package]] name = "windows_x86_64_msvc" version = "0.52.6" @@ -5969,7 +4868,7 @@ dependencies = [ "id-arena", "indexmap 2.13.1", "log", - "semver 1.0.28", + "semver", "serde", "serde_derive", "serde_json", @@ -5998,7 +4897,7 @@ dependencies = [ "ring", "rusticata-macros", "thiserror 2.0.18", - "time 0.3.47", + "time", ] [[package]] @@ -6013,7 +4912,7 @@ version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e17bb3549cc1321ae1296b9cdc2698e2b6cb1992adfa19a8c72e5b7a738f44cd" dependencies = [ - "time 0.3.47", + "time", ] [[package]] @@ -6076,7 +4975,7 @@ dependencies = [ "predicates 3.1.4", "rand 0.8.5", "regex", - "rustc_version 0.4.1", + "rustc_version", "serde", "serde_json", "socket2 0.5.10", @@ -6192,8 +5091,8 @@ dependencies = [ name = "zenoh-crypto" version = "1.9.0" dependencies = [ - "aes 0.8.4", - "hmac 0.12.1", + "aes", + "hmac", "rand 0.8.5", "rand_chacha 0.3.1", "sha3", @@ -6293,7 +5192,7 @@ name = "zenoh-link-commons" version = "1.9.0" dependencies = [ "async-trait", - "base64 0.22.1", + "base64", "bytes", "flume", "futures", @@ -6307,7 +5206,7 @@ dependencies = [ "secrecy", "serde", "socket2 0.5.10", - "time 0.3.47", + "time", "tokio", "tokio-util", "tracing", @@ -6329,7 +5228,7 @@ version = "1.9.0" dependencies = [ "async-trait", "rustls-webpki", - "time 0.3.47", + "time", "tracing", "zenoh-core", "zenoh-link-commons", @@ -6344,7 +5243,7 @@ version = "1.9.0" dependencies = [ "async-trait", "rustls-webpki", - "time 0.3.47", + "time", "tokio-util", "tracing", "zenoh-core", @@ -6391,14 +5290,14 @@ name = "zenoh-link-tls" version = "1.9.0" dependencies = [ "async-trait", - "base64 0.22.1", + "base64", "rustls", "rustls-pemfile", "rustls-pki-types", "rustls-webpki", "secrecy", "socket2 0.5.10", - "time 0.3.47", + "time", "tls-listener", "tokio", "tokio-rustls", @@ -6538,22 +5437,22 @@ dependencies = [ name = "zenoh-plugin-rest" version = "1.9.0" dependencies = [ - "anyhow", - "async-std", - "base64 0.22.1", + "axum", + "base64", "clap", "flume", "futures", "git-version", - "http-types", "jsonschema", "lazy_static", - "rustc_version 0.4.1", + "mime", + "rustc_version", "schemars 1.2.1", "serde", "serde_json", - "tide", "tokio", + "tower", + "tower-http", "tracing", "zenoh", "zenoh-plugin-trait", @@ -6563,7 +5462,6 @@ dependencies = [ name = "zenoh-plugin-storage-manager" version = "1.9.0" dependencies = [ - "async-global-executor 3.1.0", "async-trait", "bincode", "bloomfilter", @@ -6572,7 +5470,7 @@ dependencies = [ "jsonschema", "lazy_static", "rand 0.8.5", - "rustc_version 0.4.1", + "rustc_version", "schemars 1.2.1", "serde", "serde_json", @@ -6685,7 +5583,7 @@ name = "zenoh-sync" version = "1.9.0" dependencies = [ "arc-swap", - "event-listener 5.4.1", + "event-listener", "futures", "tokio", "zenoh-buffers", @@ -6803,7 +5701,7 @@ dependencies = [ "json5", "lazy_static", "rand 0.8.5", - "rustc_version 0.4.1", + "rustc_version", "tracing", "tracing-subscriber", "zenoh", diff --git a/Cargo.toml b/Cargo.toml index 1f8562eb47..e92675421c 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -88,6 +88,7 @@ async-global-executor = "3.1.0" async-io = "2.6.0" async-std = { version = "1.13.2", features = ["tokio1"] } async-trait = "0.1.89" +axum = "0.8.4" base64 = "0.22.1" bincode = "1.3.3" buddy_system_allocator = "0.10.0" @@ -113,7 +114,6 @@ hashbrown = "0.16.0" hex = { version = "0.4.3", default-features = false } # Default features are disabled due to usage in no_std crates hmac = { version = "0.12.1", features = ["std"] } home = "0.5.9" -http-types = "2.12.0" humantime = "2.3.0" itertools = "0.14.0" json5 = "0.4.1" @@ -123,7 +123,8 @@ lazy_static = "1.5.0" leb128 = "0.2" libc = "0.2.175" libloading = "0.8.9" -lz4_flex = "0.10.0" +lz4_flex = "0.11.3" +mime = "0.3.17" nix = { version = "0.29.0", features = ["fs"] } nonempty-collections = { version = "0.3.1", features = ["serde"] } num-traits = { version = "0.2.19", default-features = false } @@ -176,7 +177,6 @@ stop-token = "0.7.0" syn = "2.0.110" talc = { version = "4.4.3", default-features = false } test-case = "3.3.1" -tide = "0.16.0" time = "0.3.41" token-cell = { version = "2.0.0", default-features = false } tokio = { version = "1.47.1", default-features = false } # Default features are disabled due to some crates' requirements @@ -184,6 +184,8 @@ tokio-rustls = { version = "0.26.2", default-features = false } tokio-tungstenite = "0.24.0" tokio-util = "0.7.16" toml = "0.9.6" +tower = "0.5.2" +tower-http = "0.6.6" tracing = "0.1.41" tracing-capture = "0.1.0" tracing-subscriber = { version = "0.3", features = ["env-filter", "json"] } diff --git a/commons/zenoh-core/src/macros.rs b/commons/zenoh-core/src/macros.rs index d457219d05..e17161b6d3 100644 --- a/commons/zenoh-core/src/macros.rs +++ b/commons/zenoh-core/src/macros.rs @@ -156,27 +156,6 @@ macro_rules! to_u64 { }; } -// This macro allows to spawn the right amount of threads in the -// async_std executor -#[macro_export] -macro_rules! zasync_executor_init { - () => { - use async_global_executor; - - // Zenoh requires at least 4 threads to run - const ASYNC_STD_THREAD_COUNT_MIN: usize = 4; - - let count = async_global_executor::spawn_more_threads(ASYNC_STD_THREAD_COUNT_MIN) - .await - .unwrap(); - - tracing::trace!( - "Spawned {} additional threads in the async global executor", - count - ); - }; -} - // This macro allows to parse a string to the target type #[macro_export] macro_rules! zparse { diff --git a/commons/zenoh-pinned-deps-1-75/Cargo.toml b/commons/zenoh-pinned-deps-1-75/Cargo.toml index d0f4392a0e..9662d1dbf5 100644 --- a/commons/zenoh-pinned-deps-1-75/Cargo.toml +++ b/commons/zenoh-pinned-deps-1-75/Cargo.toml @@ -27,7 +27,8 @@ version = { workspace = true } maintenance = { status = "actively-developed" } [dependencies] -async-lock = "=3.4.1" +axum = "=0.8.4" +axum-core = "=0.5.2" base64ct = "=1.6.0" clap_builder = "=4.5.60" clap_lex = "=1.0.0" @@ -72,7 +73,8 @@ security-framework = "=3.6.0" [package.metadata.cargo-machete] ignored = [ - "async-lock", + "axum", + "axum-core", "base64ct", "clap_builder", "clap_lex", diff --git a/plugins/zenoh-plugin-rest/Cargo.toml b/plugins/zenoh-plugin-rest/Cargo.toml index 1fa5c19d7c..fc669c5839 100644 --- a/plugins/zenoh-plugin-rest/Cargo.toml +++ b/plugins/zenoh-plugin-rest/Cargo.toml @@ -26,26 +26,26 @@ version = { workspace = true } [features] default = ["dynamic_plugin", "zenoh/default"] dynamic_plugin = [] -static_plugin = ['async-std'] +static_plugin = [] [lib] crate-type = ["cdylib", "rlib"] name = "zenoh_plugin_rest" [dependencies] -anyhow = { workspace = true, features = ["default"] } -async-std = { workspace = true, features = ["tokio1"], optional = true } +axum = { workspace = true, features = ["tokio"] } base64 = { workspace = true } flume = { workspace = true } futures = { workspace = true } git-version = { workspace = true } -http-types = { workspace = true } lazy_static = { workspace = true } +mime = { workspace = true } schemars = { workspace = true } serde = { workspace = true, features = ["default"] } serde_json = { workspace = true } -tide = { workspace = true } tokio = { workspace = true } +tower = { workspace = true } +tower-http = { workspace = true, features = ["cors", "set-header", "trace"] } tracing = { workspace = true } zenoh = { workspace = true, default-features = false, features = [ "internal", @@ -75,6 +75,3 @@ license-file = ["../../LICENSE", "0"] maintainer = "zenoh-dev@eclipse.org" name = "zenoh-plugin-rest" section = "net" - -[package.metadata.cargo-machete] -ignored = ["async-std"] diff --git a/plugins/zenoh-plugin-rest/examples/z_serve_sse.rs b/plugins/zenoh-plugin-rest/examples/z_serve_sse.rs index c1848dcfe2..3bda4689b1 100644 --- a/plugins/zenoh-plugin-rest/examples/z_serve_sse.rs +++ b/plugins/zenoh-plugin-rest/examples/z_serve_sse.rs @@ -22,6 +22,7 @@ const HTML: &str = r#" if(typeof(EventSource) !== "undefined") { var source = new EventSource("/demo/sse/event"); source.addEventListener("PUT", function(e) { + console.log(e); document.getElementById("result").innerHTML += e.data + "
"; }, false); } else { @@ -89,26 +90,26 @@ fn parse_args() -> Config { ) .get_matches(); - let mut config = if let Some(conf_file) = args.get_one::<&String>("config") { + let mut config = if let Some(conf_file) = args.get_one::("config") { Config::from_file(conf_file).unwrap() } else { Config::default() }; - match args.get_one::<&String>("mode").map(|m| m.parse()) { + match args.get_one::("mode").map(|m| m.parse()) { Some(Ok(mode)) => { config.set_mode(Some(mode)).unwrap(); } Some(Err(e)) => panic!("Invalid mode: {e}"), None => {} }; - if let Some(values) = args.get_many::<&String>("connect") { + if let Some(values) = args.get_many::("connect") { config .connect .endpoints .set(values.into_iter().map(|v| v.parse().unwrap()).collect()) .unwrap(); } - if let Some(values) = args.get_many::<&String>("listen") { + if let Some(values) = args.get_many::("listen") { config .listen .endpoints diff --git a/plugins/zenoh-plugin-rest/src/config.rs b/plugins/zenoh-plugin-rest/src/config.rs index 35d0d34de4..7ab8af3517 100644 --- a/plugins/zenoh-plugin-rest/src/config.rs +++ b/plugins/zenoh-plugin-rest/src/config.rs @@ -11,24 +11,22 @@ // Contributors: // ZettaScale Zenoh Team, // -use std::fmt; +use std::{ + fmt, + net::{Ipv6Addr, SocketAddr}, +}; use schemars::JsonSchema; -use serde::{ - de, - de::{Unexpected, Visitor}, - Deserialize, Deserializer, -}; +use serde::{de, de::Visitor, Deserialize, Deserializer}; -const DEFAULT_HTTP_INTERFACE: &str = "[::]"; pub const DEFAULT_WORK_THREAD_NUM: usize = 2; pub const DEFAULT_MAX_BLOCK_THREAD_NUM: usize = 50; #[derive(JsonSchema, Deserialize, serde::Serialize, Clone, Debug)] #[serde(deny_unknown_fields)] pub struct Config { - #[serde(deserialize_with = "deserialize_http_port")] - pub http_port: String, + #[serde(rename = "http_port", deserialize_with = "deserialize_http_port")] + pub addr: SocketAddr, #[serde(default = "default_work_thread_num")] pub work_thread_num: usize, #[serde(default = "default_max_block_thread_num")] @@ -46,7 +44,7 @@ impl From<&Config> for serde_json::Value { } } -fn deserialize_http_port<'de, D>(deserializer: D) -> Result +fn deserialize_http_port<'de, D>(deserializer: D) -> Result where D: Deserializer<'de>, { @@ -64,7 +62,7 @@ fn default_max_block_thread_num() -> usize { struct HttpPortVisitor; impl Visitor<'_> for HttpPortVisitor { - type Value = String; + type Value = SocketAddr; fn expecting(&self, formatter: &mut fmt::Formatter) -> fmt::Result { formatter.write_str(r#"either a port number as an integer or a string, either a string with format ":""#) @@ -74,26 +72,30 @@ impl Visitor<'_> for HttpPortVisitor { where E: de::Error, { - Ok(format!("{DEFAULT_HTTP_INTERFACE}:{value}")) + Ok(SocketAddr::new( + Ipv6Addr::UNSPECIFIED.into(), + value + .try_into() + .map_err(|_| de::Error::custom("invalid port"))?, + )) } fn visit_str(self, value: &str) -> Result where E: de::Error, { - let parts: Vec<&str> = value.split(':').collect(); - if parts.len() > 2 { - return Err(E::invalid_value(Unexpected::Str(value), &self)); - } - let (interface, port) = if parts.len() == 1 { - (DEFAULT_HTTP_INTERFACE, parts[0]) - } else { - (parts[0], parts[1]) + let (ip, port) = match value.split_once(':') { + Some((ip, port)) => ( + ip.parse() + .map_err(|_| de::Error::custom("invalid ip address"))?, + port, + ), + None => (Ipv6Addr::UNSPECIFIED.into(), value), }; - if port.parse::().is_err() { - return Err(E::invalid_value(Unexpected::Str(port), &self)); - } - Ok(format!("{interface}:{port}")) + let port = port + .parse() + .map_err(|_| de::Error::custom("invalid port"))?; + Ok(SocketAddr::new(ip, port)) } } @@ -159,7 +161,7 @@ impl<'de> serde::de::Visitor<'de> for PathVisitor { #[cfg(test)] mod tests { - use super::{Config, DEFAULT_HTTP_INTERFACE}; + use super::Config; #[test] fn test_path_field() { @@ -169,13 +171,13 @@ mod tests { assert!(config.is_ok()); let Config { - http_port, + addr: http_port, __required__, __path__, .. } = config.unwrap(); - assert_eq!(http_port, format!("{DEFAULT_HTTP_INTERFACE}:8080")); + assert_eq!(http_port.to_string(), "[::]:8080"); assert_eq!(__path__, Some(vec![String::from("/example/path")])); assert_eq!(__required__, None); } @@ -186,13 +188,13 @@ mod tests { let config = serde_json::from_str::(r#"{"__required__": true, "http_port": 8080}"#); assert!(config.is_ok()); let Config { - http_port, + addr: http_port, __required__, __path__, .. } = config.unwrap(); - assert_eq!(http_port, format!("{DEFAULT_HTTP_INTERFACE}:8080")); + assert_eq!(http_port.to_string(), "[::]:8080"); assert_eq!(__path__, None); assert_eq!(__required__, Some(true)); } @@ -206,13 +208,13 @@ mod tests { assert!(config.is_ok()); let Config { - http_port, + addr: http_port, __required__, __path__, .. } = config.unwrap(); - assert_eq!(http_port, format!("{DEFAULT_HTTP_INTERFACE}:8080")); + assert_eq!(http_port.to_string(), "[::]:8080"); assert_eq!(__path__, Some(vec![String::from("/example/path")])); assert_eq!(__required__, Some(true)); } @@ -224,13 +226,13 @@ mod tests { assert!(config.is_ok()); let Config { - http_port, + addr: http_port, __required__, __path__, .. } = config.unwrap(); - assert_eq!(http_port, format!("{DEFAULT_HTTP_INTERFACE}:8080")); + assert_eq!(http_port.to_string(), "[::]:8080"); assert_eq!(__path__, None); assert_eq!(__required__, None); } diff --git a/plugins/zenoh-plugin-rest/src/lib.rs b/plugins/zenoh-plugin-rest/src/lib.rs index f3728a4f27..ebd5cbea2c 100644 --- a/plugins/zenoh-plugin-rest/src/lib.rs +++ b/plugins/zenoh-plugin-rest/src/lib.rs @@ -18,23 +18,35 @@ //! //! [Click here for Zenoh's documentation](https://docs.rs/zenoh/latest/zenoh) use std::{ - borrow::Cow, - convert::TryFrom, + convert::{Infallible, TryFrom}, + fmt::Write, future::Future, + net::SocketAddr, + pin::Pin, str::FromStr, - sync::{ - atomic::{AtomicUsize, Ordering}, - Arc, - }, + sync::atomic::{AtomicUsize, Ordering}, + task::{Context, Poll}, time::Duration, }; +use axum::{ + extract::{FromRequest, FromRequestParts, Path, Request, State}, + http::{header, request::Parts, HeaderValue, Method, StatusCode, Uri}, + response::{sse::Event, Html, IntoResponse, Response, Sse}, + routing::get, + Json, Router, +}; use base64::Engine; -use futures::StreamExt; -use http_types::Method; -use serde::{Deserialize, Serialize}; -use tide::{http::Mime, sse::Sender, Request, Response, Server, StatusCode}; -use tokio::{task::JoinHandle, time::timeout}; +use futures::{FutureExt, Stream, StreamExt, TryFutureExt}; +use mime::Mime; +use serde::Serialize; +use tokio::{net::TcpListener, task::JoinHandle, time::timeout}; +use tower_http::{ + cors::{Any, CorsLayer}, + set_header::SetResponseHeaderLayer, + trace::{DefaultMakeSpan, DefaultOnRequest, DefaultOnResponse, TraceLayer}, +}; +use tracing::Level; use zenoh::{ bytes::{Encoding, ZBytes}, internal::{ @@ -44,8 +56,8 @@ use zenoh::{ zerror, }, key_expr::{keyexpr, KeyExpr}, - query::{Parameters, QueryConsolidation, Reply, Selector, ZenohParameters}, - sample::{Sample, SampleKind}, + query::{Parameters, QueryConsolidation, Selector, ZenohParameters}, + sample::Sample, session::Session, Result as ZResult, }; @@ -53,7 +65,11 @@ use zenoh_plugin_trait::{plugin_long_version, plugin_version, Plugin, PluginCont mod config; pub use config::Config; -use zenoh::query::ReplyError; +use zenoh::{ + handlers::{fifo::RecvStream, FifoChannelHandler}, + pubsub::Subscriber, + time::Timestamp, +}; const GIT_VERSION: &str = git_version::git_version!(prefix = "v", cargo_prefix = "v"); lazy_static::lazy_static! { @@ -106,7 +122,7 @@ where } } -#[derive(Serialize, Deserialize)] +#[derive(Serialize)] struct JSONSample { key: String, value: serde_json::Value, @@ -114,160 +130,60 @@ struct JSONSample { timestamp: Option, } -pub fn base64_encode(data: &[u8]) -> String { - use base64::engine::general_purpose; - general_purpose::STANDARD.encode(data) -} - -fn payload_to_json(payload: &ZBytes, encoding: &Encoding) -> serde_json::Value { - if payload.is_empty() { - return serde_json::Value::Null; - } - match encoding { - // If it is a JSON try to deserialize as json, if it fails fallback to base64 - &Encoding::APPLICATION_JSON | &Encoding::TEXT_JSON | &Encoding::TEXT_JSON5 => { - let bytes = payload.to_bytes(); - serde_json::from_slice(&bytes).unwrap_or_else(|e| { - tracing::warn!( - "Encoding is JSON but data is not JSON, converting to base64, Error: {e:?}" - ); - serde_json::Value::String(base64_encode(&bytes)) - }) +impl JSONSample { + fn new( + key: impl Into, + payload: &ZBytes, + encoding: &Encoding, + timestamp: Option<&Timestamp>, + ) -> Self { + JSONSample { + key: key.into(), + value: Self::payload_to_json(payload, encoding), + encoding: encoding.to_string(), + timestamp: timestamp.map(|ts| ts.to_string()), } - &Encoding::TEXT_PLAIN | &Encoding::ZENOH_STRING => serde_json::Value::String( - String::from_utf8(payload.to_bytes().into_owned()).unwrap_or_else(|e| { - tracing::warn!( - "Encoding is String but data is not String, converting to base64, Error: {e:?}" - ); - base64_encode(e.as_bytes()) - }), - ), - // otherwise convert to JSON string - _ => serde_json::Value::String(base64_encode(&payload.to_bytes())), - } -} - -fn sample_to_json(sample: &Sample) -> JSONSample { - JSONSample { - key: sample.key_expr().as_str().to_string(), - value: payload_to_json(sample.payload(), sample.encoding()), - encoding: sample.encoding().to_string(), - timestamp: sample.timestamp().map(|ts| ts.to_string()), - } -} - -fn result_to_json(sample: Result<&Sample, &ReplyError>) -> JSONSample { - match sample { - Ok(sample) => sample_to_json(sample), - Err(err) => JSONSample { - key: "ERROR".into(), - value: payload_to_json(err.payload(), err.encoding()), - encoding: err.encoding().to_string(), - timestamp: None, - }, } -} -async fn to_json(results: flume::Receiver) -> String { - let values = results - .stream() - .filter_map(move |reply| async move { Some(result_to_json(reply.result())) }) - .collect::>() - .await; - - serde_json::to_string(&values).unwrap_or("[]".into()) -} - -async fn to_json_response(results: flume::Receiver) -> Response { - response(StatusCode::Ok, "application/json", &to_json(results).await) -} - -fn sample_to_html(sample: &Sample) -> String { - format!( - "
{}
\n
{}
\n", - sample.key_expr().as_str(), - sample.payload().try_to_string().unwrap_or_default() - ) -} - -fn result_to_html(sample: Result<&Sample, &ReplyError>) -> String { - match sample { - Ok(sample) => sample_to_html(sample), - Err(err) => { - format!( - "
ERROR
\n
{}
\n", - err.payload().try_to_string().unwrap_or_default() - ) + fn payload_to_json(payload: &ZBytes, encoding: &Encoding) -> serde_json::Value { + if payload.is_empty() { + return serde_json::Value::Null; } - } -} - -async fn to_html(results: flume::Receiver) -> String { - let values = results - .stream() - .filter_map(move |reply| async move { Some(result_to_html(reply.result())) }) - .collect::>() - .await - .join("\n"); - format!("
\n{values}\n
\n") -} - -async fn to_html_response(results: flume::Receiver) -> Response { - response(StatusCode::Ok, "text/html", &to_html(results).await) -} - -async fn to_raw_response(results: flume::Receiver) -> Response { - match results.recv_async().await { - Ok(reply) => match reply.result() { - Ok(sample) => response( - StatusCode::Ok, - Cow::from(sample.encoding()).as_ref(), - &sample.payload().to_bytes(), - ), - Err(value) => response( - StatusCode::Ok, - Cow::from(value.encoding()).as_ref(), - &value.payload().to_bytes(), + let base64_encode = |data: &[u8]| base64::engine::general_purpose::STANDARD.encode(data); + match encoding { + // If it is a JSON try to deserialize as json, if it fails fallback to base64 + &Encoding::APPLICATION_JSON | &Encoding::TEXT_JSON | &Encoding::TEXT_JSON5 => { + let bytes = payload.to_bytes(); + serde_json::from_slice(&bytes).unwrap_or_else(|e| { + tracing::warn!( + "Encoding is JSON but data is not JSON, converting to base64, Error: {e:?}" + ); + serde_json::Value::String(base64_encode(&bytes)) + }) + } + &Encoding::TEXT_PLAIN | &Encoding::ZENOH_STRING => serde_json::Value::String( + String::from_utf8(payload.to_bytes().into_owned()).unwrap_or_else(|e| { + tracing::warn!( + "Encoding is String but data is not String, converting to base64, Error: {e:?}" + ); + base64_encode(e.as_bytes()) + }), ), - }, - Err(_) => response(StatusCode::Ok, "", ""), - } -} - -fn method_to_kind(method: Method) -> SampleKind { - match method { - Method::Put => SampleKind::Put, - Method::Delete => SampleKind::Delete, - _ => SampleKind::default(), + // otherwise convert to JSON string + _ => serde_json::Value::String(base64_encode(&payload.to_bytes())), + } } } -fn response<'a, S: Into<&'a str> + std::fmt::Debug>( - status: StatusCode, - content_type: S, - body: &(impl AsRef<[u8]> + ?Sized), -) -> Response { - let body = body.as_ref(); - let mut content_type = content_type.into().to_string(); - tracing::trace!( - "Outgoing Response: {status} - {content_type:?} - body: {body}", - body = std::str::from_utf8(body).unwrap_or_default(), - ); - let mut builder = Response::builder(status) - .header("content-length", body.len().to_string()) - .header("Access-Control-Allow-Origin", "*") - .body(body); - for chunk in content_type.split(";") { - if let Some((_, header)) = chunk.split_once("content-encoding=") { - builder = builder.header("content-encoding", header); - content_type = content_type.replace(&[";", chunk].concat(), ""); - break; - } +impl From<&Sample> for JSONSample { + fn from(value: &Sample) -> Self { + Self::new( + value.key_expr().as_str(), + value.payload(), + value.encoding(), + value.timestamp(), + ) } - if let Ok(mime) = Mime::from_str(&content_type) { - builder = builder.content_type(mime); - } - builder.build() } #[cfg(feature = "dynamic_plugin")] @@ -305,7 +221,7 @@ impl Plugin for RestPlugin { WORKER_THREAD_NUM.store(conf.work_thread_num, Ordering::SeqCst); MAX_BLOCK_THREAD_NUM.store(conf.max_block_thread_num, Ordering::SeqCst); - let task = run(runtime.clone(), conf.clone()); + let task = run(runtime.clone(), conf.addr); let task = blockon_runtime(async { timeout(Duration::from_millis(1), spawn_runtime(task)).await }); @@ -368,214 +284,467 @@ fn with_extended_string R>( result } -async fn query(mut req: Request<(Arc, String)>) -> tide::Result { - tracing::trace!("Incoming GET request: {:?}", req); - - let first_accept = match req.header("accept") { - Some(accept) => accept[0] - .to_string() - .split(';') - .next() - .unwrap() - .split(',') - .next() - .unwrap() - .to_string(), - None => "application/json".to_string(), - }; - if first_accept == "text/event-stream" { - Ok(tide::sse::upgrade( - req, - move |req: Request<(Arc, String)>, sender: Sender| async move { - let key_expr = match path_to_key_expr(req.url().path(), &req.state().1) { - Ok(ke) => ke.into_owned(), - Err(e) => { - return Err(tide::Error::new( - tide::StatusCode::BadRequest, - anyhow::anyhow!("{}", e), - )) - } - }; - spawn_runtime(async move { - tracing::debug!("Subscribe to {} for SSE stream", key_expr); - let sender = &sender; - let sub = req.state().0.declare_subscriber(&key_expr).await.unwrap(); - loop { - let sample = sub.recv_async().await.unwrap(); - let json_sample = - serde_json::to_string(&sample_to_json(&sample)).unwrap_or("{}".into()); - - match timeout( - std::time::Duration::new(10, 0), - sender.send(&sample.kind().to_string(), json_sample, None), - ) - .await - { - Ok(Ok(_)) => {} - Ok(Err(e)) => { - tracing::debug!("SSE error ({})! Unsubscribe and terminate", e); - if let Err(e) = sub.undeclare().await { - tracing::error!("Error undeclaring subscriber: {}", e); - } - break; - } - Err(_) => { - tracing::debug!("SSE timeout! Unsubscribe and terminate",); - if let Err(e) = sub.undeclare().await { - tracing::error!("Error undeclaring subscriber: {}", e); - } - break; - } - } - } - }); - Ok(()) - }, +fn app(session: Session) -> Router { + Router::new() + .route( + "/{*key_expr}", + get(subscribe_or_query) + .post(subscribe_or_query) + .put(publish) + .patch(publish) + .delete(publish), + ) + .with_state(AppState { session }) + .layer( + TraceLayer::new_for_http() + .make_span_with(DefaultMakeSpan::new().include_headers(true)) + .on_request(DefaultOnRequest::new().level(Level::TRACE)) + .on_response( + DefaultOnResponse::new() + .level(Level::TRACE) + .include_headers(true), + ), + ) + .layer( + CorsLayer::new() + .allow_methods([ + Method::GET, + Method::POST, + Method::PUT, + Method::PATCH, + Method::DELETE, + ]) + .allow_origin(Any) + .allow_credentials(false), + ) + .layer(SetResponseHeaderLayer::overriding( + header::ACCESS_CONTROL_ALLOW_ORIGIN, + HeaderValue::from_static("*"), )) - } else { - let body = req.body_bytes().await.unwrap_or_default(); - let url = req.url(); - let key_expr = match path_to_key_expr(url.path(), &req.state().1) { - Ok(ke) => ke, - Err(e) => { - return Ok(response( - StatusCode::BadRequest, - "text/plain", - &e.to_string(), - )) - } - }; - let query_part = url.query(); - let parameters = Parameters::from(query_part.unwrap_or_default()); - let consolidation = if parameters.time_range().is_some() { - QueryConsolidation::from(zenoh::query::ConsolidationMode::None) - } else { - QueryConsolidation::from(zenoh::query::ConsolidationMode::Latest) - }; - let raw = parameters.contains_key(RAW_KEY); - let mut query = req - .state() - .0 - .get(Selector::borrowed(&key_expr, ¶meters)) - .consolidation(consolidation) - .with(flume::unbounded()); - if !body.is_empty() { - let encoding: Encoding = req - .content_type() - .map(|m| Encoding::from(m.to_string())) - .unwrap_or_default(); - query = query.payload(body).encoding(encoding); - } - match query.await { - Ok(receiver) => { - if raw { - Ok(to_raw_response(receiver).await) - } else if first_accept == "text/html" { - Ok(to_html_response(receiver).await) - } else { - Ok(to_json_response(receiver).await) - } - } - Err(e) => Ok(response( - StatusCode::InternalServerError, - "text/plain", - &e.to_string(), - )), +} + +#[derive(Clone)] +struct AppState { + session: Session, +} + +async fn subscribe(state: AppState, key_expr: KeyExpr<'static>) -> Response { + let subscriber = match state.session.declare_subscriber(&key_expr).await { + Ok(sub) => sub, + Err(err) => return (StatusCode::INTERNAL_SERVER_ERROR, err.to_string()).into_response(), + }; + struct SubscriberStream { + stream: RecvStream<'static, Sample>, + _subscriber: Subscriber>, + } + impl Stream for SubscriberStream { + type Item = Sample; + + fn poll_next(mut self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll> { + self.stream.poll_next_unpin(cx) } } + let stream = SubscriberStream { + stream: subscriber.handler().clone().into_stream(), + _subscriber: subscriber, + }; + Sse::new(stream.map(|sample| { + Event::default() + .event(sample.kind().to_string()) + .json_data(JSONSample::from(&sample)) + })) + .into_response() } -async fn write(mut req: Request<(Arc, String)>) -> tide::Result { - tracing::trace!("Incoming PUT request: {:?}", req); - match req.body_bytes().await { - Ok(bytes) => { - let key_expr = match path_to_key_expr(req.url().path(), &req.state().1) { - Ok(ke) => ke, - Err(e) => { - return Ok(response( - StatusCode::BadRequest, - "text/plain", - &e.to_string(), - )) +async fn query( + state: AppState, + accept: Accept, + key_expr: KeyExpr<'static>, + encoding: Encoding, + uri: Uri, + body: ZBytes, +) -> Response { + let parameters = Parameters::from(uri.query().unwrap_or_default()); + let consolidation = if parameters.time_range().is_some() { + QueryConsolidation::from(zenoh::query::ConsolidationMode::None) + } else { + QueryConsolidation::from(zenoh::query::ConsolidationMode::Latest) + }; + let mut query = state + .session + .get(Selector::borrowed(&key_expr, ¶meters)) + .consolidation(consolidation) + .with(flume::unbounded()); + if !body.is_empty() { + query = query.payload(body).encoding(encoding); + } + match query.await { + Ok(receiver) => match accept { + Accept::Raw => match receiver.recv_async().await { + Ok(reply) => { + let (encoding, payload) = match reply.result() { + Ok(sample) => (sample.encoding(), sample.payload()), + Err(err) => (err.encoding(), err.payload()), + }; + let content_type = Some([(header::CONTENT_TYPE, encoding.to_string())]) + .filter(|[(_, e)]| Mime::from_str(e).is_ok()); + (content_type, payload.to_bytes().to_vec()).into_response() } - }; - - let encoding: Encoding = req - .content_type() - .map(|m| Encoding::from(m.to_string())) - .unwrap_or_default(); - - // @TODO: Define the right congestion control value - let session = &req.state().0; - let res = match method_to_kind(req.method()) { - SampleKind::Put => session.put(&key_expr, bytes).encoding(encoding).await, - SampleKind::Delete => session.delete(&key_expr).await, - }; - match res { - Ok(_) => Ok(Response::new(StatusCode::Ok)), - Err(e) => Ok(response( - StatusCode::InternalServerError, - "text/plain", - &e.to_string(), - )), + Err(_) => StatusCode::OK.into_response(), + }, + Accept::Html => { + let mut html = "
\n".to_string(); + while let Ok(reply) = receiver.recv_async().await { + let (key, payload) = match reply.result() { + Ok(sample) => (sample.key_expr().as_str(), sample.payload().to_bytes()), + Err(err) => ("ERROR", err.payload().to_bytes()), + }; + let payload = String::from_utf8_lossy(&payload); + write!(&mut html, "
{key}
\n
{payload}
\n").unwrap(); + } + Html(html + "
\n").into_response() } - } - Err(e) => Ok(response( - StatusCode::NoContent, - "text/plain", - &e.to_string(), - )), + Accept::Json => receiver + .stream() + .map(|reply| match reply.into_result() { + Ok(sample) => JSONSample::from(&sample), + Err(err) => JSONSample::new("ERROR", err.payload(), err.encoding(), None), + }) + .collect::>() + .map(Json) + .await + .into_response(), + _ => unreachable!(), + }, + Err(err) => (StatusCode::INTERNAL_SERVER_ERROR, err.to_string()).into_response(), } } -pub async fn run(runtime: DynamicRuntime, conf: Config) -> ZResult<()> { +async fn subscribe_or_query( + State(state): State, + accept: Accept, + KeyExprPath(key_expr): KeyExprPath, + EncodingHeader(encoding): EncodingHeader, + uri: Uri, + ZBytesBody(body): ZBytesBody, +) -> Response { + match accept { + Accept::EventStream => subscribe(state, key_expr).await, + accept => query(state, accept, key_expr, encoding, uri, body).await, + } +} + +async fn publish( + State(state): State, + method: Method, + KeyExprPath(key_expr): KeyExprPath, + EncodingHeader(encoding): EncodingHeader, + ZBytesBody(bytes): ZBytesBody, +) -> Response { + // @TODO: Define the right congestion control value + let res = if method == Method::DELETE { + state.session.delete(key_expr).await + } else { + state.session.put(key_expr, bytes).encoding(encoding).await + }; + match res { + Ok(_) => StatusCode::OK.into_response(), + Err(err) => (StatusCode::INTERNAL_SERVER_ERROR, err.to_string()).into_response(), + } +} + +pub async fn run(runtime: DynamicRuntime, addr: SocketAddr) -> ZResult<()> { // Try to initiate login. // Required in case of dynamic lib, otherwise no logs. // But cannot be done twice in case of static link. zenoh::init_log_from_env_or("error"); - let zid = runtime.zid().to_string(); - let session = zenoh::session::init(runtime).await.unwrap(); + match tokio::try_join!( + zenoh::session::init(runtime), + TcpListener::bind(addr).map_err(Into::into) + ) { + Ok((session, listener)) => axum::serve(listener, app(session)).await?, + Err(err) => { + tracing::error!("Unable to start http server for REST: {:?}", err); + return Err(err); + } + } + Ok(()) +} + +struct KeyExprPath(KeyExpr<'static>); + +impl FromRequestParts for KeyExprPath { + type Rejection = Response; + + async fn from_request_parts( + parts: &mut Parts, + state: &AppState, + ) -> Result { + let Path(mut key_expr): Path = Path::from_request_parts(parts, state) + .await + .map_err(IntoResponse::into_response)?; + if let Some(suffix) = key_expr.strip_prefix("@/local") { + if suffix.is_empty() || suffix.starts_with('/') { + key_expr = format!("@/{zid}{suffix}", zid = state.session.zid()); + } + } + match KeyExpr::try_from(key_expr) { + Ok(key_expr) => Ok(KeyExprPath(key_expr)), + Err(err) => Err((StatusCode::BAD_REQUEST, err.to_string()).into_response()), + } + } +} + +struct EncodingHeader(Encoding); + +impl FromRequestParts for EncodingHeader { + type Rejection = Infallible; + + async fn from_request_parts( + parts: &mut Parts, + _state: &AppState, + ) -> Result { + let encoding = match parts.headers.get(header::CONTENT_TYPE) { + Some(h) => Encoding::from(String::from_utf8_lossy(h.as_bytes()).as_ref()), + None => Encoding::default(), + }; + Ok(EncodingHeader(encoding)) + } +} + +enum Accept { + EventStream, + Raw, + Html, + Json, +} + +impl FromRequestParts for Accept { + type Rejection = Infallible; + + async fn from_request_parts( + parts: &mut Parts, + _state: &AppState, + ) -> Result { + let accept = match parts + .headers + .get(header::ACCEPT) + .and_then(|h| h.to_str().ok()?.split(',').next()?.split(';').next()) + { + Some("text/event-stream") => Accept::EventStream, + _ if Parameters::from(parts.uri.query().unwrap_or_default()).contains_key(RAW_KEY) => { + Accept::Raw + } + Some("text/html") => Accept::Html, + _ => Accept::Json, + }; + Ok(accept) + } +} + +struct ZBytesBody(ZBytes); + +impl FromRequest for ZBytesBody { + type Rejection = (StatusCode, String); + + async fn from_request(req: Request, _state: &AppState) -> Result { + let mut stream = req.into_body().into_data_stream(); + let mut writer = ZBytes::writer(); + while let Some(bytes) = stream.next().await { + match bytes { + Ok(bytes) => writer.append(bytes.into()), + Err(err) => return Err((StatusCode::INTERNAL_SERVER_ERROR, err.to_string())), + } + } + Ok(ZBytesBody(writer.finish())) + } +} + +#[cfg(test)] +mod tests { + use std::time::Duration; + + use axum::{ + body::{Body, Bytes}, + http::{header, Method, Request}, + }; + use futures::{FutureExt, StreamExt}; + use tokio::time::timeout; + use tower::ServiceExt; + use zenoh::{bytes::Encoding, sample::SampleKind, Config, Session, Wait}; + + use crate::app; + + const TEST_PORTS: [u16; 3] = [42000, 42001, 42002]; + + async fn setup(port: u16) -> (Session, Session) { + let mut config1 = Config::default(); + config1.scouting.multicast.set_enabled(Some(false)).unwrap(); + config1 + .listen + .endpoints + .set(vec![format!("tcp/127.0.0.1:{}", port).parse().unwrap()]) + .unwrap(); + + let mut config2 = Config::default(); + config2.scouting.multicast.set_enabled(Some(false)).unwrap(); + config2 + .connect + .endpoints + .set(vec![format!("tcp/127.0.0.1:{}", port).parse().unwrap()]) + .unwrap(); + let (s1, s2) = tokio::try_join!(zenoh::open(config1), zenoh::open(config2)).unwrap(); + tokio::time::sleep(Duration::from_secs(1)).await; + (s1, s2) + } - let mut app = Server::with_state((Arc::new(session), zid)); - app.with( - tide::security::CorsMiddleware::new() - .allow_methods( - "GET, POST, PUT, PATCH, DELETE" - .parse::() + #[tokio::test(flavor = "multi_thread", worker_threads = 4)] + async fn publish() { + let (pub_session, sub_session) = setup(TEST_PORTS[0]).await; + let subscriber = sub_session.declare_subscriber("test/**").await.unwrap(); + tokio::time::sleep(Duration::from_secs(1)).await; + for method in [Method::PUT, Method::PATCH] { + let response = app(pub_session.clone()) + .oneshot( + Request::builder() + .method(method) + .uri("/test/publish") + .header(header::CONTENT_TYPE, "text/plain") + .body(Body::from("payload")) + .unwrap(), + ) + .await + .unwrap(); + assert!(response.status().is_success()); + tokio::time::sleep(Duration::from_secs(1)).await; + let sample = subscriber.try_recv().unwrap().unwrap(); + assert_eq!(sample.kind(), SampleKind::Put); + assert_eq!(sample.key_expr().as_str(), "test/publish"); + assert_eq!(sample.payload().try_to_string().unwrap(), "payload"); + assert_eq!(sample.encoding(), &Encoding::TEXT_PLAIN); + } + let response = app(pub_session.clone()) + .oneshot( + Request::builder() + .method(Method::DELETE) + .uri("/test/publish") + .body(Body::empty()) .unwrap(), ) - .allow_origin(tide::security::Origin::from("*")) - .allow_credentials(false), - ); - - app.at("/") - .get(query) - .post(query) - .put(write) - .patch(write) - .delete(write); - app.at("*") - .get(query) - .post(query) - .put(write) - .patch(write) - .delete(write); - - if let Err(e) = app.listen(conf.http_port).await { - tracing::error!("Unable to start http server for REST: {:?}", e); - return Err(e.into()); + .await + .unwrap(); + assert!(response.status().is_success()); + tokio::time::sleep(Duration::from_secs(1)).await; + let sample = subscriber.try_recv().unwrap().unwrap(); + assert_eq!(sample.kind(), SampleKind::Delete); + assert_eq!(sample.key_expr().as_str(), "test/publish"); } - Ok(()) -} -fn path_to_key_expr<'a>(path: &'a str, zid: &str) -> ZResult> { - let path = path.strip_prefix('/').unwrap_or(path); - if path == "@/local" { - KeyExpr::try_from(format!("@/{zid}")) - } else if let Some(suffix) = path.strip_prefix("@/local/") { - KeyExpr::try_from(format!("@/{zid}/{suffix}")) - } else { - KeyExpr::try_from(path) + #[tokio::test(flavor = "multi_thread", worker_threads = 4)] + async fn subscribe() { + let (pub_session, sub_session) = setup(TEST_PORTS[1]).await; + let response = app(sub_session.clone()) + .oneshot( + Request::builder() + .method(Method::GET) + .uri("/test/subscribe") + .header(header::ACCEPT, "text/event-stream") + .body(Body::empty()) + .unwrap(), + ) + .await + .unwrap(); + assert!(response.status().is_success()); + let mut stream = response.into_body().into_data_stream(); + tokio::time::sleep(Duration::from_secs(1)).await; + for i in 0..2 { + pub_session + .put("test/subscribe", format!("payload {i}")) + .encoding(Encoding::TEXT_PLAIN) + .await + .unwrap(); + let sample = timeout(Duration::from_secs(1), stream.next()) + .await + .unwrap() + .unwrap() + .unwrap(); + assert_eq!( + serde_json::from_str::( + std::str::from_utf8(&sample) + .unwrap() + .strip_prefix("event: PUT\ndata: ") + .unwrap() + ) + .unwrap(), + serde_json::json!({ + "key": "test/subscribe", + "value": format!("payload {i}"), + "encoding": "text/plain", + "timestamp": null, + }), + ); + } + } + + #[tokio::test(flavor = "multi_thread", worker_threads = 4)] + async fn query() { + let (get_session, queryable_session) = setup(TEST_PORTS[2]).await; + let _queryable = queryable_session + .declare_queryable("test/**") + .callback(|q| { + q.reply(q.key_expr(), "reply") + .encoding(Encoding::TEXT_PLAIN) + .wait() + .unwrap() + }) + .await + .unwrap(); + tokio::time::sleep(Duration::from_secs(1)).await; + let check_json: fn(Bytes) = |body| { + assert_eq!( + serde_json::from_slice::(&body).unwrap(), + serde_json::json!([{ + "key": "test/query", + "value": "reply", + "encoding": "text/plain", + "timestamp": null, + }]), + ) + }; + let check_html: fn(Bytes) = + |body: Bytes| assert_eq!(body, "
\n
test/query
\n
reply
\n
\n"); + let check_raw: fn(Bytes) = |body| assert_eq!(body, "reply"); + for (query, accept, check) in [ + ("", "application/json", check_json), + ("", "text/html; charset=utf-8", check_html), + ("?_raw=true", "text/plain", check_raw), + ] { + let response = app(get_session.clone()) + .oneshot( + Request::builder() + .method(Method::GET) + .uri(format!("/test/query{query}")) + .header(header::ACCEPT, accept) + .body(Body::empty()) + .unwrap(), + ) + .await + .unwrap(); + assert!(response.status().is_success()); + assert_eq!( + response.headers().get(header::CONTENT_TYPE).unwrap(), + accept + ); + let body = response + .into_body() + .into_data_stream() + .next() + .now_or_never() + .unwrap() + .unwrap() + .unwrap(); + check(body); + } } } diff --git a/plugins/zenoh-plugin-storage-manager/Cargo.toml b/plugins/zenoh-plugin-storage-manager/Cargo.toml index 0221948f9b..d9e7e33a9f 100644 --- a/plugins/zenoh-plugin-storage-manager/Cargo.toml +++ b/plugins/zenoh-plugin-storage-manager/Cargo.toml @@ -63,7 +63,6 @@ serde_json = { workspace = true } zenoh_backend_traits = { workspace = true } [dev-dependencies] -async-global-executor = { workspace = true } uhlc = { workspace = true } [package.metadata.deb] diff --git a/plugins/zenoh-plugin-storage-manager/tests/operations.rs b/plugins/zenoh-plugin-storage-manager/tests/operations.rs index bb995b73d2..78286669f0 100644 --- a/plugins/zenoh-plugin-storage-manager/tests/operations.rs +++ b/plugins/zenoh-plugin-storage-manager/tests/operations.rs @@ -19,9 +19,7 @@ use std::{str::FromStr, thread::sleep}; use tokio::runtime::Runtime; -use zenoh::{ - internal::zasync_executor_init, query::Reply, sample::Sample, time::Timestamp, Config, Session, -}; +use zenoh::{query::Reply, sample::Sample, time::Timestamp, Config, Session}; use zenoh_plugin_trait::Plugin; async fn put_data(session: &Session, key_expr: &str, value: &str, _timestamp: Timestamp) { @@ -50,10 +48,6 @@ async fn get_data(session: &Session, key_expr: &str) -> Vec { } async fn test_updates_in_order() { - async { - zasync_executor_init!(); - } - .await; let mut config = Config::default(); config .insert_json5( diff --git a/plugins/zenoh-plugin-storage-manager/tests/wildcard.rs b/plugins/zenoh-plugin-storage-manager/tests/wildcard.rs index 4653256321..4d596b3a70 100644 --- a/plugins/zenoh-plugin-storage-manager/tests/wildcard.rs +++ b/plugins/zenoh-plugin-storage-manager/tests/wildcard.rs @@ -20,9 +20,7 @@ use std::{str::FromStr, thread::sleep}; // use std::collections::HashMap; use tokio::runtime::Runtime; -use zenoh::{ - internal::zasync_executor_init, query::Reply, sample::Sample, time::Timestamp, Config, Session, -}; +use zenoh::{query::Reply, sample::Sample, time::Timestamp, Config, Session}; use zenoh_plugin_trait::Plugin; async fn put_data(session: &Session, key_expr: &str, value: &str, _timestamp: Timestamp) { @@ -51,7 +49,6 @@ async fn get_data(session: &Session, key_expr: &str) -> Vec { } async fn test_wild_card_in_order() { - zasync_executor_init!(); let mut config = Config::default(); config .insert_json5( diff --git a/zenoh/src/lib.rs b/zenoh/src/lib.rs index 684a317949..d074acaf1c 100644 --- a/zenoh/src/lib.rs +++ b/zenoh/src/lib.rs @@ -1037,9 +1037,7 @@ pub mod internal { EncodingBuilderTrait, QoSBuilderTrait, SampleBuilderTrait, TimestampBuilderTrait, }; } - pub use zenoh_core::{ - zasync_executor_init, zasynclock, zerror, zlock, zread, ztimeout, zwrite, ResolveFuture, - }; + pub use zenoh_core::{zasynclock, zerror, zlock, zread, ztimeout, zwrite, ResolveFuture}; pub use zenoh_result::bail; pub use zenoh_sync::Condition; pub use zenoh_task::{TaskController, TerminatableTask};