From 8529951280d0572e5692b18299d0acdabead7759 Mon Sep 17 00:00:00 2001 From: Sebastian Bernauer Date: Fri, 1 Aug 2025 13:25:30 +0200 Subject: [PATCH 1/6] Update dependecies --- .github/workflows/build.yml | 2 +- Cargo.lock | 355 +++++++++++++++--------------------- Cargo.toml | 18 +- README.md | 5 + 4 files changed, 161 insertions(+), 219 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 54877e0..3a1ad6c 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -15,7 +15,7 @@ jobs: strategy: matrix: rust: [stable, beta, nightly] - zookeeper: [3.9.2, 3.8.4, 3.7.2, 3.6.4, 3.5.10] + zookeeper: [3.9.3, 3.9.2, 3.8.4, 3.7.2, 3.6.4, 3.5.10] steps: - name: Check out repository code uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5 diff --git a/Cargo.lock b/Cargo.lock index 8cad80c..9033d6b 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1,77 +1,71 @@ # This file is automatically @generated by Cargo. # It is not intended for manual editing. -version = 3 +version = 4 [[package]] name = "addr2line" -version = "0.21.0" +version = "0.24.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a30b2e23b9e17a9f90641c7ab1549cd9b44f296d3ccbf309d2863cfe398a0cb" +checksum = "dfbe277e56a376000877090da837660b4427aad530e3028d44e0bffe4f89a1c1" dependencies = [ "gimli", ] [[package]] -name = "adler" -version = "1.0.2" +name = "adler2" +version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" +checksum = "320119579fcad9c21884f5c4861d16174d0e06250625266f50fe6898340abefa" [[package]] name = "async-trait" -version = "0.1.80" +version = "0.1.88" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c6fa2087f2753a7da8cc1c0dbfcf89579dd57458e36769de5ac750b4671737ca" +checksum = "e539d3fca749fcee5236ab05e93a52867dd549cc157c8cb7f99595f3cedffdb5" dependencies = [ "proc-macro2", "quote", "syn", ] -[[package]] -name = "autocfg" -version = "1.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c4b4d0bd25bd0b74681c0ad21497610ce1b7c91b1022cd21c80c6fbdd9476b0" - [[package]] name = "backtrace" -version = "0.3.71" +version = "0.3.75" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26b05800d2e817c8b3b4b54abd461726265fa9789ae34330622f2db9ee696f9d" +checksum = "6806a6321ec58106fea15becdad98371e28d92ccbc7c8f1b3b6dd724fe8f1002" dependencies = [ "addr2line", - "cc", "cfg-if", "libc", "miniz_oxide", "object", "rustc-demangle", + "windows-targets", ] [[package]] -name = "byteorder" -version = "1.5.0" +name = "bitflags" +version = "2.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" +checksum = "1b8e56985ec62d17e9c1001dc89c88ecd7dc08e47eba5ec7c29c7b5eeecde967" [[package]] -name = "cc" -version = "1.0.97" +name = "byteorder" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "099a5357d84c4c61eb35fc8eafa9a79a902c2f76911e5747ced4e032edd8d9b4" +checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" [[package]] name = "cfg-if" -version = "1.0.0" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" +checksum = "9555578bc9e57714c812a1f84e4fc5b4d21fcb063490c624de019f7464c91268" [[package]] name = "futures" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "645c6916888f6cb6350d2550b80fb63e734897a8498abe35cfb732b6487804b0" +checksum = "65bc07b1a8bc7c85c5f2e110c476c7389b4554ba72af57d8445ea63a576b0876" dependencies = [ "futures-channel", "futures-core", @@ -84,9 +78,9 @@ dependencies = [ [[package]] name = "futures-channel" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eac8f7d7865dcb88bd4373ab671c8cf4508703796caa2b1985a9ca867b3fcb78" +checksum = "2dff15bf788c671c1934e366d07e30c1814a8ef514e1af724a602e8a2fbe1b10" dependencies = [ "futures-core", "futures-sink", @@ -94,15 +88,15 @@ dependencies = [ [[package]] name = "futures-core" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dfc6580bb841c5a68e9ef15c77ccc837b40a7504914d52e47b8b0e9bbda25a1d" +checksum = "05f29059c0c2090612e8d742178b0580d2dc940c837851ad723096f87af6663e" [[package]] name = "futures-executor" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a576fc72ae164fca6b9db127eaa9a9dda0d61316034f33a0a0d4eda41f02b01d" +checksum = "1e28d1d997f585e54aebc3f97d39e72338912123a67330d723fdbb564d646c9f" dependencies = [ "futures-core", "futures-task", @@ -111,15 +105,15 @@ dependencies = [ [[package]] name = "futures-io" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a44623e20b9681a318efdd71c299b6b222ed6f231972bfe2f224ebad6311f0c1" +checksum = "9e5c1b78ca4aae1ac06c48a526a655760685149f0d465d21f37abfe57ce075c6" [[package]] name = "futures-macro" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac" +checksum = "162ee34ebcb7c64a8abebc059ce0fee27c2262618d7b60ed8faf72fef13c3650" dependencies = [ "proc-macro2", "quote", @@ -128,21 +122,21 @@ dependencies = [ [[package]] name = "futures-sink" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9fb8e00e87438d937621c1c6269e53f536c14d3fbd6a042bb24879e57d474fb5" +checksum = "e575fab7d1e0dcb8d0c7bcf9a63ee213816ab51902e6d244a95819acacf1d4f7" [[package]] name = "futures-task" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38d84fa142264698cdce1a9f9172cf383a0c82de1bddcf3092901442c4097004" +checksum = "f90f7dce0722e95104fcb095585910c0977252f286e354b5e3bd38902cd99988" [[package]] name = "futures-util" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d6401deb83407ab3da39eba7e33987a73c3df0c82b4bb5813ee871c19c41d48" +checksum = "9fa08315bb612088cc391249efdc3bc77536f16c91f6cf495e6fbe85b20a4a81" dependencies = [ "futures-channel", "futures-core", @@ -158,58 +152,69 @@ dependencies = [ [[package]] name = "gimli" -version = "0.28.1" +version = "0.31.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4271d37baee1b8c7e4b708028c57d816cf9d2434acb33a549475f78c181f6253" +checksum = "07e28edb80900c19c28f1072f2e8aeca7fa06b23cd4169cefe1af5aa3260783f" [[package]] name = "heck" -version = "0.4.1" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" + +[[package]] +name = "io-uring" +version = "0.7.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" +checksum = "d93587f37623a1a17d94ef2bc9ada592f5465fe7732084ab7beefabe5c77c0c4" +dependencies = [ + "bitflags", + "cfg-if", + "libc", +] [[package]] name = "lazy_static" -version = "1.4.0" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" +checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" [[package]] name = "libc" -version = "0.2.154" +version = "0.2.174" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae743338b92ff9146ce83992f766a31066a91a8c84a45e0e9f21e7cf6de6d346" +checksum = "1171693293099992e19cddea4e8b849964e9846f4acee11b3948bcc337be8776" [[package]] name = "log" -version = "0.4.21" +version = "0.4.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90ed8c1e510134f979dbc4f070f87d4313098b704861a105fe34231c70a3901c" +checksum = "13dc2df351e3202783a1fe0d44375f7295ffb4049267b0f3018346dc122a1d94" [[package]] name = "memchr" -version = "2.7.2" +version = "2.7.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c8640c5d730cb13ebd907d8d04b52f55ac9a2eec55b440c8892f40d56c76c1d" +checksum = "32a282da65faaf38286cf3be983213fcf1d2e2a58700e808f83f4ea9a4804bc0" [[package]] name = "miniz_oxide" -version = "0.7.2" +version = "0.8.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d811f3e15f28568be3407c8e7fdb6514c1cda3cb30683f15b6a1a1dc4ea14a7" +checksum = "1fa76a2c86f704bdb222d66965fb3d63269ce38518b83cb0575fca855ebb6316" dependencies = [ - "adler", + "adler2", ] [[package]] name = "mio" -version = "0.8.11" +version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4a650543ca06a924e8b371db273b2756685faae30f8487da1b56505a8f78b0c" +checksum = "78bed444cc8a2160f01cbcf811ef18cac863ad68ae8ca62092e8db51d51c761c" dependencies = [ "libc", "wasi", - "windows-sys 0.48.0", + "windows-sys", ] [[package]] @@ -224,18 +229,18 @@ dependencies = [ [[package]] name = "object" -version = "0.32.2" +version = "0.36.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a6a622008b6e321afc04970976f62ee297fdbaa6f95318ca343e3eebb9648441" +checksum = "62948e14d923ea95ea2c7c86c71013138b66525b86bdc08d2dcc262bdb497b87" dependencies = [ "memchr", ] [[package]] name = "once_cell" -version = "1.19.0" +version = "1.21.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" +checksum = "42f5e15c9953c5e4ccceeb2e7382a716482c34515315f7b03532b8b4e8393d2d" [[package]] name = "overload" @@ -245,18 +250,18 @@ checksum = "b15813163c1d831bf4a13c3610c05c0d03b39feb07f7e09fa234dac9b15aaf39" [[package]] name = "pin-project" -version = "1.1.5" +version = "1.1.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6bf43b791c5b9e34c3d182969b4abb522f9343702850a2e57f460d00d09b4b3" +checksum = "677f1add503faace112b9f1373e43e9e054bfdd22ff1a63c1bc485eaec6a6a8a" dependencies = [ "pin-project-internal", ] [[package]] name = "pin-project-internal" -version = "1.1.5" +version = "1.1.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2f38a4412a78282e09a2cf38d195ea5420d15ba0602cb375210efbc877243965" +checksum = "6e918e4ff8c4549eb882f14b3a4bc8c8bc93de829416eacf579f1207a8fbf861" dependencies = [ "proc-macro2", "quote", @@ -265,9 +270,9 @@ dependencies = [ [[package]] name = "pin-project-lite" -version = "0.2.14" +version = "0.2.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bda66fc9667c18cb2758a2ac84d1167245054bcf85d5d1aaa6923f45801bdd02" +checksum = "3b3cff922bd51709b605d9ead9aa71031d81447142d828eb4a6eba76fe619f9b" [[package]] name = "pin-utils" @@ -277,27 +282,27 @@ checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" [[package]] name = "proc-macro2" -version = "1.0.82" +version = "1.0.95" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ad3d49ab951a01fbaafe34f2ec74122942fe18a3f9814c3268f1bb72042131b" +checksum = "02b3e5e68a3a1a02aad3ec490a98007cbc13c37cbe84a3cd7b8e406d76e7f778" dependencies = [ "unicode-ident", ] [[package]] name = "quote" -version = "1.0.36" +version = "1.0.40" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fa76aaf39101c457836aec0ce2316dbdc3ab723cdda1c6bd4e6ad4208acaca7" +checksum = "1885c039570dc00dcb4ff087a89e185fd56bae234ddc7f056a945bf36467248d" dependencies = [ "proc-macro2", ] [[package]] name = "rustc-demangle" -version = "0.1.24" +version = "0.1.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "719b953e2095829ee67db738b3bfa9fa368c94900df327b3f07fe6e794d2fe1f" +checksum = "56f7d92ca342cea22a06f2121d944b4fd82af56988c270852495420f961d4ace" [[package]] name = "sharded-slab" @@ -310,33 +315,30 @@ dependencies = [ [[package]] name = "slab" -version = "0.4.9" +version = "0.4.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f92a496fb766b417c996b9c5e57daf2f7ad3b0bebe1ccfca4856390e3d3bb67" -dependencies = [ - "autocfg", -] +checksum = "04dc19736151f35336d325007ac991178d504a119863a2fcb3758cdb5e52c50d" [[package]] name = "smallvec" -version = "1.13.2" +version = "1.15.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67" +checksum = "67b1b7a3b5fe4f1376887184045fcf45c69e92af734b7aaddc05fb777b6fbd03" [[package]] name = "snafu" -version = "0.8.2" +version = "0.8.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75976f4748ab44f6e5332102be424e7c2dc18daeaf7e725f2040c3ebb133512e" +checksum = "320b01e011bf8d5d7a4a4a4be966d9160968935849c83b918827f6a435e7f627" dependencies = [ "snafu-derive", ] [[package]] name = "snafu-derive" -version = "0.8.2" +version = "0.8.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4b19911debfb8c2fb1107bc6cb2d61868aaf53a988449213959bb1b5b1ed95f" +checksum = "1961e2ef424c1424204d3a5d6975f934f56b6d50ff5732382d84ebf460e147f7" dependencies = [ "heck", "proc-macro2", @@ -346,19 +348,19 @@ dependencies = [ [[package]] name = "socket2" -version = "0.5.7" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce305eb0b4296696835b71df73eb912e0f1ffd2556a501fcede6e0c50349191c" +checksum = "233504af464074f9d066d7b5416c5f9b894a5862a6506e306f7b816cdd6f1807" dependencies = [ "libc", - "windows-sys 0.52.0", + "windows-sys", ] [[package]] name = "syn" -version = "2.0.61" +version = "2.0.104" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c993ed8ccba56ae856363b1845da7266a7cb78e1d146c8a32d54b45a8b831fc9" +checksum = "17b6f705963418cdb9927482fa304bc562ece2fdd4f616084c50b7023b435a40" dependencies = [ "proc-macro2", "quote", @@ -367,34 +369,35 @@ dependencies = [ [[package]] name = "thread_local" -version = "1.1.8" +version = "1.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b9ef9bad013ada3808854ceac7b46812a6465ba368859a37e2100283d2d719c" +checksum = "f60246a4944f24f6e018aa17cdeffb7818b76356965d03b07d6a9886e8962185" dependencies = [ "cfg-if", - "once_cell", ] [[package]] name = "tokio" -version = "1.37.0" +version = "1.47.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1adbebffeca75fcfd058afa480fb6c0b81e165a0323f9c9d39c9697e37c46787" +checksum = "89e49afdadebb872d3145a5638b59eb0691ea23e46ca484037cfab3b76b95038" dependencies = [ "backtrace", + "io-uring", "libc", "mio", "pin-project-lite", + "slab", "socket2", "tokio-macros", - "windows-sys 0.48.0", + "windows-sys", ] [[package]] name = "tokio-macros" -version = "2.2.0" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b8a1e28f2deaa14e508979454cb3a223b10b938b45af148bc0986de36f1923b" +checksum = "6e06d43f1345a3bcd39f6a56dbb7dcab2ba47e68e8ac134855e7e2bdbaf8cab8" dependencies = [ "proc-macro2", "quote", @@ -418,9 +421,9 @@ dependencies = [ [[package]] name = "tracing" -version = "0.1.40" +version = "0.1.41" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3523ab5a71916ccf420eebdf5521fcef02141234bbc0b8a49f2fdc4544364ef" +checksum = "784e0ac535deb450455cbfa28a6f0df145ea1bb7ae51b821cf5e7927fdcfbdd0" dependencies = [ "pin-project-lite", "tracing-attributes", @@ -429,9 +432,9 @@ dependencies = [ [[package]] name = "tracing-attributes" -version = "0.1.27" +version = "0.1.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" +checksum = "81383ab64e72a7a8b8e13130c49e3dab29def6d0c7d76a03087b3cf71c5c6903" dependencies = [ "proc-macro2", "quote", @@ -440,9 +443,9 @@ dependencies = [ [[package]] name = "tracing-core" -version = "0.1.32" +version = "0.1.34" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c06d3da6113f116aaee68e4d601191614c9053067f9ab7f6edbcb161237daa54" +checksum = "b9d12581f227e93f094d3af2ae690a574abb8a2b9b7a96e7cfe9647b2b617678" dependencies = [ "once_cell", "valuable", @@ -461,9 +464,9 @@ dependencies = [ [[package]] name = "tracing-subscriber" -version = "0.3.18" +version = "0.3.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad0f048c97dbd9faa9b7df56362b8ebcaa52adb06b498c050d2f4e32f90a7a8b" +checksum = "e8189decb5ac0fa7bc8b96b7cb9b2701d60d48805aca84a238004d665fcc4008" dependencies = [ "nu-ansi-term", "sharded-slab", @@ -475,21 +478,21 @@ dependencies = [ [[package]] name = "unicode-ident" -version = "1.0.12" +version = "1.0.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" +checksum = "5a5f39404a5da50712a4c1eecf25e90dd62b613502b7e925fd4e4d19b5c96512" [[package]] name = "valuable" -version = "0.1.0" +version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "830b7e5d4d90034032940e4ace0d9a9a057e7a45cd94e6c007832e39edb82f6d" +checksum = "ba73ea9cf16a25df0c8caa16c51acb937d5712a8429db78a3ee29d5dcacd3a65" [[package]] name = "wasi" -version = "0.11.0+wasi-snapshot-preview1" +version = "0.11.1+wasi-snapshot-preview1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" +checksum = "ccf3ec651a847eb01de73ccad15eb7d99f80485de043efb2f370cd654f4ea44b" [[package]] name = "winapi" @@ -515,139 +518,73 @@ checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" [[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" +version = "0.59.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" +checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b" dependencies = [ - "windows-targets 0.52.5", + "windows-targets", ] [[package]] name = "windows-targets" -version = "0.48.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c" +checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" 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.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f0713a46559409d202e70e28227288446bf7841d3211583a4b53e3f6d96e7eb" -dependencies = [ - "windows_aarch64_gnullvm 0.52.5", - "windows_aarch64_msvc 0.52.5", - "windows_i686_gnu 0.52.5", + "windows_aarch64_gnullvm", + "windows_aarch64_msvc", + "windows_i686_gnu", "windows_i686_gnullvm", - "windows_i686_msvc 0.52.5", - "windows_x86_64_gnu 0.52.5", - "windows_x86_64_gnullvm 0.52.5", - "windows_x86_64_msvc 0.52.5", + "windows_i686_msvc", + "windows_x86_64_gnu", + "windows_x86_64_gnullvm", + "windows_x86_64_msvc", ] [[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.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7088eed71e8b8dda258ecc8bac5fb1153c5cffaf2578fc8ff5d61e23578d3263" - -[[package]] -name = "windows_aarch64_msvc" -version = "0.48.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" +checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" [[package]] name = "windows_aarch64_msvc" -version = "0.52.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9985fd1504e250c615ca5f281c3f7a6da76213ebd5ccc9561496568a2752afb6" - -[[package]] -name = "windows_i686_gnu" -version = "0.48.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" +checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" [[package]] name = "windows_i686_gnu" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "88ba073cf16d5372720ec942a8ccbf61626074c6d4dd2e745299726ce8b89670" +checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" [[package]] name = "windows_i686_gnullvm" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87f4261229030a858f36b459e748ae97545d6f1ec60e5e0d6a3d32e0dc232ee9" +checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" [[package]] name = "windows_i686_msvc" -version = "0.48.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" - -[[package]] -name = "windows_i686_msvc" -version = "0.52.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db3c2bf3d13d5b658be73463284eaf12830ac9a26a90c717b7f771dfe97487bf" - -[[package]] -name = "windows_x86_64_gnu" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" +checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" [[package]] name = "windows_x86_64_gnu" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4e4246f76bdeff09eb48875a0fd3e2af6aada79d409d33011886d3e1581517d9" +checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" [[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.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "852298e482cd67c356ddd9570386e2862b5673c85bd5f88df9ab6802b334c596" - -[[package]] -name = "windows_x86_64_msvc" -version = "0.48.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" +checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" [[package]] name = "windows_x86_64_msvc" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bec47e5bfd1bff0eeaf6d8b485cc1074891a197ab4225d504cb7a1ab88b02bf0" +checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" diff --git a/Cargo.toml b/Cargo.toml index e9d0b9a..addccad 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -21,17 +21,17 @@ edition = "2021" maintenance = { status = "experimental" } [dependencies] -async-trait = "0.1.80" +async-trait = "0.1.80" # TODO: Still needed? byteorder = "1.5.0" -futures = "0.3.30" -once_cell = "1.19.0" -pin-project = "1.1.5" -snafu = "0.8.2" -tokio = { version = "1.37.0", features = ["net", "rt", "time"] } -tracing = "0.1.40" +futures = "0.3.31" +once_cell = "1.21.3" # TODO: Still needed? +pin-project = "1.1.10" +snafu = "0.8.6" +tokio = { version = "1.47.1", features = ["net", "rt", "time"] } +tracing = "0.1.41" [dev-dependencies] -tokio = { version = "1.37.0", features = ["macros"] } -tracing-subscriber = "0.3.18" +tokio = { version = "1.47.1", features = ["macros"] } +tracing-subscriber = "0.3.19" [features] diff --git a/README.md b/README.md index d9d197c..6878c4a 100644 --- a/README.md +++ b/README.md @@ -192,6 +192,11 @@ assert_eq!( ); ``` +# Testing + +1. Start a Zookeeper instance, e.g. using `docker run -p 2181:2181 zookeeper` +2. Run `cargo test` + # Thank you This crate was originally developed by [Jon Gjengset (@jonhoo)](https://github.com/jonhoo/) as part of From c6c45528488fe1fa1f9434d5e88d0cece6acbe40 Mon Sep 17 00:00:00 2001 From: Sebastian Bernauer Date: Fri, 1 Aug 2025 13:31:05 +0200 Subject: [PATCH 2/6] Remove once_cell and async-trait --- Cargo.lock | 13 ------------- Cargo.toml | 2 -- src/proto/mod.rs | 7 +++---- src/types/acl.rs | 14 +++++++------- 4 files changed, 10 insertions(+), 26 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 9033d6b..4f42afe 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -17,17 +17,6 @@ version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "320119579fcad9c21884f5c4861d16174d0e06250625266f50fe6898340abefa" -[[package]] -name = "async-trait" -version = "0.1.88" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e539d3fca749fcee5236ab05e93a52867dd549cc157c8cb7f99595f3cedffdb5" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - [[package]] name = "backtrace" version = "0.3.75" @@ -408,10 +397,8 @@ dependencies = [ name = "tokio-zookeeper" version = "0.4.0" dependencies = [ - "async-trait", "byteorder", "futures", - "once_cell", "pin-project", "snafu", "tokio", diff --git a/Cargo.toml b/Cargo.toml index addccad..8283574 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -21,10 +21,8 @@ edition = "2021" maintenance = { status = "experimental" } [dependencies] -async-trait = "0.1.80" # TODO: Still needed? byteorder = "1.5.0" futures = "0.3.31" -once_cell = "1.21.3" # TODO: Still needed? pin-project = "1.1.10" snafu = "0.8.6" tokio = { version = "1.47.1", features = ["net", "rt", "time"] } diff --git a/src/proto/mod.rs b/src/proto/mod.rs index 9858ba3..b7fa9a6 100644 --- a/src/proto/mod.rs +++ b/src/proto/mod.rs @@ -1,4 +1,3 @@ -use async_trait::async_trait; use std::error::Error; use std::net::SocketAddr; use tokio::io::{AsyncRead, AsyncWrite}; @@ -16,14 +15,14 @@ pub(crate) use self::request::Request; pub(crate) use self::response::Response; pub(crate) use self::watch::Watch; -#[async_trait] pub trait ZooKeeperTransport: AsyncRead + AsyncWrite + Sized + Send + 'static { type Addr: Send + Clone; type ConnectError: Error + Send + Sync + 'static; - async fn connect(addr: Self::Addr) -> Result; + fn connect( + addr: Self::Addr, + ) -> impl std::future::Future> + std::marker::Send; } -#[async_trait] impl ZooKeeperTransport for tokio::net::TcpStream { type Addr = SocketAddr; type ConnectError = tokio::io::Error; diff --git a/src/types/acl.rs b/src/types/acl.rs index 2628f73..fe4cc8f 100644 --- a/src/types/acl.rs +++ b/src/types/acl.rs @@ -2,8 +2,7 @@ use std::fmt; use std::ops; use std::string::ToString; - -use once_cell::sync::Lazy; +use std::sync::LazyLock; /// Describes the ability of a user to perform a certain action. /// @@ -189,11 +188,12 @@ impl Acl { } } -static ACL_CREATOR_ALL: Lazy<[Acl; 1]> = Lazy::new(|| [Acl::new(Permission::ALL, "auth", "")]); -static ACL_OPEN_UNSAFE: Lazy<[Acl; 1]> = - Lazy::new(|| [Acl::new(Permission::ALL, "world", "anyone")]); -static ACL_READ_UNSAFE: Lazy<[Acl; 1]> = - Lazy::new(|| [Acl::new(Permission::READ, "world", "anyone")]); +static ACL_CREATOR_ALL: LazyLock<[Acl; 1]> = + LazyLock::new(|| [Acl::new(Permission::ALL, "auth", "")]); +static ACL_OPEN_UNSAFE: LazyLock<[Acl; 1]> = + LazyLock::new(|| [Acl::new(Permission::ALL, "world", "anyone")]); +static ACL_READ_UNSAFE: LazyLock<[Acl; 1]> = + LazyLock::new(|| [Acl::new(Permission::READ, "world", "anyone")]); impl fmt::Display for Acl { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { From 5f7691fed00fb93fca3f0577dd21fc3c84088386 Mon Sep 17 00:00:00 2001 From: Sebastian Bernauer Date: Fri, 1 Aug 2025 13:39:56 +0200 Subject: [PATCH 3/6] changelog --- CHANGELOG.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index d583f62..46a05bd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,14 @@ All notable changes to this project will be documented in this file. ## [Unreleased] +### Changed + +- Upgrade all dependencies to their latest version ([#53]). +- Remove the `once_cell` and `async-trait` dependencies, as they are now covered by `std` ([#53]). +- Added Zookeeper 3.9.3 to the list of versions we test against ([#53]). + +[#53]: https://github.com/stackabletech/tokio-zookeeper/pull/53 + ## [0.4.0] - 2024-05-08 ### Changed From 848bc48fc3408cd250af3e2ccdcfea18dcc4489a Mon Sep 17 00:00:00 2001 From: Sebastian Bernauer Date: Fri, 1 Aug 2025 13:40:20 +0200 Subject: [PATCH 4/6] changelog --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 46a05bd..74e6761 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,7 +6,7 @@ All notable changes to this project will be documented in this file. ### Changed -- Upgrade all dependencies to their latest version ([#53]). +- Upgrade all dependencies to their latest versions ([#53]). - Remove the `once_cell` and `async-trait` dependencies, as they are now covered by `std` ([#53]). - Added Zookeeper 3.9.3 to the list of versions we test against ([#53]). From a558646f2e5213b3ba8ced50a61e53dda2b2066d Mon Sep 17 00:00:00 2001 From: Sebastian Bernauer Date: Fri, 1 Aug 2025 13:48:16 +0200 Subject: [PATCH 5/6] Bump to 2024 edition --- Cargo.toml | 2 +- src/lib.rs | 18 ++++++++---------- src/proto/active_packetizer.rs | 13 +++++++------ src/proto/packetizer.rs | 13 ++++++++----- src/proto/watch.rs | 6 +----- src/transform.rs | 2 +- 6 files changed, 26 insertions(+), 28 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 8283574..6034d04 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -15,7 +15,7 @@ categories = ["api-bindings", "asynchronous", "network-programming"] license = "MIT/Apache-2.0" -edition = "2021" +edition = "2024" [badges] maintenance = { status = "experimental" } diff --git a/src/lib.rs b/src/lib.rs index f9ee61c..e28b54d 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -105,7 +105,8 @@ //! //! # #[tokio::main(flavor = "current_thread")] //! # async fn main() { -//! let (zk, default_watcher) = ZooKeeper::connect(&"127.0.0.1:2181".parse().unwrap()) +//! let connect_addr = "127.0.0.1:2181".parse().unwrap(); +//! let (zk, default_watcher) = ZooKeeper::connect(&connect_addr) //! .await //! .unwrap(); //! @@ -193,8 +194,8 @@ #![deny(missing_copy_implementations)] use error::Error; -use futures::{channel::oneshot, Stream}; -use snafu::{whatever as bail, ResultExt}; +use futures::{Stream, channel::oneshot}; +use snafu::{ResultExt, whatever as bail}; use std::borrow::Cow; use std::net::SocketAddr; use std::time; @@ -766,10 +767,8 @@ mod tests { init_tracing_subscriber(); let builder = ZooKeeperBuilder::default(); - let (zk, w) = builder - .connect(&"127.0.0.1:2181".parse().unwrap()) - .await - .unwrap(); + let connect_addr = "127.0.0.1:2181".parse().unwrap(); + let (zk, w) = builder.connect(&connect_addr).await.unwrap(); let (exists_w, stat) = zk.with_watcher().exists("/foo").await.unwrap(); assert_eq!(stat, None); let stat = zk.watch().exists("/foo").await.unwrap(); @@ -874,9 +873,8 @@ mod tests { #[tokio::test] async fn example() { - let (zk, default_watcher) = ZooKeeper::connect(&"127.0.0.1:2181".parse().unwrap()) - .await - .unwrap(); + let connect_addr = "127.0.0.1:2181".parse().unwrap(); + let (zk, default_watcher) = ZooKeeper::connect(&connect_addr).await.unwrap(); // let's first check if /example exists. the .watch() causes us to be notified // the next time the "exists" status of /example changes after the call. diff --git a/src/proto/active_packetizer.rs b/src/proto/active_packetizer.rs index dd6c982..c34978f 100644 --- a/src/proto/active_packetizer.rs +++ b/src/proto/active_packetizer.rs @@ -1,5 +1,5 @@ -use super::{request, watch::WatchType, Request, Response}; -use crate::{error::Error as DynError, WatchedEvent, WatchedEventType, ZkError}; +use super::{Request, Response, request, watch::WatchType}; +use crate::{WatchedEvent, WatchedEventType, ZkError, error::Error as DynError}; use byteorder::{BigEndian, ReadBytesExt, WriteBytesExt}; use futures::{ channel::{mpsc, oneshot}, @@ -194,10 +194,11 @@ where let mut wrote = false; while self.outlen() != 0 { let mut this = self.as_mut().project(); - let n = ready!(this - .stream - .as_mut() - .poll_write(cx, &this.outbox[*this.outstart..])?); + let n = ready!( + this.stream + .as_mut() + .poll_write(cx, &this.outbox[*this.outstart..])? + ); wrote = true; *this.outstart += n; if *this.outstart == this.outbox.len() { diff --git a/src/proto/packetizer.rs b/src/proto/packetizer.rs index 52efce3..6c922df 100644 --- a/src/proto/packetizer.rs +++ b/src/proto/packetizer.rs @@ -1,13 +1,14 @@ use super::{ - active_packetizer::ActivePacketizer, request, watch::WatchType, Request, Response, - ZooKeeperTransport, + Request, Response, ZooKeeperTransport, active_packetizer::ActivePacketizer, request, + watch::WatchType, }; -use crate::{error::Error, format_err, Watch, WatchedEvent, ZkError}; +use crate::{Watch, WatchedEvent, ZkError, error::Error, format_err}; use byteorder::{BigEndian, WriteBytesExt}; use futures::{ + FutureExt, StreamExt, TryFutureExt, channel::{mpsc, oneshot}, future::Either, - ready, FutureExt, StreamExt, TryFutureExt, + ready, }; use pin_project::pin_project; use snafu::ResultExt; @@ -79,6 +80,8 @@ where } } +// clippy suggests wrapping the `Connected` payload in a Box, but I was not able to achieve this +#[allow(clippy::large_enum_variant)] #[pin_project(project = PacketizerStateProj)] enum PacketizerState { Connected(#[pin] ActivePacketizer), @@ -102,7 +105,7 @@ where return ap .as_mut() .poll(cx, exiting, default_watcher) - .map(|res| res.whatever_context("active packetizer failed")) + .map(|res| res.whatever_context("active packetizer failed")); } PacketizerStateProj::Reconnecting(ref mut c) => ready!(c.as_mut().poll(cx)?), }; diff --git a/src/proto/watch.rs b/src/proto/watch.rs index 26afc06..18f059e 100644 --- a/src/proto/watch.rs +++ b/src/proto/watch.rs @@ -10,11 +10,7 @@ pub(crate) enum Watch { impl Watch { pub(crate) fn to_u8(&self) -> u8 { - if let Watch::None = *self { - 0 - } else { - 1 - } + if let Watch::None = *self { 0 } else { 1 } } } diff --git a/src/transform.rs b/src/transform.rs index d3c9f59..49b4769 100644 --- a/src/transform.rs +++ b/src/transform.rs @@ -1,9 +1,9 @@ use snafu::whatever as bail; use crate::{ + Acl, MultiResponse, Stat, error::{self, Error}, proto::{Request, Response, ZkError}, - Acl, MultiResponse, Stat, }; pub(crate) fn create( From 01ed59543a84cb8ca600d12c2c2522ac7b343f4c Mon Sep 17 00:00:00 2001 From: Sebastian Bernauer Date: Fri, 1 Aug 2025 13:48:47 +0200 Subject: [PATCH 6/6] changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 74e6761..8fbd7e4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,7 @@ All notable changes to this project will be documented in this file. - Upgrade all dependencies to their latest versions ([#53]). - Remove the `once_cell` and `async-trait` dependencies, as they are now covered by `std` ([#53]). +- Bump to Rust 2024 edition ([#53]). - Added Zookeeper 3.9.3 to the list of versions we test against ([#53]). [#53]: https://github.com/stackabletech/tokio-zookeeper/pull/53