diff --git a/Cargo.lock b/Cargo.lock index 2fd3fb0..35eee23 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -92,7 +92,7 @@ checksum = "965c2d33e53cb6b267e148a4cb0760bc01f4904c1cd4bb4002a085bb016d1490" dependencies = [ "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.79", "synstructure", ] @@ -104,25 +104,25 @@ checksum = "7b18050c2cd6fe86c3a76584ef5e0baf286d038cda203eb6223df2cc413565f7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.79", ] [[package]] name = "async-trait" -version = "0.1.82" +version = "0.1.83" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a27b8a3a6e1a44fa4c8baf1f653e4172e81486d4941f2237e20dc2d0cf4ddff1" +checksum = "721cae7de5c34fbb2acd27e21e6d2cf7b886dce0c27388d46c4e6c47ea4318dd" dependencies = [ "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.79", ] [[package]] name = "autocfg" -version = "1.3.0" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c4b4d0bd25bd0b74681c0ad21497610ce1b7c91b1022cd21c80c6fbdd9476b0" +checksum = "ace50bade8e6234aa140d9a2f552bbee1db4d353f69b8217bc503490fc1a9f26" [[package]] name = "backtrace" @@ -157,6 +157,15 @@ version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8c3c1a368f70d6cf7302d78f8f7093da241fb8e8807c05cc9e51a125895a6d5b" +[[package]] +name = "bincode" +version = "1.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b1f45e9417d87227c7a56d22e471c6206462cba514c7590c09aff4cf6d1ddcad" +dependencies = [ + "serde", +] + [[package]] name = "bindgen" version = "0.69.4" @@ -166,7 +175,7 @@ dependencies = [ "bitflags", "cexpr", "clang-sys", - "itertools 0.10.5", + "itertools 0.12.1", "lazy_static", "lazycell", "proc-macro2", @@ -174,7 +183,7 @@ dependencies = [ "regex", "rustc-hash 1.1.0", "shlex", - "syn 2.0.77", + "syn 2.0.79", ] [[package]] @@ -209,9 +218,9 @@ checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" [[package]] name = "bytes" -version = "1.7.1" +version = "1.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8318a53db07bb3f8dca91a600466bdb3f2eaadeedfdbcf02e1accbad9271ba50" +checksum = "428d9aa8fbc0670b7b8d6030a7fadd0f86151cae55e4dbbece15f3780a3dfaf3" [[package]] name = "bzip2-sys" @@ -232,9 +241,9 @@ checksum = "981520c98f422fcc584dc1a95c334e6953900b9106bc47a9839b81790009eb21" [[package]] name = "cc" -version = "1.1.20" +version = "1.1.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "45bcde016d64c21da4be18b655631e5ab6d3107607e71a73a9f53eb48aae23fb" +checksum = "812acba72f0a070b003d3697490d2b55b837230ae7c6c6497f05cc2ddbb8d938" dependencies = [ "jobserver", "libc", @@ -432,7 +441,7 @@ checksum = "cb7330aeadfbe296029522e6c40f315320aba36fc43a5b3632f3795348f3bd22" dependencies = [ "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.79", ] [[package]] @@ -476,7 +485,7 @@ checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.79", ] [[package]] @@ -597,7 +606,7 @@ checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac" dependencies = [ "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.79", ] [[package]] @@ -676,7 +685,7 @@ checksum = "53010ccb100b96a67bc32c0175f0ed1426b31b655d562898e57325f81c023ac0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.79", ] [[package]] @@ -738,9 +747,9 @@ dependencies = [ [[package]] name = "httparse" -version = "1.9.4" +version = "1.9.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fcc0b4a115bf80b728eb8ea024ad5bd707b615bfed49e0665b6e0f86fd082d9" +checksum = "7d71d3574edd2771538b901e6549113b4006ece66150fb69c0fb6d9a2adae946" [[package]] name = "humantime" @@ -794,9 +803,9 @@ checksum = "c397ca3ea05ad509c4ec451fea28b4771236a376ca1c69fd5143aae0cf8f93c4" [[package]] name = "itertools" -version = "0.10.5" +version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b0fd2260e829bddf4cb6ea802289de2f86d6a7a690192fbe91b3f46e0f2c8473" +checksum = "ba291022dbbd398a455acf126c1e341954079855bc60dfdda641363bd6922569" dependencies = [ "either", ] @@ -898,11 +907,17 @@ version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55" +[[package]] +name = "leb128" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "884e2677b40cc8c339eaefcb701c32ef1fd2493d71118dc0ca4b6a736c93bd67" + [[package]] name = "libc" -version = "0.2.158" +version = "0.2.159" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d8adc4bb1803a324070e64a98ae98f38934d91957a99cfb3a43dcbc01bc56439" +checksum = "561d97a539a36e26a9a5fad1ea11a3039a67714694aaa379433e580854bc3dc5" [[package]] name = "libloading" @@ -1174,9 +1189,12 @@ dependencies = [ [[package]] name = "once_cell" -version = "1.19.0" +version = "1.20.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" +checksum = "82881c4be219ab5faaf2ad5e5e5ecdff8c66bd7402ca3160975c93b24961afd1" +dependencies = [ + "portable-atomic", +] [[package]] name = "openssl-probe" @@ -1225,9 +1243,9 @@ checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" [[package]] name = "pest" -version = "2.7.12" +version = "2.7.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c73c26c01b8c87956cea613c907c9d6ecffd8d18a2a5908e5de0adfaa185cea" +checksum = "fdbef9d1d47087a895abd220ed25eb4ad973a5e26f6a4367b038c25e28dfc2d9" dependencies = [ "memchr", "thiserror", @@ -1236,9 +1254,9 @@ dependencies = [ [[package]] name = "pest_derive" -version = "2.7.12" +version = "2.7.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "664d22978e2815783adbdd2c588b455b1bd625299ce36b2a99881ac9627e6d8d" +checksum = "4d3a6e3394ec80feb3b6393c725571754c6188490265c61aaf260810d6b95aa0" dependencies = [ "pest", "pest_generator", @@ -1246,22 +1264,22 @@ dependencies = [ [[package]] name = "pest_generator" -version = "2.7.12" +version = "2.7.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a2d5487022d5d33f4c30d91c22afa240ce2a644e87fe08caad974d4eab6badbe" +checksum = "94429506bde1ca69d1b5601962c73f4172ab4726571a59ea95931218cb0e930e" dependencies = [ "pest", "pest_meta", "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.79", ] [[package]] name = "pest_meta" -version = "2.7.12" +version = "2.7.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0091754bbd0ea592c4deb3a122ce8ecbb0753b738aa82bc055fcc2eccc8d8174" +checksum = "ac8a071862e93690b6e34e9a5fb8e33ff3734473ac0245b27232222c4906a33f" dependencies = [ "once_cell", "pest", @@ -1308,7 +1326,7 @@ dependencies = [ "phf_shared", "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.79", ] [[package]] @@ -1355,9 +1373,9 @@ dependencies = [ [[package]] name = "pkg-config" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d231b230927b5e4ad203db57bbcbee2802f6bce620b1e4a9024a07d94e2907ec" +checksum = "953ec861398dccce10c670dfeaf3ec4911ca479e9c02154b3a215178c5f566f2" [[package]] name = "pnet_base" @@ -1391,6 +1409,12 @@ dependencies = [ "winapi", ] +[[package]] +name = "portable-atomic" +version = "1.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cc9c68a3f6da06753e9335d63e27f6b9754dd1920d941135b7ea8224f141adb2" + [[package]] name = "powerfmt" version = "0.2.0" @@ -1516,14 +1540,14 @@ dependencies = [ [[package]] name = "regex" -version = "1.10.6" +version = "1.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4219d74c6b67a3654a9fbebc4b419e22126d13d2f3c4a07ee0cb61ff79a79619" +checksum = "38200e5ee88914975b69f657f0801b6f6dccafd44fd9326302a4aaeecfacb1d8" dependencies = [ "aho-corasick", "memchr", - "regex-automata 0.4.7", - "regex-syntax 0.8.4", + "regex-automata 0.4.8", + "regex-syntax 0.8.5", ] [[package]] @@ -1537,13 +1561,13 @@ dependencies = [ [[package]] name = "regex-automata" -version = "0.4.7" +version = "0.4.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38caf58cc5ef2fed281f89292ef23f6365465ed9a41b7a7754eb4e26496c92df" +checksum = "368758f23274712b504848e9d5a6f010445cc8b87a7cdb4d7cbee666c1288da3" dependencies = [ "aho-corasick", "memchr", - "regex-syntax 0.8.4", + "regex-syntax 0.8.5", ] [[package]] @@ -1554,9 +1578,9 @@ checksum = "f162c6dd7b008981e4d40210aca20b4bd0f9b60ca9271061b07f78537722f2e1" [[package]] name = "regex-syntax" -version = "0.8.4" +version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a66a03ae7c801facd77a29370b4faec201768915ac14a721ba36f20bc9c209b" +checksum = "2b15c43186be67a4fd63bee50d0303afffcef381492ebe2c5d87f324e1b8815c" [[package]] name = "ring" @@ -1691,19 +1715,18 @@ dependencies = [ [[package]] name = "rustls-pemfile" -version = "2.1.3" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "196fe16b00e106300d3e45ecfcb764fa292a535d7326a29a5875c579c7417425" +checksum = "dce314e5fee3f39953d46bb63bb8a46d40c2f8fb7cc5a3b6cab2bde9721d6e50" dependencies = [ - "base64 0.22.1", "rustls-pki-types", ] [[package]] name = "rustls-pki-types" -version = "1.8.0" +version = "1.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fc0a2ce646f8655401bb81e7927b812614bd5d91dbc968696be50603510fcaf0" +checksum = "0e696e35370c65c9c541198af4543ccd580cf17fc25d8e05c5a242b202488c55" [[package]] name = "rustls-platform-verifier" @@ -1789,7 +1812,7 @@ dependencies = [ "proc-macro2", "quote", "serde_derive_internals", - "syn 2.0.77", + "syn 2.0.79", ] [[package]] @@ -1824,9 +1847,9 @@ dependencies = [ [[package]] name = "security-framework-sys" -version = "2.11.1" +version = "2.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75da29fe9b9b08fe9d6b22b5b4bcbc75d8db3aa31e639aa56bb62e9d46bfceaf" +checksum = "ea4a292869320c0272d7bc55a5a6aafaff59b4f63404a003887b679a2e05b4b6" dependencies = [ "core-foundation-sys", "libc", @@ -1878,7 +1901,7 @@ checksum = "243902eda00fad750862fc144cea25caca5e20d615af0a81bee94ca738f1df1f" dependencies = [ "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.79", ] [[package]] @@ -1889,7 +1912,7 @@ checksum = "18d26a20a969b9e3fdf2fc2d9f21eda6c40e2de84c9408bb5d3b05d499aae711" dependencies = [ "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.79", ] [[package]] @@ -2058,9 +2081,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.77" +version = "2.0.79" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f35bcdf61fd8e7be6caf75f429fdca8beb3ed76584befb503b1569faee373ed" +checksum = "89132cd0bf050864e1d38dc3bbc07a0eb8e7530af26344d3d2bbbef83499f590" dependencies = [ "proc-macro2", "quote", @@ -2075,27 +2098,27 @@ checksum = "c8af7666ab7b6390ab78131fb5b0fce11d6b7a6951602017c35fa82800708971" dependencies = [ "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.79", ] [[package]] name = "thiserror" -version = "1.0.63" +version = "1.0.64" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c0342370b38b6a11b6cc11d6a805569958d54cfa061a29969c3b5ce2ea405724" +checksum = "d50af8abc119fb8bb6dbabcfa89656f46f84aa0ac7688088608076ad2b459a84" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.63" +version = "1.0.64" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4558b58466b9ad7ca0f102865eccc95938dca1a74a856f2b57b6629050da261" +checksum = "08904e7672f5eb876eaaf87e0ce17857500934f4981c4a0ab2b4aa98baac7fc3" dependencies = [ "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.79", ] [[package]] @@ -2187,7 +2210,7 @@ checksum = "693d596312e88961bc67d7f1f97af8a70227d9f90c31bba5806eec004978d752" dependencies = [ "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.79", ] [[package]] @@ -2248,7 +2271,7 @@ checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.79", ] [[package]] @@ -2339,9 +2362,9 @@ checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825" [[package]] name = "ucd-trie" -version = "0.1.6" +version = "0.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed646292ffc8188ef8ea4d1e0e0150fb15a5c2e12ad9b8fc191ae7a8a7f3c4b9" +checksum = "2896d95c02a80c6d6a5d6e953d479f5ddf2dfdb6a244441010e373ac0fb88971" [[package]] name = "uhlc" @@ -2385,18 +2408,18 @@ checksum = "e91b56cd4cadaeb79bbf1a5645f6b4f8dc5bde8834ad5894a8db35fda9efa1fe" [[package]] name = "unicode-normalization" -version = "0.1.23" +version = "0.1.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a56d1686db2308d901306f92a263857ef59ea39678a5458e7cb17f01415101f5" +checksum = "5033c97c4262335cded6d6fc3e5c18ab755e1a3dc96376350f3d8e9f009ad956" dependencies = [ "tinyvec", ] [[package]] name = "unicode-xid" -version = "0.2.5" +version = "0.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "229730647fbc343e3a80e463c1db7f78f3855d3f3739bee0dda773c9a037c90a" +checksum = "ebc1c04c71510c7f702b52b7c350734c9ff1295c464a03335b00bb84fc54f853" [[package]] name = "unsafe-libyaml" @@ -2410,12 +2433,6 @@ version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" -[[package]] -name = "unwrap-infallible" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "151ac09978d3c2862c4e39b557f4eceee2cc72150bc4cb4f16abf061b6e381fb" - [[package]] name = "unzip-n" version = "0.1.2" @@ -2539,7 +2556,7 @@ dependencies = [ "once_cell", "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.79", "wasm-bindgen-shared", ] @@ -2561,7 +2578,7 @@ checksum = "afc340c74d9005395cf9dd098506f7f44e38f2b4a21c6aaacf9a105ea5e1e836" dependencies = [ "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.79", "wasm-bindgen-backend", "wasm-bindgen-shared", ] @@ -2574,9 +2591,9 @@ checksum = "c62a0a307cb4a311d3a07867860911ca130c3494e8c2719593806c08bc5d0484" [[package]] name = "webpki-roots" -version = "0.26.5" +version = "0.26.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0bd24728e5af82c6c4ec1b66ac4844bdf8156257fccda846ec58b42cd0cdbe6a" +checksum = "841c67bff177718f1d4dfefde8d8f0e78f9b6589319ba88312f567fc5841a958" dependencies = [ "rustls-pki-types", ] @@ -2780,7 +2797,7 @@ dependencies = [ [[package]] name = "zenoh" version = "1.0.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#09d1d1d353b5fdc620ae61a925bd530676d34382" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#febd589126a4e16d120d04d36e4b50430f569881" dependencies = [ "ahash", "async-trait", @@ -2807,7 +2824,6 @@ dependencies = [ "tokio-util", "tracing", "uhlc 0.8.0", - "unwrap-infallible", "vec_map", "zenoh-buffers", "zenoh-codec", @@ -2841,6 +2857,7 @@ dependencies = [ "tracing", "uhlc 0.7.0", "zenoh", + "zenoh-ext", "zenoh-plugin-trait", "zenoh_backend_traits", ] @@ -2848,7 +2865,7 @@ dependencies = [ [[package]] name = "zenoh-buffers" version = "1.0.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#09d1d1d353b5fdc620ae61a925bd530676d34382" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#febd589126a4e16d120d04d36e4b50430f569881" dependencies = [ "zenoh-collections", ] @@ -2856,7 +2873,7 @@ dependencies = [ [[package]] name = "zenoh-codec" version = "1.0.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#09d1d1d353b5fdc620ae61a925bd530676d34382" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#febd589126a4e16d120d04d36e4b50430f569881" dependencies = [ "tracing", "uhlc 0.8.0", @@ -2867,12 +2884,12 @@ dependencies = [ [[package]] name = "zenoh-collections" version = "1.0.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#09d1d1d353b5fdc620ae61a925bd530676d34382" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#febd589126a4e16d120d04d36e4b50430f569881" [[package]] name = "zenoh-config" version = "1.0.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#09d1d1d353b5fdc620ae61a925bd530676d34382" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#febd589126a4e16d120d04d36e4b50430f569881" dependencies = [ "json5", "num_cpus", @@ -2893,7 +2910,7 @@ dependencies = [ [[package]] name = "zenoh-core" version = "1.0.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#09d1d1d353b5fdc620ae61a925bd530676d34382" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#febd589126a4e16d120d04d36e4b50430f569881" dependencies = [ "lazy_static", "tokio", @@ -2904,7 +2921,7 @@ dependencies = [ [[package]] name = "zenoh-crypto" version = "1.0.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#09d1d1d353b5fdc620ae61a925bd530676d34382" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#febd589126a4e16d120d04d36e4b50430f569881" dependencies = [ "aes", "hmac", @@ -2914,10 +2931,27 @@ dependencies = [ "zenoh-result", ] +[[package]] +name = "zenoh-ext" +version = "1.0.0-dev" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#febd589126a4e16d120d04d36e4b50430f569881" +dependencies = [ + "bincode", + "flume", + "futures", + "leb128", + "serde", + "tokio", + "tracing", + "zenoh", + "zenoh-macros", + "zenoh-util", +] + [[package]] name = "zenoh-keyexpr" version = "1.0.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#09d1d1d353b5fdc620ae61a925bd530676d34382" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#febd589126a4e16d120d04d36e4b50430f569881" dependencies = [ "hashbrown", "keyed-set", @@ -2931,7 +2965,7 @@ dependencies = [ [[package]] name = "zenoh-link" version = "1.0.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#09d1d1d353b5fdc620ae61a925bd530676d34382" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#febd589126a4e16d120d04d36e4b50430f569881" dependencies = [ "zenoh-config", "zenoh-link-commons", @@ -2948,7 +2982,7 @@ dependencies = [ [[package]] name = "zenoh-link-commons" version = "1.0.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#09d1d1d353b5fdc620ae61a925bd530676d34382" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#febd589126a4e16d120d04d36e4b50430f569881" dependencies = [ "async-trait", "flume", @@ -2971,7 +3005,7 @@ dependencies = [ [[package]] name = "zenoh-link-quic" version = "1.0.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#09d1d1d353b5fdc620ae61a925bd530676d34382" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#febd589126a4e16d120d04d36e4b50430f569881" dependencies = [ "async-trait", "base64 0.22.1", @@ -2996,7 +3030,7 @@ dependencies = [ [[package]] name = "zenoh-link-tcp" version = "1.0.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#09d1d1d353b5fdc620ae61a925bd530676d34382" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#febd589126a4e16d120d04d36e4b50430f569881" dependencies = [ "async-trait", "socket2", @@ -3013,7 +3047,7 @@ dependencies = [ [[package]] name = "zenoh-link-tls" version = "1.0.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#09d1d1d353b5fdc620ae61a925bd530676d34382" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#febd589126a4e16d120d04d36e4b50430f569881" dependencies = [ "async-trait", "base64 0.22.1", @@ -3040,7 +3074,7 @@ dependencies = [ [[package]] name = "zenoh-link-udp" version = "1.0.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#09d1d1d353b5fdc620ae61a925bd530676d34382" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#febd589126a4e16d120d04d36e4b50430f569881" dependencies = [ "async-trait", "socket2", @@ -3059,7 +3093,7 @@ dependencies = [ [[package]] name = "zenoh-link-unixsock_stream" version = "1.0.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#09d1d1d353b5fdc620ae61a925bd530676d34382" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#febd589126a4e16d120d04d36e4b50430f569881" dependencies = [ "async-trait", "nix", @@ -3077,7 +3111,7 @@ dependencies = [ [[package]] name = "zenoh-link-ws" version = "1.0.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#09d1d1d353b5fdc620ae61a925bd530676d34382" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#febd589126a4e16d120d04d36e4b50430f569881" dependencies = [ "async-trait", "futures-util", @@ -3097,18 +3131,18 @@ dependencies = [ [[package]] name = "zenoh-macros" version = "1.0.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#09d1d1d353b5fdc620ae61a925bd530676d34382" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#febd589126a4e16d120d04d36e4b50430f569881" dependencies = [ "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.79", "zenoh-keyexpr", ] [[package]] name = "zenoh-plugin-trait" version = "1.0.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#09d1d1d353b5fdc620ae61a925bd530676d34382" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#febd589126a4e16d120d04d36e4b50430f569881" dependencies = [ "git-version", "libloading", @@ -3124,7 +3158,7 @@ dependencies = [ [[package]] name = "zenoh-protocol" version = "1.0.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#09d1d1d353b5fdc620ae61a925bd530676d34382" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#febd589126a4e16d120d04d36e4b50430f569881" dependencies = [ "const_format", "rand", @@ -3138,7 +3172,7 @@ dependencies = [ [[package]] name = "zenoh-result" version = "1.0.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#09d1d1d353b5fdc620ae61a925bd530676d34382" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#febd589126a4e16d120d04d36e4b50430f569881" dependencies = [ "anyhow", ] @@ -3146,7 +3180,7 @@ dependencies = [ [[package]] name = "zenoh-runtime" version = "1.0.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#09d1d1d353b5fdc620ae61a925bd530676d34382" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#febd589126a4e16d120d04d36e4b50430f569881" dependencies = [ "lazy_static", "ron", @@ -3159,7 +3193,7 @@ dependencies = [ [[package]] name = "zenoh-sync" version = "1.0.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#09d1d1d353b5fdc620ae61a925bd530676d34382" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#febd589126a4e16d120d04d36e4b50430f569881" dependencies = [ "event-listener", "futures", @@ -3172,7 +3206,7 @@ dependencies = [ [[package]] name = "zenoh-task" version = "1.0.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#09d1d1d353b5fdc620ae61a925bd530676d34382" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#febd589126a4e16d120d04d36e4b50430f569881" dependencies = [ "futures", "tokio", @@ -3185,7 +3219,7 @@ dependencies = [ [[package]] name = "zenoh-transport" version = "1.0.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#09d1d1d353b5fdc620ae61a925bd530676d34382" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#febd589126a4e16d120d04d36e4b50430f569881" dependencies = [ "async-trait", "crossbeam-utils", @@ -3218,7 +3252,7 @@ dependencies = [ [[package]] name = "zenoh-util" version = "1.0.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#09d1d1d353b5fdc620ae61a925bd530676d34382" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#febd589126a4e16d120d04d36e4b50430f569881" dependencies = [ "async-trait", "const_format", @@ -3243,7 +3277,7 @@ dependencies = [ [[package]] name = "zenoh_backend_traits" version = "1.0.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#09d1d1d353b5fdc620ae61a925bd530676d34382" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#febd589126a4e16d120d04d36e4b50430f569881" dependencies = [ "async-trait", "const_format", @@ -3275,7 +3309,7 @@ checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.79", ] [[package]] diff --git a/Cargo.toml b/Cargo.toml index 05bc2e7..eba27fa 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -53,6 +53,7 @@ zenoh = { git = "https://github.com/eclipse-zenoh/zenoh.git", branch = "main", f ] , version = "1.0.0-dev" } zenoh_backend_traits = { git = "https://github.com/eclipse-zenoh/zenoh.git", branch = "main" , version = "1.0.0-dev" } zenoh-plugin-trait = { git = "https://github.com/eclipse-zenoh/zenoh.git", branch = "main" , version = "1.0.0-dev" } +zenoh-ext = { git = "https://github.com/eclipse-zenoh/zenoh.git", branch = "main" , version = "1.0.0-dev" } [build-dependencies] rustc_version = "0.4.0" diff --git a/src/lib.rs b/src/lib.rs index 587d4dd..cf05d45 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -12,9 +12,7 @@ // ZettaScale Zenoh Team, // -use std::{ - borrow::Cow, collections::HashMap, future::Future, path::PathBuf, sync::Arc, time::Duration, -}; +use std::{collections::HashMap, future::Future, path::PathBuf, sync::Arc, time::Duration}; use async_trait::async_trait; use rocksdb::{ColumnFamilyDescriptor, Options, WriteBatch, DB}; @@ -33,6 +31,7 @@ use zenoh_backend_traits::{ config::{StorageConfig, VolumeConfig}, *, }; +use zenoh_ext::{z_deserialize, z_serialize}; use zenoh_plugin_trait::{plugin_long_version, plugin_version, Plugin}; const WORKER_THREAD_NUM: usize = 2; @@ -418,7 +417,7 @@ fn put_kv( "Option for ColumFamily {CF_PAYLOADS} was None, cancel put_kv" ))?, &key, - value.payload().into::>(), + value.payload().to_bytes(), ); batch.put_cf( db.cf_handle(CF_DATA_INFO).ok_or(zerror!( @@ -502,34 +501,14 @@ fn get_kv(db: &DB, key: Option) -> ZResult ZResult> { - let mut bytes = ZBytes::empty(); - let mut writer = bytes.writer(); - - writer.serialize(timestamp); - writer.serialize(deleted as u8); - writer.serialize(&encoding); - - Ok(bytes.into()) + let bytes = z_serialize(&(encoding, deleted, timestamp)); + Ok(bytes.to_bytes().into_owned()) } fn decode_data_info(buf: &[u8]) -> ZResult<(Encoding, Timestamp, bool)> { let bytes = ZBytes::from(buf); - let mut reader = bytes.reader(); - - let timestamp: Timestamp = reader - .deserialize() - .map_err(|_| zerror!("Failed to decode data-info (timestamp)"))?; - - let deleted: u8 = reader - .deserialize() - .map_err(|_| zerror!("Failed to decode data-info (deleted)"))?; - - let encoding: Encoding = reader - .deserialize() - .map_err(|_| zerror!("Failed to decode data-info (Encoding)"))?; - - let deleted = deleted != 0; - + let (encoding, deleted, timestamp) = z_deserialize(&bytes) + .map_err(|_| zerror!("Failed to decode data-info (encoding, deleted, timestamp)"))?; Ok((encoding, timestamp, deleted)) }