From 56ffe5032fc5ad3f1501d3e1fdac05a2010d4650 Mon Sep 17 00:00:00 2001 From: Antoine Pultier <45740+fungiboletus@users.noreply.github.com> Date: Wed, 21 Aug 2024 15:33:48 +0200 Subject: [PATCH] =?UTF-8?q?feat:=20=F0=9F=9A=9A=20Refactoring=20of=20the?= =?UTF-8?q?=20parsers?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Cargo.lock | 1110 ++++++++++++++++--------- Cargo.toml | 18 +- src/datamodel/batch_builder.rs | 2 +- src/datamodel/mod.rs | 3 + src/datamodel/sensapp_labels.rs | 60 ++ src/datamodel/sensapp_vec.rs | 2 - src/datamodel/sensor.rs | 2 +- src/importers/csv.rs | 2 +- src/ingestors/http/influxdb.rs | 315 ++----- src/ingestors/http/prometheus.rs | 82 +- src/ingestors/mqtt/mqtt_client.rs | 4 +- src/ingestors/opcua/opcua_utils.rs | 5 +- src/parsing/geobuf/mod.rs | 32 + src/parsing/influx/mod.rs | 293 +++++++ src/parsing/influx/precision.rs | 50 ++ src/parsing/mod.rs | 29 + src/parsing/prometheus/mod.rs | 81 ++ src/parsing/senml/mod.rs | 87 ++ src/storage/bigquery/bigquery_crud.rs | 5 +- src/storage/duckdb/duckdb_crud.rs | 5 +- 20 files changed, 1404 insertions(+), 783 deletions(-) create mode 100644 src/datamodel/sensapp_labels.rs create mode 100644 src/parsing/geobuf/mod.rs create mode 100644 src/parsing/influx/mod.rs create mode 100644 src/parsing/influx/precision.rs create mode 100644 src/parsing/senml/mod.rs diff --git a/Cargo.lock b/Cargo.lock index b6c8487..dda6155 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -17,6 +17,12 @@ version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" +[[package]] +name = "adler2" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "512761e0bb2578dd7380c6baaa0f4ce03e84f95e960231d1dec8bf4d7d6e2627" + [[package]] name = "ahash" version = "0.7.8" @@ -89,9 +95,9 @@ dependencies = [ [[package]] name = "anstream" -version = "0.6.14" +version = "0.6.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "418c75fa768af9c03be99d17643f93f79bbba589895012a80e3452a19ddda15b" +checksum = "64e15c1ab1f89faffbf04a634d5e1962e9074f2741eef6d97f3c4e322426d526" dependencies = [ "anstyle", "anstyle-parse", @@ -104,33 +110,33 @@ dependencies = [ [[package]] name = "anstyle" -version = "1.0.7" +version = "1.0.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "038dfcf04a5feb68e9c60b21c9625a54c2c0616e79b72b0fd87075a056ae1d1b" +checksum = "1bec1de6f59aedf83baf9ff929c98f2ad654b97c9510f4e70cf6f661d49fd5b1" [[package]] name = "anstyle-parse" -version = "0.2.4" +version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c03a11a9034d92058ceb6ee011ce58af4a9bf61491aa7e1e59ecd24bd40d22d4" +checksum = "eb47de1e80c2b463c735db5b217a0ddc39d612e7ac9e2e96a5aed1f57616c1cb" dependencies = [ "utf8parse", ] [[package]] name = "anstyle-query" -version = "1.1.0" +version = "1.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad186efb764318d35165f1758e7dcef3b10628e26d41a44bc5550652e6804391" +checksum = "6d36fc52c7f6c869915e99412912f22093507da8d9e942ceaf66fe4b7c14422a" dependencies = [ "windows-sys 0.52.0", ] [[package]] name = "anstyle-wincon" -version = "3.0.3" +version = "3.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61a38449feb7068f52bb06c12759005cf459ee52bb4adc1d5a7c4322d716fb19" +checksum = "5bf74e1b6e971609db8ca7a9ce79fd5768ab6ae46441c572e46cf596f59e57f8" dependencies = [ "anstyle", "windows-sys 0.52.0", @@ -171,15 +177,15 @@ checksum = "bf7d0a018de4f6aa429b9d33d69edf69072b1c5b1cb8d3e4a5f7ef898fc3eb76" [[package]] name = "arrayref" -version = "0.3.7" +version = "0.3.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6b4930d2cb77ce62f89ee5d5289b4ac049559b1c45539271f5ed4fdc7db34545" +checksum = "9d151e35f61089500b617991b791fc8bfd237ae50cd5950803758a179b41e67a" [[package]] name = "arrayvec" -version = "0.7.4" +version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96d30a06541fbafbc7f82ed10c06164cfbd2c401138f6addd8404629c4b16711" +checksum = "7c02d123df017efcdfbd739ef81735b36c5ba83ec3c59c80a9d7ecc718f92e50" [[package]] name = "arrow" @@ -349,7 +355,7 @@ version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "20cd0e2e25ea8e5f7e9df04578dc6cf5c83577fd09b1a46aaf5c85e1c33f2a7e" dependencies = [ - "event-listener 5.3.1", + "event-listener", "event-listener-strategy", "futures-core", "pin-project-lite", @@ -357,9 +363,9 @@ dependencies = [ [[package]] name = "async-compression" -version = "0.4.11" +version = "0.4.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cd066d0b4ef8ecb03a55319dc13aa6910616d0f44008a045bb1835af830abff5" +checksum = "fec134f64e2bc57411226dfc4e52dec859ddfc7e711fc5e07b612584f000e4aa" dependencies = [ "brotli", "flate2", @@ -390,7 +396,7 @@ checksum = "16e62a023e7c117e27523144c5d2459f4397fcc3cab0085af8e2224f643a0193" dependencies = [ "proc-macro2", "quote", - "syn 2.0.68", + "syn 2.0.75", ] [[package]] @@ -401,7 +407,7 @@ checksum = "6e0c28dcc82d7c8ead5cb13beb15405b57b8546e93215673ff8ca0349a028107" dependencies = [ "proc-macro2", "quote", - "syn 2.0.68", + "syn 2.0.75", ] [[package]] @@ -454,6 +460,17 @@ version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0" +[[package]] +name = "atty" +version = "0.2.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8" +dependencies = [ + "hermit-abi 0.1.19", + "libc", + "winapi", +] + [[package]] name = "autocfg" version = "1.3.0" @@ -462,9 +479,9 @@ checksum = "0c4b4d0bd25bd0b74681c0ad21497610ce1b7c91b1022cd21c80c6fbdd9476b0" [[package]] name = "aws-lc-rs" -version = "1.7.3" +version = "1.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf7d844e282b4b56750b2d4e893b2205581ded8709fddd2b6aa5418c150ca877" +checksum = "4ae74d9bd0a7530e8afd1770739ad34b36838829d6ad61818f9230f683f5ad77" dependencies = [ "aws-lc-sys", "mirai-annotations", @@ -474,9 +491,9 @@ dependencies = [ [[package]] name = "aws-lc-sys" -version = "0.18.0" +version = "0.20.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3a2c29203f6bf296d01141cc8bb9dbd5ecd4c27843f2ee0767bcd5985a927da" +checksum = "0f0e249228c6ad2d240c2dc94b714d711629d52bad946075d8e9b2f5391f0703" dependencies = [ "bindgen", "cc", @@ -553,7 +570,7 @@ dependencies = [ "heck 0.4.1", "proc-macro2", "quote", - "syn 2.0.68", + "syn 2.0.75", ] [[package]] @@ -566,7 +583,7 @@ dependencies = [ "cc", "cfg-if", "libc", - "miniz_oxide", + "miniz_oxide 0.7.4", "object", "rustc-demangle", ] @@ -631,9 +648,9 @@ dependencies = [ "proc-macro2", "quote", "regex", - "rustc-hash", + "rustc-hash 1.1.0", "shlex", - "syn 2.0.68", + "syn 2.0.75", "which", ] @@ -666,9 +683,9 @@ dependencies = [ [[package]] name = "blake3" -version = "1.5.1" +version = "1.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "30cca6d3674597c30ddf2c587bf8d9d65c9a84d2326d941cc79c9842dfe0ef52" +checksum = "d82033247fd8e890df8f740e407ad4d038debb9eb1f40533fffb32e7d17dc6f7" dependencies = [ "arrayref", "arrayvec", @@ -706,7 +723,7 @@ dependencies = [ "proc-macro-crate", "proc-macro2", "quote", - "syn 2.0.68", + "syn 2.0.75", "syn_derive", ] @@ -772,22 +789,22 @@ dependencies = [ [[package]] name = "bytemuck" -version = "1.16.1" +version = "1.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b236fc92302c97ed75b38da1f4917b5cdda4984745740f153a5d3059e48d725e" +checksum = "6fd4c6dcc3b0aea2f5c0b4b82c2b15fe39ddbc76041a310848f4706edf76bb31" dependencies = [ "bytemuck_derive", ] [[package]] name = "bytemuck_derive" -version = "1.7.0" +version = "1.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ee891b04274a59bd38b412188e24b849617b2e45a0fd8d057deb63e7403761b" +checksum = "0cc8b54b395f2fcfbb3d90c47b01c7f444d94d05bdeb775811dec868ac3bbc26" dependencies = [ "proc-macro2", "quote", - "syn 2.0.68", + "syn 2.0.75", ] [[package]] @@ -798,9 +815,9 @@ checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" [[package]] name = "bytes" -version = "1.6.0" +version = "1.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "514de17de45fdb8dc022b1a7975556c53c86f9f0aa5f534b98977b171857c2c9" +checksum = "8318a53db07bb3f8dca91a600466bdb3f2eaadeedfdbcf02e1accbad9271ba50" [[package]] name = "cached" @@ -829,7 +846,7 @@ dependencies = [ "darling", "proc-macro2", "quote", - "syn 2.0.68", + "syn 2.0.75", ] [[package]] @@ -846,13 +863,13 @@ checksum = "37b2a672a2cb129a2e41c10b1224bb368f9f37a2b16b612598138befd7b37eb5" [[package]] name = "cc" -version = "1.0.100" +version = "1.1.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c891175c3fb232128f48de6590095e59198bbeb8620c310be349bfc3afd12c7b" +checksum = "72db2f7947ecee9b03b510377e8bb9077afa27176fdbff55c51027e976fdcc48" dependencies = [ "jobserver", "libc", - "once_cell", + "shlex", ] [[package]] @@ -888,7 +905,7 @@ dependencies = [ "num-traits", "serde", "wasm-bindgen", - "windows-targets 0.52.5", + "windows-targets 0.52.6", ] [[package]] @@ -926,43 +943,82 @@ dependencies = [ [[package]] name = "clap" -version = "4.5.7" +version = "3.2.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5db83dced34638ad474f39f250d7fea9598bdd239eaced1bdf45d597da0f433f" +checksum = "4ea181bf566f71cb9a5d17a59e1871af638180a18fb0035c92ae62b705207123" +dependencies = [ + "atty", + "bitflags 1.3.2", + "clap_derive 3.2.25", + "clap_lex 0.2.4", + "indexmap 1.9.3", + "once_cell", + "strsim 0.10.0", + "termcolor", + "textwrap", +] + +[[package]] +name = "clap" +version = "4.5.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed6719fffa43d0d87e5fd8caeab59be1554fb028cd30edc88fc4369b17971019" dependencies = [ "clap_builder", - "clap_derive", + "clap_derive 4.5.13", ] [[package]] name = "clap_builder" -version = "4.5.7" +version = "4.5.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f7e204572485eb3fbf28f871612191521df159bc3e15a9f5064c66dba3a8c05f" +checksum = "216aec2b177652e3846684cbfe25c9964d18ec45234f0f5da5157b207ed1aab6" dependencies = [ "anstream", "anstyle", - "clap_lex", - "strsim", + "clap_lex 0.7.2", + "strsim 0.11.1", ] [[package]] name = "clap_derive" -version = "4.5.5" +version = "3.2.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c780290ccf4fb26629baa7a1081e68ced113f1d3ec302fa5948f1c381ebf06c6" +checksum = "ae6371b8bdc8b7d3959e9cf7b22d4435ef3e79e138688421ec654acf8c81b008" +dependencies = [ + "heck 0.4.1", + "proc-macro-error", + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "clap_derive" +version = "4.5.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "501d359d5f3dcaf6ecdeee48833ae73ec6e42723a1e52419c79abf9507eec0a0" dependencies = [ "heck 0.5.0", "proc-macro2", "quote", - "syn 2.0.68", + "syn 2.0.75", ] [[package]] name = "clap_lex" -version = "0.7.1" +version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4b82cf0babdbd58558212896d1a4272303a57bdb245c2bf1147185fb45640e70" +checksum = "2850f2f5a82cbf437dd5af4d49848fbdfc27c157c3d010345776f952765261c5" +dependencies = [ + "os_str_bytes", +] + +[[package]] +name = "clap_lex" +version = "0.7.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1462739cb27611015575c0c11df5df7601141071f07518d56fcc1be504cbec97" [[package]] name = "clru" @@ -972,18 +1028,18 @@ checksum = "cbd0f76e066e64fdc5631e3bb46381254deab9ef1158292f27c8c57e3bf3fe59" [[package]] name = "cmake" -version = "0.1.50" +version = "0.1.51" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a31c789563b815f77f4250caee12365734369f942439b7defd71e18a48197130" +checksum = "fb1e43aa7fd152b1f968787f7dbcdeb306d1867ff373c69955211876c053f91a" dependencies = [ "cc", ] [[package]] name = "colorchoice" -version = "1.0.1" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b6a852b24ab71dffc585bcb46eaf7959d175cb865a7152e35b348d1b2960422" +checksum = "d3fd119d74b830634cea2a0f58bbd0d54540518a14397557951e79340abc28c0" [[package]] name = "comfy-table" @@ -1022,7 +1078,7 @@ dependencies = [ "rust-ini", "serde", "serde_json", - "toml 0.8.14", + "toml 0.8.19", "yaml-rust", ] @@ -1104,15 +1160,15 @@ dependencies = [ [[package]] name = "core-foundation-sys" -version = "0.8.6" +version = "0.8.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "06ea2b9bc92be3c2baa9334a323ebca2d6f074ff852cd1d7b11064035cd3868f" +checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b" [[package]] name = "cpufeatures" -version = "0.2.12" +version = "0.2.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53fe5e26ff1b7aef8bca9c6080520cfb8d9333c7568e1829cef191a9723e5504" +checksum = "51e852e6dc9a5bed1fae92dd2375037bf2b768725bf3be87811edee3249d09ad" dependencies = [ "libc", ] @@ -1247,9 +1303,9 @@ dependencies = [ [[package]] name = "darling" -version = "0.20.9" +version = "0.20.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "83b2eb4d90d12bdda5ed17de686c2acb4c57914f8f921b8da7e112b5a36f3fe1" +checksum = "6f63b86c8a8826a49b8c21f08a2d07338eec8d900540f8630dc76284be802989" dependencies = [ "darling_core", "darling_macro", @@ -1257,27 +1313,27 @@ dependencies = [ [[package]] name = "darling_core" -version = "0.20.9" +version = "0.20.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "622687fe0bac72a04e5599029151f5796111b90f1baaa9b544d807a5e31cd120" +checksum = "95133861a8032aaea082871032f5815eb9e98cef03fa916ab4500513994df9e5" dependencies = [ "fnv", "ident_case", "proc-macro2", "quote", - "strsim", - "syn 2.0.68", + "strsim 0.11.1", + "syn 2.0.75", ] [[package]] name = "darling_macro" -version = "0.20.9" +version = "0.20.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "733cabb43482b1a1b53eee8583c2b9e8684d592215ea83efd305dd31bc2f0178" +checksum = "d336a2a514f6ccccaa3e09b02d41d35330c07ddf03a62165fcec10bb561c7806" dependencies = [ "darling_core", "quote", - "syn 2.0.68", + "syn 2.0.75", ] [[package]] @@ -1371,7 +1427,7 @@ dependencies = [ "cast", "fallible-iterator", "fallible-streaming-iterator", - "hashlink", + "hashlink 0.8.4", "libduckdb-sys", "memchr", "num-integer", @@ -1382,9 +1438,9 @@ dependencies = [ [[package]] name = "dunce" -version = "1.0.4" +version = "1.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56ce8c6da7551ec6c462cbaf3bfbc75131ebbfa1c944aeaa9dab51ca1c5f0c3b" +checksum = "92773504d58c093f6de2459af4af33faa518c13451eb8f2b5698ed3d36e7c813" [[package]] name = "dyn-clone" @@ -1404,9 +1460,9 @@ dependencies = [ [[package]] name = "either" -version = "1.12.0" +version = "1.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3dca9240753cf90908d7e4aac30f630662b02aebaa1b58a3cadabdb23385b58b" +checksum = "60b1af1c220855b6ceac025d3f6ecdd2b7c4894bfe9cd9bda4fbb4bc7c0d4cf0" dependencies = [ "serde", ] @@ -1429,7 +1485,7 @@ dependencies = [ "once_cell", "proc-macro2", "quote", - "syn 2.0.68", + "syn 2.0.75", ] [[package]] @@ -1478,12 +1534,6 @@ version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b90ca2580b73ab6a1f724b76ca11ab632df820fd6040c336200d2c1df7b3c82c" -[[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.3.1" @@ -1501,7 +1551,7 @@ version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0f214dc438f977e6d4e3500aaa277f5ad94ca83fbbd9b1a15713ce2344ccc5a1" dependencies = [ - "event-listener 5.3.1", + "event-listener", "pin-project-lite", ] @@ -1531,14 +1581,14 @@ checksum = "9fc0510504f03c51ada170672ac806f1f105a88aa97a5281117e1ddc3368e51a" [[package]] name = "filetime" -version = "0.2.23" +version = "0.2.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ee447700ac8aa0b2f2bd7bc4462ad686ba06baa6727ac149a2d6277f0d240fd" +checksum = "bf401df4a4e3872c4fe8151134cf483738e74b67fc934d6532c882b3d24a4550" dependencies = [ "cfg-if", "libc", - "redox_syscall 0.4.1", - "windows-sys 0.52.0", + "libredox", + "windows-sys 0.59.0", ] [[package]] @@ -1561,12 +1611,12 @@ checksum = "0ce7134b9999ecaf8bcd65542e436736ef32ddca1b3e06094cb6ec5755203b80" [[package]] name = "flate2" -version = "1.0.30" +version = "1.0.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f54427cfd1c7829e2a139fcefea601bf088ebca651d2bf53ebc600eac295dae" +checksum = "9c0596c1eac1f9e04ed902702e9878208b336edc9d6fddc8a48387349bab3666" dependencies = [ "crc32fast", - "miniz_oxide", + "miniz_oxide 0.8.0", ] [[package]] @@ -1607,12 +1657,6 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" -[[package]] -name = "foreign_vec" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee1b05cbd864bcaecbd3455d6d967862d446e4ebfc3c2e5e5b9841e53cba6673" - [[package]] name = "form_urlencoded" version = "1.2.1" @@ -1714,7 +1758,7 @@ checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac" dependencies = [ "proc-macro2", "quote", - "syn 2.0.68", + "syn 2.0.75", ] [[package]] @@ -1814,6 +1858,18 @@ dependencies = [ "serde", ] +[[package]] +name = "geobuf" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a4fbd14b568b55eace7b92c805d8433a23056cea557aac9ecd8e570c3ac73d10" +dependencies = [ + "clap 3.2.25", + "protobuf", + "protobuf-codegen", + "serde_json", +] + [[package]] name = "geographiclib-rs" version = "0.2.4" @@ -1860,9 +1916,9 @@ checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b" [[package]] name = "h2" -version = "0.4.5" +version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa82e28a107a8cc405f0839610bdc9b15f1e25ec7d696aa5cf173edbcb1486ab" +checksum = "524e8ac6999421f49a846c2d4411f337e53497d8ec55d67753beffa43c5d9205" dependencies = [ "atomic-waker", "bytes", @@ -1870,7 +1926,7 @@ dependencies = [ "futures-core", "futures-sink", "http", - "indexmap 2.2.6", + "indexmap 2.4.0", "slab", "tokio", "tokio-util", @@ -1933,6 +1989,15 @@ dependencies = [ "hashbrown 0.14.5", ] +[[package]] +name = "hashlink" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6ba4ff7128dee98c7dc9794b6a411377e1404dba1c97deb8d1a55297bd25d8af" +dependencies = [ + "hashbrown 0.14.5", +] + [[package]] name = "hdrhistogram" version = "7.5.4" @@ -1967,9 +2032,6 @@ name = "heck" version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" -dependencies = [ - "unicode-segmentation", -] [[package]] name = "heck" @@ -1977,12 +2039,27 @@ version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" +[[package]] +name = "hermit-abi" +version = "0.1.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "62b467343b94ba476dcb2500d242dadbb39557df889310ac77c5d99100aaac33" +dependencies = [ + "libc", +] + [[package]] name = "hermit-abi" version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d231dfb89cfffdbc30e7fc41579ed6066ad03abda9e567ccafae602b97ec5024" +[[package]] +name = "hermit-abi" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fbf6a919d6cf397374f7dfeeea91d974c7c0a7221d0d0f4f20d859d329e53fcc" + [[package]] name = "hex" version = "0.4.3" @@ -2039,7 +2116,7 @@ checksum = "f9c7c7c8ac16c798734b8a24560c1362120597c40d5e1459f09498f8f6c8f2ba" dependencies = [ "cfg-if", "libc", - "windows", + "windows 0.52.0", ] [[package]] @@ -2055,9 +2132,9 @@ dependencies = [ [[package]] name = "http-body" -version = "1.0.0" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1cac85db508abc24a2e48553ba12a996e87244a0395ce011e62b37158745d643" +checksum = "1efedce1fb8e6913f23e0c92de8e62cd5b772a67e7b3946df930a62566c93184" dependencies = [ "bytes", "http", @@ -2102,12 +2179,12 @@ checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4" [[package]] name = "hybridmap" -version = "0.1.1" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5fba4f4d999c20136313e02d43a1611fedca5854e04ccefdbb24dfa915224004" +checksum = "5b28a248730c6c65e6201640a3e37806454291985af7834a042e86ee2c187f71" dependencies = [ "rand", - "smallvec 2.0.0-alpha.6", + "smallvec 2.0.0-alpha.7", ] [[package]] @@ -2141,7 +2218,7 @@ dependencies = [ "http", "hyper", "hyper-util", - "rustls 0.23.10", + "rustls 0.23.12", "rustls-native-certs", "rustls-pki-types", "tokio", @@ -2210,7 +2287,7 @@ dependencies = [ "iana-time-zone-haiku", "js-sys", "wasm-bindgen", - "windows-core", + "windows-core 0.52.0", ] [[package]] @@ -2261,9 +2338,9 @@ dependencies = [ [[package]] name = "indexmap" -version = "2.2.6" +version = "2.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "168fb715dda47215e360912c096649d23d58bf392ac62f73919e831745e40f26" +checksum = "93ead53efc7ea8ed3cfb0c79fc8023fbb782a5432b52830b6518941cebe6505c" dependencies = [ "equivalent", "hashbrown 0.14.5", @@ -2301,20 +2378,20 @@ dependencies = [ [[package]] name = "is-terminal" -version = "0.4.12" +version = "0.4.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f23ff5ef2b80d608d61efee834934d862cd92461afc0560dedf493e4c033738b" +checksum = "261f68e344040fbd0edea105bef17c66edf46f984ddb1115b775ce31be948f4b" dependencies = [ - "hermit-abi", + "hermit-abi 0.4.0", "libc", "windows-sys 0.52.0", ] [[package]] name = "is_terminal_polyfill" -version = "1.70.0" +version = "1.70.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8478577c03552c21db0e2724ffb8986a5ce7af88107e6be5d2ee6e158c12800" +checksum = "7943c866cc5cd64cbc25b2e01621d07fa8eb2a1a23160ee81ce38704e97b8ecf" [[package]] name = "iso8601" @@ -2343,6 +2420,15 @@ dependencies = [ "either", ] +[[package]] +name = "itertools" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "413ee7dfc52ee1a4949ceeb7dbc8a33f2d6c088194d9f922fb8318faf1f01186" +dependencies = [ + "either", +] + [[package]] name = "itoa" version = "1.0.11" @@ -2357,18 +2443,18 @@ checksum = "9028f49264629065d057f340a86acb84867925865f73bbf8d47b4d149a7e88b8" [[package]] name = "jobserver" -version = "0.1.31" +version = "0.1.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2b099aaa34a9751c5bf0878add70444e1ed2dd73f347be99003d4577277de6e" +checksum = "48d1dbcbbeb6a7fec7e059840aa538bd62aaccf972c7346c4d9d2059312853d0" dependencies = [ "libc", ] [[package]] name = "js-sys" -version = "0.3.69" +version = "0.3.70" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "29c15563dc2726973df627357ce0c9ddddbea194836909d655df6a75d2cf296d" +checksum = "1868808506b929d7b0cfa8f75951347aa71bb21144b7791bae35d9bccfcfe37a" dependencies = [ "wasm-bindgen", ] @@ -2465,9 +2551,9 @@ dependencies = [ [[package]] name = "libc" -version = "0.2.155" +version = "0.2.158" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97b3888a4aecf77e811145cadf6eef5901f4782c53886191b2f693f24761847c" +checksum = "d8adc4bb1803a324070e64a98ae98f38934d91957a99cfb3a43dcbc01bc56439" [[package]] name = "libduckdb-sys" @@ -2487,12 +2573,12 @@ dependencies = [ [[package]] name = "libloading" -version = "0.8.4" +version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e310b3a6b5907f99202fcdb4960ff45b93735d7c7d96b760fcff8db2dc0e103d" +checksum = "4979f22fdb869068da03c9f7528f8297c6fd2606bc3a4affe42e6a823fdb8da4" dependencies = [ "cfg-if", - "windows-targets 0.52.5", + "windows-targets 0.52.6", ] [[package]] @@ -2501,11 +2587,22 @@ version = "0.2.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4ec2a862134d2a7d32d7983ddcdd1c4923530833c9f2ea1a44fc5fa473989058" +[[package]] +name = "libredox" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c0ff37bd590ca25063e35af745c343cb7a0271906fb7b37e4813e8f79f00268d" +dependencies = [ + "bitflags 2.6.0", + "libc", + "redox_syscall 0.5.3", +] + [[package]] name = "libsqlite3-sys" -version = "0.27.0" +version = "0.28.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf4e226dcd58b4be396f7bd3c20da8fdee2911400705297ba7d2d7cc2c30f716" +checksum = "0c10584274047cb335c23d3e61bcef8e323adae7c5c8c760540f73610177fc3f" dependencies = [ "cc", "pkg-config", @@ -2542,9 +2639,9 @@ checksum = "a7a70ba024b9dc04c27ea2f0c0548feb474ec5c54bba33a7f72f873a39d07b24" [[package]] name = "lz4" -version = "1.25.0" +version = "1.26.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d6eab492fe7f8651add23237ea56dbf11b3c4ff762ab83d40a47f11433421f91" +checksum = "958b4caa893816eea05507c20cfe47574a43d9a697138a7872990bba8a0ece68" dependencies = [ "libc", "lz4-sys", @@ -2552,9 +2649,9 @@ dependencies = [ [[package]] name = "lz4-sys" -version = "1.9.5" +version = "1.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e9764018d143cc854c9f17f0b907de70f14393b1f502da6375dce70f00514eb3" +checksum = "109de74d5d2353660401699a4174a4ff23fcc649caf553df71933c7fb45ad868" dependencies = [ "cc", "libc", @@ -2614,9 +2711,9 @@ checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" [[package]] name = "mime_guess" -version = "2.0.4" +version = "2.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4192263c238a5f0d0c6bfd21f336a313a4ce1c450542449ca191bb657b4642ef" +checksum = "f7c44f8e672c00fe5308fa235f821cb4198414e1c77935c1ab6948d3fd78550e" dependencies = [ "mime", "unicase", @@ -2637,13 +2734,22 @@ dependencies = [ "adler", ] +[[package]] +name = "miniz_oxide" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e2d80299ef12ff69b16a84bb182e3b9df68b5a91574d3d4fa6e41b65deec4df1" +dependencies = [ + "adler2", +] + [[package]] name = "mio" version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "80e04d1dcff3aae0704555fe5fee3bcfaf3d1fdf8a7e521d5b9d2b42acb52cec" dependencies = [ - "hermit-abi", + "hermit-abi 0.3.9", "libc", "wasi", "windows-sys 0.52.0", @@ -2771,9 +2877,9 @@ dependencies = [ [[package]] name = "num-bigint" -version = "0.4.5" +version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c165a9ab64cf766f73521c0dd2cfdff64f488b8f0b3e621face3462d3db536d7" +checksum = "a5e44f723f1133c9deac646763579fdb3ac745e418f2a7af9cd0c431da1f20b9" dependencies = [ "num-integer", "num-traits", @@ -2863,9 +2969,9 @@ dependencies = [ [[package]] name = "object" -version = "0.36.0" +version = "0.36.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "576dfe1fc8f9df304abb159d767a29d0476f7750fbf8aa7ad07816004a207434" +checksum = "27b64972346851a39438c60b341ebc01bba47464ae329e55cf343eb93964efd9" dependencies = [ "memchr", ] @@ -2911,9 +3017,9 @@ dependencies = [ [[package]] name = "openssl" -version = "0.10.64" +version = "0.10.66" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95a0481286a310808298130d22dd1fef0fa571e05a8f44ec801801e84b216b1f" +checksum = "9529f4786b70a3e8c61e11179af17ab6188ad8d0ded78c5529441ed39d4bd9c1" dependencies = [ "bitflags 2.6.0", "cfg-if", @@ -2932,7 +3038,7 @@ checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.68", + "syn 2.0.75", ] [[package]] @@ -2943,9 +3049,9 @@ checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" [[package]] name = "openssl-sys" -version = "0.9.102" +version = "0.9.103" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c597637d56fbc83893a35eb0dd04b2b8e7a50c91e64e9493e398b5df4fb45fa2" +checksum = "7f9e8deee91df40a943c71b917e5874b951d32a802526c85721ce3b776c929d6" dependencies = [ "cc", "libc", @@ -2974,6 +3080,12 @@ dependencies = [ "windows-sys 0.52.0", ] +[[package]] +name = "os_str_bytes" +version = "6.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e2355d85b9a3786f481747ced0e0ff2ba35213a1f9bd406ed906554d7af805a1" + [[package]] name = "overload" version = "0.1.1" @@ -3004,9 +3116,9 @@ checksum = "1e401f977ab385c9e4e3ab30627d6f26d00e2c73eef317493c4ec6d468726cf8" dependencies = [ "cfg-if", "libc", - "redox_syscall 0.5.2", + "redox_syscall 0.5.3", "smallvec 1.13.2", - "windows-targets 0.52.5", + "windows-targets 0.52.6", ] [[package]] @@ -3059,9 +3171,9 @@ checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" [[package]] name = "pest" -version = "2.7.10" +version = "2.7.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "560131c633294438da9f7c4b08189194b20946c8274c6b9e38881a7874dc8ee8" +checksum = "cd53dff83f26735fdc1ca837098ccf133605d794cdae66acfc2bfac3ec809d95" dependencies = [ "memchr", "thiserror", @@ -3070,9 +3182,9 @@ dependencies = [ [[package]] name = "pest_derive" -version = "2.7.10" +version = "2.7.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26293c9193fbca7b1a3bf9b79dc1e388e927e6cacaa78b4a3ab705a1d3d41459" +checksum = "2a548d2beca6773b1c244554d36fcf8548a8a58e74156968211567250e48e49a" dependencies = [ "pest", "pest_generator", @@ -3080,22 +3192,22 @@ dependencies = [ [[package]] name = "pest_generator" -version = "2.7.10" +version = "2.7.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3ec22af7d3fb470a85dd2ca96b7c577a1eb4ef6f1683a9fe9a8c16e136c04687" +checksum = "3c93a82e8d145725dcbaf44e5ea887c8a869efdcc28706df2d08c69e17077183" dependencies = [ "pest", "pest_meta", "proc-macro2", "quote", - "syn 2.0.68", + "syn 2.0.75", ] [[package]] name = "pest_meta" -version = "2.7.10" +version = "2.7.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d7a240022f37c361ec1878d646fc5b7d7c4d28d5946e1a80ad5a7a4f4ca0bdcd" +checksum = "a941429fea7e08bedec25e4f6785b6ffaacc6b755da98df5ef3e7dcf4a124c4f" dependencies = [ "once_cell", "pest", @@ -3109,7 +3221,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b4c5cc86750666a3ed20bdaf5ca2a0344f9c67674cae0515bec2da16fbaa47db" dependencies = [ "fixedbitset", - "indexmap 2.2.6", + "indexmap 2.4.0", ] [[package]] @@ -3177,7 +3289,7 @@ checksum = "2f38a4412a78282e09a2cf38d195ea5420d15ba0602cb375210efbc877243965" dependencies = [ "proc-macro2", "quote", - "syn 2.0.68", + "syn 2.0.75", ] [[package]] @@ -3230,9 +3342,9 @@ dependencies = [ [[package]] name = "polars" -version = "0.41.2" +version = "0.42.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce49e10a756f68eb99c102c6b2a0cbc0c583a0fa7263536ad0913d94be878d2d" +checksum = "ad002eb9c541b4f7e0c7c759cefe884a0350e15d241231ac4be31c5568c15070" dependencies = [ "getrandom", "polars-arrow", @@ -3250,9 +3362,9 @@ dependencies = [ [[package]] name = "polars-arrow" -version = "0.41.2" +version = "0.42.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b436f83f62e864f0d91871e26528f2c5552c7cf07c8d77547f1b8e3fde22bd27" +checksum = "32d19c6db79cb6a3c55af3b5a3976276edaab64cbf7f69b392617c2af30d7742" dependencies = [ "ahash 0.8.11", "atoi", @@ -3264,7 +3376,6 @@ dependencies = [ "either", "ethnum", "fast-float", - "foreign_vec", "getrandom", "hashbrown 0.14.5", "itoa", @@ -3272,6 +3383,7 @@ dependencies = [ "lz4", "multiversion", "num-traits", + "parking_lot", "polars-arrow-format", "polars-error", "polars-utils", @@ -3295,9 +3407,9 @@ dependencies = [ [[package]] name = "polars-compute" -version = "0.41.2" +version = "0.42.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f6758f834f07e622a2f859bebb542b2b7f8879b8704dbb2b2bbab460ddcdca4b" +checksum = "30194a5ff325f61d6fcb62dc215c9210f308fc4fc85a493ef777dbcd938cba24" dependencies = [ "bytemuck", "either", @@ -3311,9 +3423,9 @@ dependencies = [ [[package]] name = "polars-core" -version = "0.41.2" +version = "0.42.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ed262e9bdda15a12a9bfcfc9200bec5253335633dbd86cf5b94fda0194244b3" +checksum = "2ba2a3b736d55b92a12889672d0197dc25ad321ab23eba4168a3b6316a6b6349" dependencies = [ "ahash 0.8.11", "bitflags 2.6.0", @@ -3323,7 +3435,7 @@ dependencies = [ "comfy-table", "either", "hashbrown 0.14.5", - "indexmap 2.2.6", + "indexmap 2.4.0", "num-traits", "once_cell", "polars-arrow", @@ -3343,9 +3455,9 @@ dependencies = [ [[package]] name = "polars-error" -version = "0.41.2" +version = "0.42.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53e1707a17475ba5e74c349154b415e3148a1a275e395965427971b5e53ad621" +checksum = "07101d1803ca2046cdb3a8adb1523ddcc879229860f0ac56a853034269dec1e1" dependencies = [ "polars-arrow-format", "regex", @@ -3355,9 +3467,9 @@ dependencies = [ [[package]] name = "polars-expr" -version = "0.41.2" +version = "0.42.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "31a9688d5842e7a7fbad88e67a174778794a91d97d3bba1b3c09dd1656fee3b2" +checksum = "dd5c69634ddbb0f44186cd1c42d166963fc756f9cc994438e941bc2703ddbbab" dependencies = [ "ahash 0.8.11", "bitflags 2.6.0", @@ -3375,15 +3487,16 @@ dependencies = [ [[package]] name = "polars-io" -version = "0.41.2" +version = "0.42.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "18798dacd94fb9263f65f63f0feab0908675422646d6f7fc37043b85ff6dca35" +checksum = "a48ddf416ae185336c3d7880d2e05b7e55686e3e0da1014e5e7325eff9c7d722" dependencies = [ "ahash 0.8.11", "atoi_simd", "bytes", "chrono", "fast-float", + "glob", "home", "itoa", "memchr", @@ -3405,13 +3518,12 @@ dependencies = [ [[package]] name = "polars-lazy" -version = "0.41.2" +version = "0.42.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "74a11994c2211f2e99d9ac31776fd7c2c0607d5fe62d5b5db9e396f7d663f3d5" +checksum = "a514a85df9e7d501c71c96f094861d0608b05a3f533447b1c0ea9cf714162fcb" dependencies = [ "ahash 0.8.11", "bitflags 2.6.0", - "glob", "memchr", "once_cell", "polars-arrow", @@ -3431,10 +3543,11 @@ dependencies = [ [[package]] name = "polars-mem-engine" -version = "0.41.2" +version = "0.42.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5acd5fde6fadaddfcae3227ec5b64121007928f8e68870c80653438e20c1c587" +checksum = "2d057df81b17b4f0ea0e4424ee34f755e6b9ccfba432ecb2fe57dc4da6da2713" dependencies = [ + "memmap2", "polars-arrow", "polars-core", "polars-error", @@ -3449,9 +3562,9 @@ dependencies = [ [[package]] name = "polars-ops" -version = "0.41.2" +version = "0.42.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f4170c59e974727941edfb722f6d430ed623be9e7f30581ee00832c907f1b9fd" +checksum = "01ba44233249b7937491b5d2bdbf14e4ad534c0a65d06548c3bc418fc3e60791" dependencies = [ "ahash 0.8.11", "argminmax", @@ -3462,7 +3575,7 @@ dependencies = [ "either", "hashbrown 0.14.5", "hex", - "indexmap 2.2.6", + "indexmap 2.4.0", "memchr", "num-traits", "polars-arrow", @@ -3479,12 +3592,13 @@ dependencies = [ [[package]] name = "polars-parquet" -version = "0.41.2" +version = "0.42.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c684638c36c60c691d707d414249fe8af4a19a35a39d418464b140fe23732e5d" +checksum = "bb2993265079ffa07dd16277189444424f8d787b00b01c6f6e001f58bab543ce" dependencies = [ "ahash 0.8.11", "base64 0.22.1", + "bytemuck", "ethnum", "num-traits", "parquet-format-safe", @@ -3492,16 +3606,15 @@ dependencies = [ "polars-compute", "polars-error", "polars-utils", - "seq-macro", "simdutf8", "streaming-decompression", ] [[package]] name = "polars-pipe" -version = "0.41.2" +version = "0.42.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "832af9fbebc4c074d95fb19e1ef9e1bf37c343641238c2476febff296a7028ea" +checksum = "0ccba94c4fa9fded0f41730f7649574c72d6d938a840731c7e4eea4e7ed5cecf" dependencies = [ "crossbeam-channel", "crossbeam-queue", @@ -3525,15 +3638,18 @@ dependencies = [ [[package]] name = "polars-plan" -version = "0.41.2" +version = "0.42.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "801390ea815c05c9cf8337f3148090c9c10c9595a839fa0706b77cc2405b4466" +checksum = "5d6b29cc53d6c086c09b11050b01c25c28f6a91339036ba1fb1250fcf0d89e74" dependencies = [ "ahash 0.8.11", + "bitflags 2.6.0", "bytemuck", + "chrono", "chrono-tz", "either", "hashbrown 0.14.5", + "memmap2", "once_cell", "percent-encoding 2.3.1", "polars-arrow", @@ -3552,9 +3668,9 @@ dependencies = [ [[package]] name = "polars-row" -version = "0.41.2" +version = "0.42.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dee955e91b605fc91db4d0a8ea02609d3a09ff79256d905214a2a6f758cd6f7b" +checksum = "6e11f43f48466c4b1caa6dc61c381dc10c2d67b87fcb74bc996e21c4f7b0a311" dependencies = [ "bytemuck", "polars-arrow", @@ -3564,9 +3680,9 @@ dependencies = [ [[package]] name = "polars-sql" -version = "0.41.2" +version = "0.42.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d89c00a4b399501d5bd478e8e8022b9391047fe8570324ecba20c4e4833c0e87" +checksum = "6e9338806e7254618eb819cc632c34b75b71d462222a913f9c1035ed81911ddc" dependencies = [ "hex", "once_cell", @@ -3585,9 +3701,9 @@ dependencies = [ [[package]] name = "polars-time" -version = "0.41.2" +version = "0.42.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9689b3aff99d64befe300495528bdc44c36d2656c3a8b242a790d4f43df027fc" +checksum = "30a601ab9a62e733b8b560b37642321cb1933faa194864739f6a59d6dfc4d686" dependencies = [ "atoi", "bytemuck", @@ -3606,14 +3722,16 @@ dependencies = [ [[package]] name = "polars-utils" -version = "0.41.2" +version = "0.42.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "12081e346983a91e26f395597e1d53dea1b4ecd694653aee1cc402d2fae01f04" +checksum = "19dd73207bd15efb0ae5c9c3ece3227927ed6a16ad63578acec342378e6bdcb4" dependencies = [ "ahash 0.8.11", "bytemuck", + "bytes", "hashbrown 0.14.5", - "indexmap 2.2.6", + "indexmap 2.4.0", + "memmap2", "num-traits", "once_cell", "polars-error", @@ -3633,9 +3751,12 @@ checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391" [[package]] name = "ppv-lite86" -version = "0.2.17" +version = "0.2.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" +checksum = "77957b295656769bb8ad2b6a6b09d897d94f05c41b069aede1fcdaa675eaea04" +dependencies = [ + "zerocopy", +] [[package]] name = "prettyplease" @@ -3644,7 +3765,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5f12335488a2f3b0a83b14edad48dca9879ce89b2edd10e80237e4e852dd645e" dependencies = [ "proc-macro2", - "syn 2.0.68", + "syn 2.0.75", ] [[package]] @@ -3707,7 +3828,7 @@ checksum = "5bb182580f71dd070f88d01ce3de9f4da5021db7115d2e1c3605a754153b77c1" dependencies = [ "bytes", "heck 0.5.0", - "itertools 0.12.1", + "itertools 0.13.0", "log", "multimap", "once_cell", @@ -3718,7 +3839,7 @@ dependencies = [ "pulldown-cmark", "pulldown-cmark-to-cmark", "regex", - "syn 2.0.68", + "syn 2.0.75", "tempfile", ] @@ -3729,10 +3850,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "18bec9b0adc4eba778b33684b7ba3e7137789434769ee3ce3930463ef904cfca" dependencies = [ "anyhow", - "itertools 0.12.1", + "itertools 0.13.0", "proc-macro2", "quote", - "syn 2.0.68", + "syn 2.0.75", ] [[package]] @@ -3744,6 +3865,57 @@ dependencies = [ "prost", ] +[[package]] +name = "protobuf" +version = "3.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a74937d52a466a535fda2e83f0e575f3ef1b34e4a84545b4a9e418fad32a3b1c" +dependencies = [ + "once_cell", + "protobuf-support", + "thiserror", +] + +[[package]] +name = "protobuf-codegen" +version = "3.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a02997c69a76d9dba3124e2041dc7bb32c98e2cc7bbd136950312a819c64f825" +dependencies = [ + "anyhow", + "once_cell", + "protobuf", + "protobuf-parse", + "regex", + "tempfile", + "thiserror", +] + +[[package]] +name = "protobuf-parse" +version = "3.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3272369e02691aef4ff079ef97bb278afa9d15c21a41fd727654ab712e4bb297" +dependencies = [ + "anyhow", + "indexmap 1.9.3", + "log", + "protobuf", + "protobuf-support", + "tempfile", + "thiserror", + "which", +] + +[[package]] +name = "protobuf-support" +version = "3.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ebf34636d66670da249c3b6589142e7f0b4918a015ec72fa32102fd43e023b0e" +dependencies = [ + "thiserror", +] + [[package]] name = "psm" version = "0.1.21" @@ -3795,16 +3967,17 @@ dependencies = [ [[package]] name = "quinn" -version = "0.11.2" +version = "0.11.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e4ceeeeabace7857413798eb1ffa1e9c905a9946a57d81fb69b4b71c4d8eb3ad" +checksum = "b22d8e7369034b9a7132bc2008cac12f2013c8132b45e0554e6e20e2617f2156" dependencies = [ "bytes", "pin-project-lite", "quinn-proto", "quinn-udp", - "rustc-hash", - "rustls 0.23.10", + "rustc-hash 2.0.0", + "rustls 0.23.12", + "socket2", "thiserror", "tokio", "tracing", @@ -3812,15 +3985,15 @@ dependencies = [ [[package]] name = "quinn-proto" -version = "0.11.3" +version = "0.11.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ddf517c03a109db8100448a4be38d498df8a210a99fe0e1b9eaf39e78c640efe" +checksum = "ba92fb39ec7ad06ca2582c0ca834dfeadcaf06ddfc8e635c80aa7e1c05315fdd" dependencies = [ "bytes", "rand", "ring", - "rustc-hash", - "rustls 0.23.10", + "rustc-hash 2.0.0", + "rustls 0.23.12", "slab", "thiserror", "tinyvec", @@ -3836,6 +4009,7 @@ dependencies = [ "libc", "once_cell", "socket2", + "tracing", "windows-sys 0.52.0", ] @@ -3896,9 +4070,9 @@ dependencies = [ [[package]] name = "raw-cpuid" -version = "11.0.2" +version = "11.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e29830cbb1290e404f24c73af91c5d8d631ce7e128691e9477556b540cd01ecd" +checksum = "cb9ee317cfe3fbd54b36a511efc1edd42e216903c9cd575e686dd68a2ba90d8d" dependencies = [ "bitflags 2.6.0", ] @@ -3940,7 +4114,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "76009fbe0614077fc1a2ce255e3a1881a2e3a3527097d5dc6d8212c585e7e38b" dependencies = [ "quote", - "syn 2.0.68", + "syn 2.0.75", ] [[package]] @@ -3954,18 +4128,18 @@ dependencies = [ [[package]] name = "redox_syscall" -version = "0.5.2" +version = "0.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c82cf8cff14456045f55ec4241383baeff27af886adb72ffb2162f99911de0fd" +checksum = "2a908a6e00f1fdd0dfd9c0eb08ce85126f6d8bbda50017e74bc4a4b7d4a926a4" dependencies = [ "bitflags 2.6.0", ] [[package]] name = "regex" -version = "1.10.5" +version = "1.10.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b91213439dad192326a0d7c6ee3955910425f441d7038e0d6933b0aec5c4517f" +checksum = "4219d74c6b67a3654a9fbebc4b419e22126d13d2f3c4a07ee0cb61ff79a79619" dependencies = [ "aho-corasick", "memchr", @@ -4016,9 +4190,9 @@ dependencies = [ [[package]] name = "reqwest" -version = "0.12.5" +version = "0.12.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c7d6d2a27d57148378eb5e111173f4276ad26340ecc5c49a4a2152167a2d6a37" +checksum = "f8f4955649ef5c38cc7f9e8aa41761d48fb9677197daea9984dc54f56aad5e63" dependencies = [ "base64 0.22.1", "bytes", @@ -4041,7 +4215,7 @@ dependencies = [ "percent-encoding 2.3.1", "pin-project-lite", "quinn", - "rustls 0.23.10", + "rustls 0.23.12", "rustls-pemfile", "rustls-pki-types", "serde", @@ -4057,7 +4231,7 @@ dependencies = [ "wasm-bindgen-futures", "web-sys", "webpki-roots", - "winreg", + "windows-registry", ] [[package]] @@ -4077,9 +4251,9 @@ dependencies = [ [[package]] name = "rkyv" -version = "0.7.44" +version = "0.7.45" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5cba464629b3394fc4dbc6f940ff8f5b4ff5c7aef40f29166fd4ad12acbc99c0" +checksum = "9008cd6385b9e161d8229e1f6549dd23c3d022f132a2ea37ac3a10ac4935779b" dependencies = [ "bitvec", "bytecheck", @@ -4095,9 +4269,9 @@ dependencies = [ [[package]] name = "rkyv_derive" -version = "0.7.44" +version = "0.7.45" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a7dddfff8de25e6f62b9d64e6e432bf1c6736c57d20323e15ee10435fbda7c65" +checksum = "503d1d27590a2b0a3a4ca4c94755aa2875657196ecbf401a42eff41d7de532c0" dependencies = [ "proc-macro2", "quote", @@ -4204,9 +4378,9 @@ dependencies = [ [[package]] name = "rust_decimal" -version = "1.35.0" +version = "1.36.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1790d1c4c0ca81211399e0e0af16333276f375209e71a37b67698a373db5b47a" +checksum = "b082d80e3e3cc52b2ed634388d436fe1f4de6af5786cc2de9ba9737527bdf555" dependencies = [ "arrayvec", "borsh", @@ -4230,6 +4404,12 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" +[[package]] +name = "rustc-hash" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "583034fd73374156e66797ed8e5b0d5690409c9226b22d87cb7f19821c05d152" + [[package]] name = "rustc_version" version = "0.4.0" @@ -4268,9 +4448,9 @@ dependencies = [ [[package]] name = "rustls" -version = "0.23.10" +version = "0.23.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05cff451f60db80f490f3c182b77c35260baace73209e9cdbbe526bfe3a4d402" +checksum = "c58f8c84392efc0a126acce10fa59ff7b3d2ac06ab451a33f2741989b806b044" dependencies = [ "aws-lc-rs", "log", @@ -4284,9 +4464,9 @@ dependencies = [ [[package]] name = "rustls-native-certs" -version = "0.7.0" +version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f1fb85efa936c42c6d5fc28d2629bb51e4b2f4b8a5211e297d599cc5a093792" +checksum = "04182dffc9091a404e0fc069ea5cd60e5b866c3adf881eff99a32d048242dffa" dependencies = [ "openssl-probe", "rustls-pemfile", @@ -4297,9 +4477,9 @@ dependencies = [ [[package]] name = "rustls-pemfile" -version = "2.1.2" +version = "2.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "29993a25686778eb88d4189742cd713c9bce943bc54251a33509dc63cbacf73d" +checksum = "196fe16b00e106300d3e45ecfcb764fa292a535d7326a29a5875c579c7417425" dependencies = [ "base64 0.22.1", "rustls-pki-types", @@ -4307,15 +4487,15 @@ dependencies = [ [[package]] name = "rustls-pki-types" -version = "1.7.0" +version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "976295e77ce332211c0d24d92c0e83e50f5c5f046d11082cea19f3df13a3562d" +checksum = "fc0a2ce646f8655401bb81e7927b812614bd5d91dbc968696be50603510fcaf0" [[package]] name = "rustls-webpki" -version = "0.102.4" +version = "0.102.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff448f7e92e913c4b7d4c6d8e4540a1724b319b4152b8aef6d4cf8339712b33e" +checksum = "8e6b52d4fda176fd835fdc55a835d4a89b8499cad995885a21149d5ad62f852e" dependencies = [ "aws-lc-rs", "ring", @@ -4358,9 +4538,9 @@ checksum = "1c107b6f4780854c8b126e228ea8869f4d7b71260f962fefb57b996b8959ba6b" [[package]] name = "security-framework" -version = "2.11.0" +version = "2.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c627723fd09706bacdb5cf41499e95098555af3c3c29d014dc3c458ef6be11c0" +checksum = "897b2245f0b511c87893af39b033e5ca9cce68824c4d7e7630b5a1d339658d02" dependencies = [ "bitflags 2.6.0", "core-foundation", @@ -4371,9 +4551,9 @@ dependencies = [ [[package]] name = "security-framework-sys" -version = "2.11.0" +version = "2.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "317936bbbd05227752583946b9e66d7ce3b489f84e11a94a510b4437fef407d7" +checksum = "75da29fe9b9b08fe9d6b22b5b4bcbc75d8db3aa31e639aa56bb62e9d46bfceaf" dependencies = [ "core-foundation-sys", "libc", @@ -4399,7 +4579,7 @@ dependencies = [ "blake3", "byte-unit", "cached", - "clap", + "clap 4.5.16", "clru", "config", "confique", @@ -4410,6 +4590,7 @@ dependencies = [ "futures-lite", "gcp-bigquery-client", "geo", + "geobuf", "hex", "hifitime", "hybridmap", @@ -4421,13 +4602,14 @@ dependencies = [ "opcua", "polars", "prost", + "protobuf", "rand", "regex", "rot13", "rrdcached-client", "rumqttc", "rust_decimal", - "rustls 0.23.10", + "rustls 0.23.12", "sentry", "serde", "serde-inline-default", @@ -4586,17 +4768,11 @@ dependencies = [ "uuid", ] -[[package]] -name = "seq-macro" -version = "0.3.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a3f0bf26fd526d2a95683cd0f87bf103b8539e2ca1ef48ce002d67aad59aa0b4" - [[package]] name = "serde" -version = "1.0.207" +version = "1.0.208" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5665e14a49a4ea1b91029ba7d3bca9f299e1f7cfa194388ccc20f14743e784f2" +checksum = "cff085d2cb684faa248efb494c39b68e522822ac0de72ccf08109abde717cfb2" dependencies = [ "serde_derive", ] @@ -4609,7 +4785,7 @@ checksum = "9980133dc534d02ab08df3b384295223a45090c40a4c46240e3eaa982b495910" dependencies = [ "proc-macro2", "quote", - "syn 2.0.68", + "syn 2.0.75", ] [[package]] @@ -4623,20 +4799,20 @@ dependencies = [ [[package]] name = "serde_derive" -version = "1.0.207" +version = "1.0.208" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6aea2634c86b0e8ef2cfdc0c340baede54ec27b1e46febd7f80dffb2aa44a00e" +checksum = "24008e81ff7613ed8e5ba0cfaf24e2c2f1e5b8a0495711e44fcd4882fca62bcf" dependencies = [ "proc-macro2", "quote", - "syn 2.0.68", + "syn 2.0.75", ] [[package]] name = "serde_json" -version = "1.0.124" +version = "1.0.125" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "66ad62847a56b3dba58cc891acd13884b9c61138d330c0d7b6181713d4fce38d" +checksum = "83c8e735a073ccf5be70aa8066aa984eaf2fa000db6c8d0100ae605b366d31ed" dependencies = [ "itoa", "memchr", @@ -4656,9 +4832,9 @@ dependencies = [ [[package]] name = "serde_spanned" -version = "0.6.6" +version = "0.6.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "79e674e01f999af37c49f70a6ede167a8a60b2503e56c5599532a65baa5969a0" +checksum = "eb5b1b31579f3811bf615c144393417496f152e12ac8b7663bf664f4a815306d" dependencies = [ "serde", ] @@ -4681,7 +4857,7 @@ version = "0.9.34+deprecated" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6a8b1a1a2ebf674015cc02edccce75287f1a0130d394307b36743c2f5d504b47" dependencies = [ - "indexmap 2.2.6", + "indexmap 2.4.0", "itoa", "ryu", "serde", @@ -4805,12 +4981,15 @@ name = "smallvec" version = "1.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67" +dependencies = [ + "serde", +] [[package]] name = "smallvec" -version = "2.0.0-alpha.6" +version = "2.0.0-alpha.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "66778689f64ae4f4e9365890e55048783afc0bb07a8e214b0bcfe7b88e6bb2bf" +checksum = "e6a96cb564e12be8458b004bd829787ebe887de197d94516d2ba5a2a32235a0c" [[package]] name = "smartstring" @@ -4863,9 +5042,9 @@ dependencies = [ [[package]] name = "spade" -version = "2.9.0" +version = "2.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f4ec45f91925e2c9ab3b6a857ee9ed36916990df76a1c475d783a328e247cc8" +checksum = "9bd14cf9e23b5241e1b1289ed3b9afc7746c95ead8df52d9254f5ed2d40c561b" dependencies = [ "hashbrown 0.14.5", "num-traits", @@ -4904,18 +5083,18 @@ dependencies = [ [[package]] name = "sqlparser" -version = "0.47.0" +version = "0.49.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "295e9930cd7a97e58ca2a070541a3ca502b17f5d1fa7157376d0fabd85324f25" +checksum = "a4a404d0e14905361b918cb8afdb73605e25c1d5029312bd9785142dcb3aa49e" dependencies = [ "log", ] [[package]] name = "sqlx" -version = "0.7.4" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c9a2ccff1a000a5a59cd33da541d9f2fdcd9e6e8229cc200565942bff36d0aaa" +checksum = "27144619c6e5802f1380337a209d2ac1c431002dd74c6e60aebff3c506dc4f0c" dependencies = [ "sqlx-core", "sqlx-macros", @@ -4926,26 +5105,26 @@ dependencies = [ [[package]] name = "sqlx-core" -version = "0.7.4" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "24ba59a9342a3d9bab6c56c118be528b27c9b60e490080e9711a04dccac83ef6" +checksum = "a999083c1af5b5d6c071d34a708a19ba3e02106ad82ef7bbd69f5e48266b613b" dependencies = [ - "ahash 0.8.11", "atoi", "byteorder", "bytes", "crc", "crossbeam-queue", "either", - "event-listener 2.5.3", + "event-listener", "futures-channel", "futures-core", "futures-intrusive", "futures-io", "futures-util", - "hashlink", + "hashbrown 0.14.5", + "hashlink 0.9.1", "hex", - "indexmap 2.2.6", + "indexmap 2.4.0", "log", "memchr", "once_cell", @@ -4967,26 +5146,26 @@ dependencies = [ [[package]] name = "sqlx-macros" -version = "0.7.4" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ea40e2345eb2faa9e1e5e326db8c34711317d2b5e08d0d5741619048a803127" +checksum = "a23217eb7d86c584b8cbe0337b9eacf12ab76fe7673c513141ec42565698bb88" dependencies = [ "proc-macro2", "quote", "sqlx-core", "sqlx-macros-core", - "syn 1.0.109", + "syn 2.0.75", ] [[package]] name = "sqlx-macros-core" -version = "0.7.4" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5833ef53aaa16d860e92123292f1f6a3d53c34ba8b1969f152ef1a7bb803f3c8" +checksum = "1a099220ae541c5db479c6424bdf1b200987934033c2584f79a0e1693601e776" dependencies = [ "dotenvy", "either", - "heck 0.4.1", + "heck 0.5.0", "hex", "once_cell", "proc-macro2", @@ -4998,7 +5177,7 @@ dependencies = [ "sqlx-mysql", "sqlx-postgres", "sqlx-sqlite", - "syn 1.0.109", + "syn 2.0.75", "tempfile", "tokio", "url 2.5.2", @@ -5006,12 +5185,12 @@ dependencies = [ [[package]] name = "sqlx-mysql" -version = "0.7.4" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ed31390216d20e538e447a7a9b959e06ed9fc51c37b514b46eb758016ecd418" +checksum = "5afe4c38a9b417b6a9a5eeffe7235d0a106716495536e7727d1c7f4b1ff3eba6" dependencies = [ "atoi", - "base64 0.21.7", + "base64 0.22.1", "bitflags 2.6.0", "byteorder", "bytes", @@ -5050,12 +5229,12 @@ dependencies = [ [[package]] name = "sqlx-postgres" -version = "0.7.4" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7c824eb80b894f926f89a0b9da0c7f435d27cdd35b8c655b114e58223918577e" +checksum = "b1dbb157e65f10dbe01f729339c06d239120221c9ad9fa0ba8408c4cc18ecf21" dependencies = [ "atoi", - "base64 0.21.7", + "base64 0.22.1", "bitflags 2.6.0", "byteorder", "crc", @@ -5090,9 +5269,9 @@ dependencies = [ [[package]] name = "sqlx-sqlite" -version = "0.7.4" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b244ef0a8414da0bed4bb1910426e890b19e5e9bccc27ada6b797d05c55ae0aa" +checksum = "9b2cdd83c008a622d94499c0006d8ee5f821f36c89b7d625c900e5dc30b5c5ee" dependencies = [ "atoi", "flume", @@ -5105,11 +5284,11 @@ dependencies = [ "log", "percent-encoding 2.3.1", "serde", + "serde_urlencoded", "sqlx-core", "time", "tracing", "url 2.5.2", - "urlencoding", "uuid", ] @@ -5170,6 +5349,12 @@ dependencies = [ "unicode-properties", ] +[[package]] +name = "strsim" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" + [[package]] name = "strsim" version = "0.11.1" @@ -5201,7 +5386,7 @@ dependencies = [ "proc-macro2", "quote", "rustversion", - "syn 2.0.68", + "syn 2.0.75", ] [[package]] @@ -5214,7 +5399,7 @@ dependencies = [ "proc-macro2", "quote", "rustversion", - "syn 2.0.68", + "syn 2.0.75", ] [[package]] @@ -5236,9 +5421,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.68" +version = "2.0.75" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "901fa70d88b9d6c98022e23b4136f9f3e54e4662c3bc1bd1d84a42a9a0f0c1e9" +checksum = "f6af063034fc1935ede7be0122941bafa9bacb949334d090b77ca98b5817c7d9" dependencies = [ "proc-macro2", "quote", @@ -5254,7 +5439,7 @@ dependencies = [ "proc-macro-error", "proc-macro2", "quote", - "syn 2.0.68", + "syn 2.0.75", ] [[package]] @@ -5268,19 +5453,21 @@ name = "sync_wrapper" version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a7065abeca94b6a8a577f9bd45aa0867a2238b74e8eb67cf10d492bc39351394" +dependencies = [ + "futures-core", +] [[package]] name = "sysinfo" -version = "0.30.12" +version = "0.31.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "732ffa00f53e6b2af46208fba5718d9662a421049204e156328b66791ffa15ae" +checksum = "d4115055da5f572fff541dd0c4e61b0262977f453cc9fe04be83aba25a89bdab" dependencies = [ - "cfg-if", "core-foundation-sys", "libc", + "memchr", "ntapi", - "once_cell", - "windows", + "windows 0.57.0", ] [[package]] @@ -5308,14 +5495,15 @@ checksum = "c1bbb9f3c5c463a01705937a24fdabc5047929ac764b2d5b9cf681c1f5041ed5" [[package]] name = "tempfile" -version = "3.10.1" +version = "3.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85b77fafb263dd9d05cbeac119526425676db3784113aa9295c88498cbf8bff1" +checksum = "04cbcdd0c794ebb0d4cf35e88edd2f7d2c4c3e9a5a6dab322839b321c6a87a64" dependencies = [ "cfg-if", "fastrand", + "once_cell", "rustix", - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] @@ -5327,6 +5515,12 @@ dependencies = [ "winapi-util", ] +[[package]] +name = "textwrap" +version = "0.16.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "23d434d3f8967a09480fb04132ebe0a3e088c173e6d0ee7897abbdf4eab0f8b9" + [[package]] name = "thiserror" version = "1.0.63" @@ -5344,7 +5538,7 @@ checksum = "a4558b58466b9ad7ca0f102865eccc95938dca1a74a856f2b57b6629050da261" dependencies = [ "proc-macro2", "quote", - "syn 2.0.68", + "syn 2.0.75", ] [[package]] @@ -5401,9 +5595,9 @@ dependencies = [ [[package]] name = "tinyvec" -version = "1.6.1" +version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c55115c6fbe2d2bef26eb09ad74bde02d8255476fc0c7b515ef09fbb35742d82" +checksum = "445e881f4f6d382d5f27c034e25eb92edd7c784ceab92a0937db7f2e9471b938" dependencies = [ "tinyvec_macros", ] @@ -5416,9 +5610,9 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.39.2" +version = "1.39.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "daa4fb1bc778bd6f04cbfc4bb2d06a7396a8f299dc33ea1900cedaa316f467b1" +checksum = "9babc99b9923bfa4804bd74722ff02c0381021eafa4db9949217e3be8e84fff5" dependencies = [ "backtrace", "bytes", @@ -5440,7 +5634,7 @@ checksum = "693d596312e88961bc67d7f1f97af8a70227d9f90c31bba5806eec004978d752" dependencies = [ "proc-macro2", "quote", - "syn 2.0.68", + "syn 2.0.75", ] [[package]] @@ -5470,7 +5664,7 @@ version = "0.26.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0c7bc40d0e5a97695bb96e27995cd3a08538541b0a846f65bba7a359f36700d4" dependencies = [ - "rustls 0.23.10", + "rustls 0.23.12", "rustls-pki-types", "tokio", ] @@ -5510,21 +5704,21 @@ dependencies = [ [[package]] name = "toml" -version = "0.8.14" +version = "0.8.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f49eb2ab21d2f26bd6db7bf383edc527a7ebaee412d17af4d40fdccd442f335" +checksum = "a1ed1f98e3fdc28d6d910e6737ae6ab1a93bf1985935a1193e68f93eeb68d24e" dependencies = [ "serde", "serde_spanned", "toml_datetime", - "toml_edit 0.22.14", + "toml_edit 0.22.20", ] [[package]] name = "toml_datetime" -version = "0.6.6" +version = "0.6.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4badfd56924ae69bcc9039335b2e017639ce3f9b001c393c1b2d1ef846ce2cbf" +checksum = "0dd7358ecb8fc2f8d014bf86f6f638ce72ba252a2c3a2572f2a795f1d23efb41" dependencies = [ "serde", ] @@ -5535,22 +5729,22 @@ version = "0.21.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6a8534fd7f78b5405e860340ad6575217ce99f38d4d5c8f2442cb5ecb50090e1" dependencies = [ - "indexmap 2.2.6", + "indexmap 2.4.0", "toml_datetime", "winnow 0.5.40", ] [[package]] name = "toml_edit" -version = "0.22.14" +version = "0.22.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f21c7aaf97f1bd9ca9d4f9e73b0a6c74bd5afef56f2bc931943a6e1c37e04e38" +checksum = "583c44c02ad26b0c3f3066fe629275e50627026c51ac2e595cca4c230ce1ce1d" dependencies = [ - "indexmap 2.2.6", + "indexmap 2.4.0", "serde", "serde_spanned", "toml_datetime", - "winnow 0.6.13", + "winnow 0.6.18", ] [[package]] @@ -5596,7 +5790,7 @@ dependencies = [ "proc-macro2", "prost-build", "quote", - "syn 2.0.68", + "syn 2.0.75", ] [[package]] @@ -5653,15 +5847,15 @@ dependencies = [ [[package]] name = "tower-layer" -version = "0.3.2" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c20c8dbed6283a09604c3e69b4b7eeb54e298b8a600d4d5ecb5ad39de609f1d0" +checksum = "121c2a6cda46980bb0fcd1647ffaf6cd3fc79a013de288782836f6df9c48780e" [[package]] name = "tower-service" -version = "0.3.2" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6bc1c9ce2b5135ac7f93c72918fc37feb872bdc6a5533a8b85eb4b86bfdae52" +checksum = "8df9b6e13f2d32c91b9bd719c00d1958837bc7dec474d94952798cc8e69eeec3" [[package]] name = "tracing" @@ -5683,7 +5877,7 @@ checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.68", + "syn 2.0.75", ] [[package]] @@ -5805,9 +5999,9 @@ dependencies = [ [[package]] name = "unicode-properties" -version = "0.1.1" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e4259d9d4425d9f0661581b804cb85fe66a4c631cadd8f490d1c13a35d5d9291" +checksum = "52ea75f83c0137a9b98608359a5f1af8144876eb67bcb1ce837368e906a9f524" [[package]] name = "unicode-reverse" @@ -5850,9 +6044,9 @@ checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" [[package]] name = "ureq" -version = "2.9.7" +version = "2.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d11a831e3c0b56e438a28308e7c810799e3c118417f342d30ecec080105395cd" +checksum = "b74fc6b57825be3373f7054754755f03ac3a8f5d70015ccad699ba2029956f4a" dependencies = [ "base64 0.22.1", "log", @@ -5914,7 +6108,7 @@ version = "4.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c5afb1a60e207dca502682537fefcfd9921e71d0b83e9576060f09abc6efab23" dependencies = [ - "indexmap 2.2.6", + "indexmap 2.4.0", "serde", "serde_json", "utoipa-gen", @@ -5930,7 +6124,7 @@ dependencies = [ "proc-macro2", "quote", "regex", - "syn 2.0.68", + "syn 2.0.75", ] [[package]] @@ -5947,9 +6141,9 @@ dependencies = [ [[package]] name = "uuid" -version = "1.9.1" +version = "1.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5de17fd2f7da591098415cff336e12965a28061ddace43b59cb3c430179c9439" +checksum = "81dfa00651efa65069b0b6b651f4aaa31ba9e3c3ce0137aaad053604ee7e0314" dependencies = [ "getrandom", "serde", @@ -5969,9 +6163,9 @@ checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426" [[package]] name = "version_check" -version = "0.9.4" +version = "0.9.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" +checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a" [[package]] name = "want" @@ -5996,34 +6190,35 @@ checksum = "b8dad83b4f25e74f184f64c43b150b91efe7647395b42289f38e50566d82855b" [[package]] name = "wasm-bindgen" -version = "0.2.92" +version = "0.2.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4be2531df63900aeb2bca0daaaddec08491ee64ceecbee5076636a3b026795a8" +checksum = "a82edfc16a6c469f5f44dc7b571814045d60404b55a0ee849f9bcfa2e63dd9b5" dependencies = [ "cfg-if", + "once_cell", "wasm-bindgen-macro", ] [[package]] name = "wasm-bindgen-backend" -version = "0.2.92" +version = "0.2.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "614d787b966d3989fa7bb98a654e369c762374fd3213d212cfc0251257e747da" +checksum = "9de396da306523044d3302746f1208fa71d7532227f15e347e2d93e4145dd77b" dependencies = [ "bumpalo", "log", "once_cell", "proc-macro2", "quote", - "syn 2.0.68", + "syn 2.0.75", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-futures" -version = "0.4.42" +version = "0.4.43" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76bc14366121efc8dbb487ab05bcc9d346b3b5ec0eaa76e46594cabbe51762c0" +checksum = "61e9300f63a621e96ed275155c108eb6f843b6a26d053f122ab69724559dc8ed" dependencies = [ "cfg-if", "js-sys", @@ -6033,9 +6228,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.92" +version = "0.2.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1f8823de937b71b9460c0c34e25f3da88250760bec0ebac694b49997550d726" +checksum = "585c4c91a46b072c92e908d99cb1dcdf95c5218eeb6f3bf1efa991ee7a68cccf" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -6043,28 +6238,28 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.92" +version = "0.2.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e94f17b526d0a461a191c78ea52bbce64071ed5c04c9ffe424dcb38f74171bb7" +checksum = "afc340c74d9005395cf9dd098506f7f44e38f2b4a21c6aaacf9a105ea5e1e836" dependencies = [ "proc-macro2", "quote", - "syn 2.0.68", + "syn 2.0.75", "wasm-bindgen-backend", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-shared" -version = "0.2.92" +version = "0.2.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af190c94f2773fdb3729c55b007a722abb5384da03bc0986df4c289bf5567e96" +checksum = "c62a0a307cb4a311d3a07867860911ca130c3494e8c2719593806c08bc5d0484" [[package]] name = "web-sys" -version = "0.3.69" +version = "0.3.70" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77afa9a11836342370f4817622a2f0f418b134426d91a82dfb48f532d2ec13ef" +checksum = "26fdeaafd9bd129f65e7c031593c24d62186301e0c72c8978fa1678be7d532c0" dependencies = [ "js-sys", "wasm-bindgen", @@ -6129,11 +6324,11 @@ checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" [[package]] name = "winapi-util" -version = "0.1.8" +version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d4cc384e1e73b93bafa6fb4f1df8c41695c8a91cf9c4c64358067d15a7b6c6b" +checksum = "cf221c93e13a30d793f7645a0e7762c55d169dbb0a49671918a2319d289b10bb" dependencies = [ - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] @@ -6148,8 +6343,18 @@ version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e48a53791691ab099e5e2ad123536d0fff50652600abaf43bbf952894110d0be" dependencies = [ - "windows-core", - "windows-targets 0.52.5", + "windows-core 0.52.0", + "windows-targets 0.52.6", +] + +[[package]] +name = "windows" +version = "0.57.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "12342cb4d8e3b046f3d80effd474a7a02447231330ef77d71daa6fbc40681143" +dependencies = [ + "windows-core 0.57.0", + "windows-targets 0.52.6", ] [[package]] @@ -6158,7 +6363,80 @@ version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "33ab640c8d7e35bf8ba19b884ba838ceb4fba93a4e8c65a9059d08afcfc683d9" dependencies = [ - "windows-targets 0.52.5", + "windows-targets 0.52.6", +] + +[[package]] +name = "windows-core" +version = "0.57.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d2ed2439a290666cd67ecce2b0ffaad89c2a56b976b736e6ece670297897832d" +dependencies = [ + "windows-implement", + "windows-interface", + "windows-result 0.1.2", + "windows-targets 0.52.6", +] + +[[package]] +name = "windows-implement" +version = "0.57.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9107ddc059d5b6fbfbffdfa7a7fe3e22a226def0b2608f72e9d552763d3e1ad7" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.75", +] + +[[package]] +name = "windows-interface" +version = "0.57.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "29bee4b38ea3cde66011baa44dba677c432a78593e202392d1e9070cf2a7fca7" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.75", +] + +[[package]] +name = "windows-registry" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e400001bb720a623c1c69032f8e3e4cf09984deec740f007dd2b03ec864804b0" +dependencies = [ + "windows-result 0.2.0", + "windows-strings", + "windows-targets 0.52.6", +] + +[[package]] +name = "windows-result" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5e383302e8ec8515204254685643de10811af0ed97ea37210dc26fb0032647f8" +dependencies = [ + "windows-targets 0.52.6", +] + +[[package]] +name = "windows-result" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d1043d8214f791817bab27572aaa8af63732e11bf84aa21a45a78d6c317ae0e" +dependencies = [ + "windows-targets 0.52.6", +] + +[[package]] +name = "windows-strings" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4cd9b125c486025df0eabcb585e62173c6c9eddcec5d117d3b6e8c30e2ee4d10" +dependencies = [ + "windows-result 0.2.0", + "windows-targets 0.52.6", ] [[package]] @@ -6176,7 +6454,16 @@ version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" dependencies = [ - "windows-targets 0.52.5", + "windows-targets 0.52.6", +] + +[[package]] +name = "windows-sys" +version = "0.59.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b" +dependencies = [ + "windows-targets 0.52.6", ] [[package]] @@ -6196,18 +6483,18 @@ dependencies = [ [[package]] name = "windows-targets" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f0713a46559409d202e70e28227288446bf7841d3211583a4b53e3f6d96e7eb" +checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" dependencies = [ - "windows_aarch64_gnullvm 0.52.5", - "windows_aarch64_msvc 0.52.5", - "windows_i686_gnu 0.52.5", + "windows_aarch64_gnullvm 0.52.6", + "windows_aarch64_msvc 0.52.6", + "windows_i686_gnu 0.52.6", "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 0.52.6", + "windows_x86_64_gnu 0.52.6", + "windows_x86_64_gnullvm 0.52.6", + "windows_x86_64_msvc 0.52.6", ] [[package]] @@ -6218,9 +6505,9 @@ checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" [[package]] name = "windows_aarch64_gnullvm" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7088eed71e8b8dda258ecc8bac5fb1153c5cffaf2578fc8ff5d61e23578d3263" +checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" [[package]] name = "windows_aarch64_msvc" @@ -6230,9 +6517,9 @@ checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" [[package]] name = "windows_aarch64_msvc" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9985fd1504e250c615ca5f281c3f7a6da76213ebd5ccc9561496568a2752afb6" +checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" [[package]] name = "windows_i686_gnu" @@ -6242,15 +6529,15 @@ checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" [[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" @@ -6260,9 +6547,9 @@ checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" [[package]] name = "windows_i686_msvc" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db3c2bf3d13d5b658be73463284eaf12830ac9a26a90c717b7f771dfe97487bf" +checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" [[package]] name = "windows_x86_64_gnu" @@ -6272,9 +6559,9 @@ checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" [[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" @@ -6284,9 +6571,9 @@ checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" [[package]] name = "windows_x86_64_gnullvm" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "852298e482cd67c356ddd9570386e2862b5673c85bd5f88df9ab6802b334c596" +checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" [[package]] name = "windows_x86_64_msvc" @@ -6296,9 +6583,9 @@ checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" [[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" [[package]] name = "winnow" @@ -6311,23 +6598,13 @@ dependencies = [ [[package]] name = "winnow" -version = "0.6.13" +version = "0.6.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "59b5e5f6c299a3c7890b876a2a587f3115162487e704907d9b6cd29473052ba1" +checksum = "68a9bda4691f099d435ad181000724da8e5899daa10713c2d432552b9ccd3a6f" dependencies = [ "memchr", ] -[[package]] -name = "winreg" -version = "0.52.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a277a57398d4bfa075df44f501a17cfdf8542d224f0d36095a2adc7aee4ef0a5" -dependencies = [ - "cfg-if", - "windows-sys 0.48.0", -] - [[package]] name = "ws_stream_tungstenite" version = "0.13.0" @@ -6370,9 +6647,9 @@ dependencies = [ [[package]] name = "xxhash-rust" -version = "0.8.10" +version = "0.8.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "927da81e25be1e1a2901d59b81b37dd2efd1fc9c9345a55007f09bf5a2d3ee03" +checksum = "6a5cbf750400958819fb6178eaa83bee5cd9c29a26a40cc241df8c70fdd46984" [[package]] name = "yaml-rust" @@ -6400,7 +6677,7 @@ dependencies = [ "hyper-util", "log", "percent-encoding 2.3.1", - "rustls 0.23.10", + "rustls 0.23.12", "rustls-pemfile", "seahash", "serde", @@ -6412,22 +6689,23 @@ dependencies = [ [[package]] name = "zerocopy" -version = "0.7.34" +version = "0.7.35" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae87e3fcd617500e5d106f0380cf7b77f3c6092aae37191433159dda23cfb087" +checksum = "1b9b4fd18abc82b8136838da5d50bae7bdea537c574d8dc1a34ed098d6c166f0" dependencies = [ + "byteorder", "zerocopy-derive", ] [[package]] name = "zerocopy-derive" -version = "0.7.34" +version = "0.7.35" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "15e934569e47891f7d9411f1a451d947a60e000ab3bd24fbb970f000387d1b3b" +checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.68", + "syn 2.0.75", ] [[package]] @@ -6447,32 +6725,32 @@ checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" dependencies = [ "proc-macro2", "quote", - "syn 2.0.68", + "syn 2.0.75", ] [[package]] name = "zstd" -version = "0.13.1" +version = "0.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d789b1514203a1120ad2429eae43a7bd32b90976a7bb8a05f7ec02fa88cc23a" +checksum = "fcf2b778a664581e31e389454a7072dab1647606d44f7feea22cd5abb9c9f3f9" dependencies = [ "zstd-safe", ] [[package]] name = "zstd-safe" -version = "7.1.0" +version = "7.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1cd99b45c6bc03a018c8b8a86025678c87e55526064e38f9df301989dce7ec0a" +checksum = "54a3ab4db68cea366acc5c897c7b4d4d1b8994a9cd6e6f841f8964566a419059" dependencies = [ "zstd-sys", ] [[package]] name = "zstd-sys" -version = "2.0.11+zstd.1.5.6" +version = "2.0.13+zstd.1.5.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75652c55c0b6f3e6f12eb786fe1bc960396bf05a1eb3bf1f3691c3610ac2e6d4" +checksum = "38ff0f21cfee8f97d94cef41359e0c89aa6113028ab0291aa8ca0038995a95aa" dependencies = [ "cc", "pkg-config", diff --git a/Cargo.toml b/Cargo.toml index 61c81c9..ed016ad 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -17,8 +17,8 @@ futures = "0.3" #futures-util = { version = "0.3", features = ["io"] } #http-body = "1.0" #http-body-util = "0.1" -polars = { version = "0.41" } -sqlx = { version = "0.7", features = [ +polars = { version = "0.42" } +sqlx = { version = "0.8", features = [ "runtime-tokio", "sqlite", "postgres", @@ -30,7 +30,13 @@ tokio = { version = "1.35", features = ["full"] } tokio-stream = { version = "0.1", features = ["io-util"] } tokio-util = "0.7" tower = { version = "0.4", features = ["full"] } -tower-http = { version = "0.5", features = ["full"] } +tower-http = { version = "0.5", features = [ + "full", + "sensitive-headers", + "compression-zstd", + "compression-br", + "compression-gzip", +] } tracing = { version = "0.1" } tracing-subscriber = { version = "0.3", features = ["env-filter"] } uuid = { version = "1.6", features = ["serde"] } @@ -58,7 +64,7 @@ blake3 = "1.5" regex = "1.10" influxdb-line-protocol = "2.0" flate2 = "1.0" -smallvec = "1.13" +smallvec = "1.13.2" once_cell = "1.19" urlencoding = "2.1" hybridmap = "0.1" @@ -73,8 +79,8 @@ sentry = { version = "0.34", features = ["anyhow", "tower"] } rumqttc = { version = "0.24", features = ["url", "websocket"] } url = "2.5" rand = "0.8" -#geobuf = "0.1.4" -#protobuf = "3.0.2" +geobuf = "0.1.4" +protobuf = "3.0.2" #lapin = "2.3" futures-lite = "2.3" #gcp-bigquery-client = { git = "https://github.com/lquerel/gcp-bigquery-client.git", rev = "107a5557df6336933f6b0bcf330aa91fe6ca866a" } diff --git a/src/datamodel/batch_builder.rs b/src/datamodel/batch_builder.rs index de0fa23..3af38d7 100644 --- a/src/datamodel/batch_builder.rs +++ b/src/datamodel/batch_builder.rs @@ -231,7 +231,7 @@ mod tests { use crate::{ bus::message::Message, config::load_configuration, - datamodel::{sensapp_vec::SensAppLabels, Sample, SensorType}, + datamodel::{Sample, SensAppLabels, SensorType}, }; // Utility function to create a test sensor diff --git a/src/datamodel/mod.rs b/src/datamodel/mod.rs index 815b086..ff4f389 100644 --- a/src/datamodel/mod.rs +++ b/src/datamodel/mod.rs @@ -2,6 +2,7 @@ pub mod batch; pub mod batch_builder; pub mod sample; pub mod sensapp_datetime; +pub mod sensapp_labels; pub mod sensapp_vec; pub mod sensor; pub mod sensor_type; @@ -10,6 +11,8 @@ pub mod unit; pub use sample::Sample; pub use sensapp_datetime::SensAppDateTime; +pub use sensapp_labels::SensAppLabels; +pub use sensapp_labels::SensAppLabelsExt; pub use sensapp_vec::SensAppVec; pub use sensor::Sensor; pub use sensor_type::SensorType; diff --git a/src/datamodel/sensapp_labels.rs b/src/datamodel/sensapp_labels.rs new file mode 100644 index 0000000..063af14 --- /dev/null +++ b/src/datamodel/sensapp_labels.rs @@ -0,0 +1,60 @@ +use std::collections::BTreeMap; + +use hybridmap::HybridMap; +use smallvec::SmallVec; + +pub type SensAppLabels = SmallVec<[(String, String); 8]>; + +pub trait SensAppLabelsExt { + fn build_with_iterators<'a>( + context_iterator: Option>, + labels_iterator: Option>, + ) -> Option + where + Self: std::marker::Sized; + + fn build_with_context<'a>( + context_reference: &Option>, + labels_iterator: Option>, + ) -> Option + where + Self: std::marker::Sized; +} + +impl SensAppLabelsExt for SensAppLabels { + fn build_with_iterators<'a>( + context_iterator: Option>, + labels_iterator: Option>, + ) -> Option { + if let Some(context_iterator) = context_iterator { + let mut labels_builder = BTreeMap::new(); + + for (key, value) in context_iterator { + labels_builder.insert(key.clone(), value.clone()); + } + if let Some(labels_iterator) = labels_iterator { + for (key, value) in labels_iterator { + let mut key_with_prefix = key; + while labels_builder.contains_key(&key_with_prefix) { + key_with_prefix.insert(0, '_'); + } + labels_builder.insert(key_with_prefix, value); + } + } + + Some(labels_builder.into_iter().collect()) + } else { + labels_iterator.map(|labels_iterator| labels_iterator.collect()) + } + } + + fn build_with_context<'a>( + context_reference: &Option>, + labels_iterator: Option>, + ) -> Option { + Self::build_with_iterators( + context_reference.as_ref().map(|context| context.iter()), + labels_iterator, + ) + } +} diff --git a/src/datamodel/sensapp_vec.rs b/src/datamodel/sensapp_vec.rs index 163a9a4..6dcbc80 100644 --- a/src/datamodel/sensapp_vec.rs +++ b/src/datamodel/sensapp_vec.rs @@ -1,5 +1,3 @@ use smallvec::SmallVec; pub type SensAppVec = SmallVec<[T; 4]>; - -pub type SensAppLabels = SmallVec<[(String, String); 8]>; diff --git a/src/datamodel/sensor.rs b/src/datamodel/sensor.rs index 4eac35d..6604e82 100644 --- a/src/datamodel/sensor.rs +++ b/src/datamodel/sensor.rs @@ -1,6 +1,6 @@ use crate::name_to_uuid::uuid_v8_blake3; -use super::{sensapp_vec::SensAppLabels, unit::Unit, SensorType}; +use super::{unit::Unit, SensAppLabels, SensorType}; use anyhow::{anyhow, Error}; use smallvec::SmallVec; use std::fmt; diff --git a/src/importers/csv.rs b/src/importers/csv.rs index 45ca4e4..3f7d2ef 100644 --- a/src/importers/csv.rs +++ b/src/importers/csv.rs @@ -33,7 +33,7 @@ pub async fn publish_csv_async( println!("Reading CSV"); while let Some(record) = records.next().await { - let record = record.unwrap(); + let _record = record.unwrap(); //println!("{:?}", record); current_samples.push(Sample { diff --git a/src/ingestors/http/influxdb.rs b/src/ingestors/http/influxdb.rs index ddfbf7c..c2b7b0d 100644 --- a/src/ingestors/http/influxdb.rs +++ b/src/ingestors/http/influxdb.rs @@ -1,7 +1,8 @@ use super::{app_error::AppError, state::HttpServerState}; -use crate::datamodel::{ - batch_builder::BatchBuilder, sensapp_datetime::SensAppDateTimeExt, sensapp_vec::SensAppLabels, - SensAppDateTime, Sensor, SensorType, TypedSamples, +use crate::parsing::ParseData; +use crate::{ + datamodel::batch_builder::BatchBuilder, + parsing::influx::{precision::Precision, InfluxLineProtocolCompression, InfluxParser}, }; use anyhow::Result; use axum::{ @@ -9,12 +10,9 @@ use axum::{ extract::{Query, State}, http::{HeaderMap, StatusCode}, }; -use flate2::read::GzDecoder; -use influxdb_line_protocol::{parse_lines, FieldValue}; +use hybridmap::HybridMap; use serde::Deserialize; -use std::str::FromStr; -use std::{io::Read, str::from_utf8}; -use std::{str, sync::Arc}; +use std::str; use tokio_util::bytes::Bytes; #[derive(Debug, Deserialize)] @@ -26,98 +24,6 @@ pub struct InfluxDBQueryParams { pub precision: Option, } -fn bytes_to_string(headers: &HeaderMap, bytes: &Bytes) -> Result { - match headers.get("content-encoding") { - Some(value) => match value.to_str() { - Ok("gzip") => { - let mut d = GzDecoder::new(&bytes[..]); - let mut s = String::new(); - d.read_to_string(&mut s) - .map_err(|e| AppError::BadRequest(anyhow::anyhow!(e)))?; - Ok(s) - } - _ => Err(AppError::BadRequest(anyhow::anyhow!( - "Unsupported content-encoding: {:?}", - value - ))), - }, - // No content-encoding header - None => { - let str = from_utf8(bytes).map_err(|e| AppError::BadRequest(anyhow::anyhow!(e)))?; - Ok(str.to_string()) - } - } -} - -fn compute_field_name(url_encoded_measurement_name: &str, field_key: &str) -> String { - let name = urlencoding::encode(field_key); - let mut string_builder = - String::with_capacity(url_encoded_measurement_name.len() + name.len() + 1); - string_builder.push_str(url_encoded_measurement_name); - string_builder.push(' '); // Space as separator, as it's not allowed in measurement name nor field key - string_builder.push_str(&name); - string_builder -} - -fn influxdb_field_to_sensapp( - field_value: FieldValue, - datetime: SensAppDateTime, -) -> Result<(SensorType, TypedSamples)> { - match field_value { - FieldValue::I64(value) => Ok(( - SensorType::Integer, - TypedSamples::one_integer(value, datetime), - )), - FieldValue::U64(value) => match i64::try_from(value) { - Ok(value) => Ok(( - SensorType::Integer, - TypedSamples::one_integer(value, datetime), - )), - Err(_) => anyhow::bail!("U64 value is too big to be converted to i64"), - }, - FieldValue::F64(value) => Ok((SensorType::Float, TypedSamples::one_float(value, datetime))), - /*FieldValue::F64(value) => Ok(( - SensorType::Numeric, - TypedSamples::one_numeric( - Decimal::from_f64_retain(value) - .ok_or(anyhow::anyhow!("Failed to convert f64 to Decimal"))?, - datetime, - ), - )),*/ - FieldValue::String(value) => Ok(( - SensorType::String, - TypedSamples::one_string(value.into(), datetime), - )), - FieldValue::Boolean(value) => Ok(( - SensorType::Boolean, - TypedSamples::one_boolean(value, datetime), - )), - } -} - -#[derive(Debug, Default, PartialEq)] -enum Precision { - #[default] - Nanoseconds, - Microseconds, - Milliseconds, - Seconds, -} - -impl FromStr for Precision { - type Err = (); - - fn from_str(s: &str) -> Result { - match s { - "ns" => Ok(Precision::Nanoseconds), - "us" => Ok(Precision::Microseconds), - "ms" => Ok(Precision::Milliseconds), - "s" => Ok(Precision::Seconds), - _ => Err(()), - } - } -} - /// InfluxDB Compatible Write API. /// /// Allows you to write data from InfluxDB or Telegraf to SensApp. @@ -191,72 +97,33 @@ pub async fn publish_influxdb( None => Precision::default(), }; - let bytes_string = bytes_to_string(&headers, &bytes)?; - let parser = parse_lines(&bytes_string); - - let mut batch_builder = BatchBuilder::new()?; - - for line in parser { - match line { - Ok(line) => { - let measurement = line.series.measurement; - - let tags = match &line.series.tag_set { - None => None, - Some(tags) => { - let mut tags_vec = SensAppLabels::new(); - tags_vec.push(("influxdb_bucket".to_string(), bucket.clone())); - tags_vec.push(("influxdb_org".to_string(), common_org_name.clone())); + let compression = match headers.get("content-encoding") { + Some(value) => match value.to_str() { + Ok("gzip") => InfluxLineProtocolCompression::Gzip, + Ok("plain") => InfluxLineProtocolCompression::None, + _ => { + return Err(AppError::BadRequest(anyhow::anyhow!( + "Unsupported content-encoding: {:?}", + value + ))) + } + }, + // No content-encoding header + None => InfluxLineProtocolCompression::Automatic, + }; - for (key, value) in tags.iter() { - tags_vec.push((key.to_string(), value.to_string())); - } - Some(tags_vec) - } - }; + let mut context_map = HybridMap::with_capacity(2); + context_map.insert("influxdb_bucket".to_string(), bucket); + context_map.insert("influxdb_org".to_string(), common_org_name); - let datetime = match line.timestamp { - Some(timestamp) => match precision_enum { - Precision::Nanoseconds => { - SensAppDateTime::from_unix_nanoseconds_i64(timestamp) - } - Precision::Microseconds => { - SensAppDateTime::from_unix_microseconds_i64(timestamp) - } - Precision::Milliseconds => { - SensAppDateTime::from_unix_milliseconds_i64(timestamp) - } - Precision::Seconds => SensAppDateTime::from_unix_seconds_i64(timestamp), - }, - None => match SensAppDateTime::now() { - Ok(datetime) => datetime, - Err(error) => { - return Err(AppError::InternalServerError(anyhow::anyhow!(error))); - } - }, - }; + let parser = InfluxParser::new(compression, precision_enum, false); - let url_encoded_field_name = urlencoding::encode(&measurement).to_string(); + let mut batch_builder = BatchBuilder::new()?; - for (field_key, field_value) in line.field_set { - let unit = None; - let (sensor_type, value) = - match influxdb_field_to_sensapp(field_value, datetime) { - Ok((sensor_type, value)) => (sensor_type, value), - Err(error) => { - return Err(AppError::BadRequest(anyhow::anyhow!(error))); - } - }; - let name = compute_field_name(&url_encoded_field_name, &field_key); - let sensor = Sensor::new_without_uuid(name, sensor_type, unit, tags.clone())?; - batch_builder.add(Arc::new(sensor), value).await?; - } - } - Err(error) => { - return Err(AppError::BadRequest(anyhow::anyhow!(error))); - } - } - } + parser + .parse_data(&bytes, Some(context_map), &mut batch_builder) + .await + .map_err(|error| AppError::BadRequest(anyhow::anyhow!(error)))?; // TODO: Remove this println once debugged println!("INfluxDB: Sending to the event bus soon"); @@ -283,48 +150,18 @@ pub async fn publish_influxdb( #[cfg(test)] mod tests { use crate::bus::{self, message}; + use crate::config::load_configuration; use crate::storage::sqlite::SqliteStorage; use super::*; use flate2::write::GzEncoder; use flate2::Compression; - use influxdb_line_protocol::EscapedStr; use std::io::Write; - - #[test] - fn test_bytes_to_string() { - let headers = HeaderMap::new(); - let bytes = Bytes::from("test"); - let result = bytes_to_string(&headers, &bytes).unwrap(); - assert_eq!(result, "test".to_string()); - - // Gziped bytes - let mut headers = HeaderMap::new(); - headers.insert("content-encoding", "gzip".parse().unwrap()); - let raw_bytes = "test".as_bytes(); - let mut encoder = GzEncoder::new(Vec::new(), Compression::default()); - encoder.write_all(raw_bytes).unwrap(); - let bytes = Bytes::from(encoder.finish().unwrap()); - let result = bytes_to_string(&headers, &bytes).unwrap(); - assert_eq!(result, "test".to_string()); - - // Unsupported content-encoding - let mut headers = HeaderMap::new(); - headers.insert("content-encoding", "deflate".parse().unwrap()); - let bytes = Bytes::from("test"); - let result = bytes_to_string(&headers, &bytes); - assert!(result.is_err()); - - // Invalid UTF-8 bytes - let headers = HeaderMap::new(); - // Starts with a 0 - let bytes = Bytes::from(&[0, 159, 146, 150][..]); - let result = bytes_to_string(&headers, &bytes); - assert!(result.is_err()); - } + use std::sync::Arc; #[tokio::test] async fn test_publish_influxdb() { + _ = load_configuration(); let event_bus = Arc::new(bus::event_bus::EventBus::new()); let mut wololo = event_bus.main_bus_receiver.activate_cloned(); tokio::spawn(async move { @@ -359,6 +196,24 @@ mod tests { .unwrap(); assert_eq!(result, StatusCode::NO_CONTENT); + // with good gzip encoding + let mut headers = HeaderMap::new(); + headers.insert("content-encoding", "gzip".parse().unwrap()); + let query = Query(InfluxDBQueryParams { + bucket: "test".to_string(), + org: Some("test".to_string()), + org_id: None, + precision: None, + }); + let bytes = "cpu,host=A,region=west usage_system=64i 1590488773254420000".as_bytes(); + let mut encoder = GzEncoder::new(Vec::new(), Compression::default()); + encoder.write_all(bytes).unwrap(); + let bytes = Bytes::from(encoder.finish().unwrap()); + let result = publish_influxdb(state.clone(), headers, query, bytes) + .await + .unwrap(); + assert_eq!(result, StatusCode::NO_CONTENT); + // with wrong gzip encoding let mut headers = HeaderMap::new(); headers.insert("content-encoding", "gzip".parse().unwrap()); @@ -508,74 +363,4 @@ mod tests { assert!(result.is_err()); assert!(matches!(result, Err(AppError::BadRequest(_)))); } - - #[test] - fn test_influxdb_field_to_sensapp() { - let datetime = SensAppDateTime::from_unix_seconds(0.0); - let result = influxdb_field_to_sensapp(FieldValue::I64(42), datetime).unwrap(); - assert_eq!( - result, - (SensorType::Integer, TypedSamples::one_integer(42, datetime)) - ); - - let result = influxdb_field_to_sensapp(FieldValue::U64(42), datetime).unwrap(); - assert_eq!( - result, - (SensorType::Integer, TypedSamples::one_integer(42, datetime)) - ); - - let result = influxdb_field_to_sensapp(FieldValue::F64(42.0), datetime).unwrap(); - assert_eq!( - result, - (SensorType::Float, TypedSamples::one_float(42.0, datetime)) - ); - - let result = - influxdb_field_to_sensapp(FieldValue::String(EscapedStr::from("test")), datetime) - .unwrap(); - assert_eq!( - result, - ( - SensorType::String, - TypedSamples::one_string("test".to_string(), datetime) - ) - ); - - let result = influxdb_field_to_sensapp(FieldValue::Boolean(true), datetime).unwrap(); - assert_eq!( - result, - ( - SensorType::Boolean, - TypedSamples::one_boolean(true, datetime) - ) - ); - } - - #[test] - fn test_convert_too_high_u64_to_i64() { - let datetime = SensAppDateTime::from_unix_seconds(0.0); - let result = influxdb_field_to_sensapp(FieldValue::U64(i64::MAX as u64 + 1), datetime); - assert!(result.is_err()); - } - - #[test] - fn test_precision_enum() { - let result = Precision::from_str("ns").unwrap(); - assert_eq!(result, Precision::Nanoseconds); - - let result = Precision::from_str("us").unwrap(); - assert_eq!(result, Precision::Microseconds); - - let result = Precision::from_str("ms").unwrap(); - assert_eq!(result, Precision::Milliseconds); - - let result = Precision::from_str("s").unwrap(); - assert_eq!(result, Precision::Seconds); - - let result = Precision::from_str("wrong"); - assert!(result.is_err()); - - let result = Precision::default(); - assert_eq!(result, Precision::Nanoseconds); - } } diff --git a/src/ingestors/http/prometheus.rs b/src/ingestors/http/prometheus.rs index c1bcdc6..1450f50 100644 --- a/src/ingestors/http/prometheus.rs +++ b/src/ingestors/http/prometheus.rs @@ -1,15 +1,8 @@ -use std::sync::Arc; - +use super::{app_error::AppError, state::HttpServerState}; use crate::{ - datamodel::{ - batch_builder::BatchBuilder, sensapp_datetime::SensAppDateTimeExt, - sensapp_vec::SensAppLabels, unit::Unit, Sample, SensAppDateTime, Sensor, SensorType, - TypedSamples, - }, - parsing::prometheus::remote_write_parser::parse_remote_write_request, + datamodel::batch_builder::BatchBuilder, + parsing::{prometheus::PrometheusParser, ParseData}, }; - -use super::{app_error::AppError, state::HttpServerState}; use anyhow::Result; use axum::{ debug_handler, @@ -104,75 +97,11 @@ pub async fn publish_prometheus( headers: HeaderMap, bytes: Bytes, ) -> Result { - // println!("InfluxDB publish"); - // println!("bucket: {}", bucket); - // println!("org: {:?}", org); - // println!("org_id: {:?}", org_id); - // println!("precision: {:?}", precision); - // println!("bytes: {:?}", bytes); - - println!("Received {} bytes", bytes.len()); - - // Verify headers verify_headers(&headers)?; - // Parse the content - let write_request = parse_remote_write_request(&bytes)?; - - // Regularly, prometheus sends metadata on the undocumented reserved field, - // so we stop immediately when it happens. - if write_request.timeseries.is_empty() { - return Ok(StatusCode::NO_CONTENT); - } - - println!("Received {} timeseries", write_request.timeseries.len()); - let mut batch_builder = BatchBuilder::new()?; - for time_serie in write_request.timeseries { - let mut labels = SensAppLabels::with_capacity(time_serie.labels.len()); - let mut name: Option = None; - let mut unit: Option = None; - for label in time_serie.labels { - match label.name.as_str() { - "__name__" => { - name = Some(label.value.clone()); - } - "unit" => { - unit = Some(Unit::new(label.value.clone(), None)); - } - _ => {} - } - labels.push((label.name, label.value)); - } - let name = match name { - Some(name) => name, - None => { - return Err(AppError::BadRequest(anyhow::anyhow!( - "A time serie is missing its __name__ label" - ))); - } - }; - - // Prometheus has a very simple model, it's always a float. - let sensor = Sensor::new_without_uuid(name, SensorType::Float, unit, Some(labels))?; - - // We can now add the samples - let samples = TypedSamples::Float( - time_serie - .samples - .into_iter() - // Special prometheus NaN value (Stale Marker) - .filter(|sample| sample.value.to_bits() != 0x7ff0000000000002) - .map(|sample| Sample { - datetime: SensAppDateTime::from_unix_milliseconds_i64(sample.timestamp), - value: sample.value, - }) - .collect(), - ); - - batch_builder.add(Arc::new(sensor), samples).await?; - // batch_builder.send_if_batch_full(event_bus.clone()).await?; - } + let parser = PrometheusParser; + parser.parse_data(&bytes, None, &mut batch_builder).await?; match batch_builder.send_what_is_left(state.event_bus).await { Ok(Some(mut receiver)) => { @@ -184,6 +113,5 @@ pub async fn publish_prometheus( } } - // OK no content Ok(StatusCode::NO_CONTENT) } diff --git a/src/ingestors/mqtt/mqtt_client.rs b/src/ingestors/mqtt/mqtt_client.rs index fa8b763..2acd91d 100644 --- a/src/ingestors/mqtt/mqtt_client.rs +++ b/src/ingestors/mqtt/mqtt_client.rs @@ -8,7 +8,7 @@ use std::{sync::Arc, time::Duration}; fn random_client_id() -> String { rand::thread_rng() .sample_iter(&Alphanumeric) - .take(12) + .take(18) .map(char::from) .collect() } @@ -83,7 +83,7 @@ fn configure_mqtt_options( Ok(mqtt_options) } -pub async fn mqtt_client(config: MqttConfig, event_bus: Arc) -> Result<()> { +pub async fn mqtt_client(config: MqttConfig, _event_bus: Arc) -> Result<()> { let mqtt_options = make_client_options(&config)?; let (client, mut event_loop) = AsyncClient::new(mqtt_options, 16); diff --git a/src/ingestors/opcua/opcua_utils.rs b/src/ingestors/opcua/opcua_utils.rs index 53b9c9d..e74ff9d 100644 --- a/src/ingestors/opcua/opcua_utils.rs +++ b/src/ingestors/opcua/opcua_utils.rs @@ -4,8 +4,7 @@ use opcua::types::{DataValue, DateTime, Identifier, NodeId, Variant}; use uuid::Uuid; use crate::datamodel::sensapp_datetime::SensAppDateTimeExt; -use crate::datamodel::sensapp_vec::SensAppLabels; -use crate::datamodel::{Sample, SensAppDateTime, SensAppVec, SensorType}; +use crate::datamodel::{Sample, SensAppDateTime, SensAppLabels, SensAppVec, SensorType}; use crate::datamodel::{Sensor, TypedSamples}; pub fn node_id_to_name(name_prefix: Option, node: &NodeId) -> String { @@ -560,6 +559,4 @@ mod tests { Some(SensorType::Json) ); } - - } diff --git a/src/parsing/geobuf/mod.rs b/src/parsing/geobuf/mod.rs new file mode 100644 index 0000000..fc9f5c3 --- /dev/null +++ b/src/parsing/geobuf/mod.rs @@ -0,0 +1,32 @@ +use super::ParseData; +use crate::datamodel::batch_builder::BatchBuilder; +use anyhow::{bail, Result}; +use async_trait::async_trait; +use geobuf::{decode::Decoder, geobuf_pb}; +use hybridmap::HybridMap; +use protobuf::Message; + +pub struct GeobufParser; + +#[async_trait] +impl ParseData for GeobufParser { + async fn parse_data( + &self, + data: &[u8], + context: Option>, + batch_builder: &mut BatchBuilder, + ) -> Result<()> { + let mut geobuf = geobuf_pb::Data::new(); + geobuf.merge_from_bytes(data)?; + + match Decoder::decode(&geobuf) { + Ok(serde_json::Value::Object(geojson)) => { + println!("GeoJSON: {:?}", geojson); + } + Ok(_) => bail!("Failed to decode Geobuf as GeoJSON"), + Err(e) => bail!("Failed to decode Geobuf as GeoJSON: {:?}", e), + } + + Ok(()) + } +} diff --git a/src/parsing/influx/mod.rs b/src/parsing/influx/mod.rs new file mode 100644 index 0000000..a9dd5a0 --- /dev/null +++ b/src/parsing/influx/mod.rs @@ -0,0 +1,293 @@ +use super::ParseData; +use crate::datamodel::{ + batch_builder::BatchBuilder, sensapp_datetime::SensAppDateTimeExt, SensAppDateTime, + SensAppLabels, SensAppLabelsExt, Sensor, SensorType, TypedSamples, +}; +use anyhow::Result; +use async_trait::async_trait; +use flate2::read::GzDecoder; +use hybridmap::HybridMap; +use influxdb_line_protocol::{parse_lines, FieldValue}; +use precision::Precision; +use rust_decimal::Decimal; +use std::{io::Read, sync::Arc}; + +pub mod precision; + +#[derive(PartialEq, Default)] +pub enum InfluxLineProtocolCompression { + None, + Gzip, + #[default] + Automatic, +} + +#[derive(Default)] +pub struct InfluxParser { + compression: InfluxLineProtocolCompression, + precision: Precision, + floats_as_numeric: bool, +} + +impl InfluxParser { + pub fn new( + compression: InfluxLineProtocolCompression, + precision: Precision, + floats_as_numeric: bool, + ) -> Self { + Self { + compression, + precision, + floats_as_numeric, + } + } + + pub fn bytes_to_string(&self, bytes: &[u8]) -> Result { + if self.compression == InfluxLineProtocolCompression::Gzip + || (self.compression == InfluxLineProtocolCompression::Automatic && is_gzip(bytes)) + { + let mut d = GzDecoder::new(bytes); + let mut s = String::new(); + d.read_to_string(&mut s)?; + Ok(s) + } else { + let str = std::str::from_utf8(bytes)?; + Ok(str.to_string()) + } + } +} + +fn is_gzip(bytes: &[u8]) -> bool { + // Magic number for gzip + bytes.starts_with(&[0x1F, 0x8B]) +} + +fn compute_field_name(url_encoded_measurement_name: &str, field_key: &str) -> String { + let name = urlencoding::encode(field_key); + let mut string_builder = + String::with_capacity(url_encoded_measurement_name.len() + name.len() + 1); + string_builder.push_str(url_encoded_measurement_name); + string_builder.push(' '); // Space as separator, as it's not allowed in measurement name nor field key + string_builder.push_str(&name); + string_builder +} + +fn influxdb_field_to_sensapp( + field_value: FieldValue, + datetime: SensAppDateTime, + floats_as_numeric: bool, +) -> Result<(SensorType, TypedSamples)> { + match (field_value, floats_as_numeric) { + (FieldValue::I64(value), _) => Ok(( + SensorType::Integer, + TypedSamples::one_integer(value, datetime), + )), + (FieldValue::U64(value), _) => match i64::try_from(value) { + Ok(value) => Ok(( + SensorType::Integer, + TypedSamples::one_integer(value, datetime), + )), + Err(_) => anyhow::bail!("U64 value is too big to be converted to i64"), + }, + (FieldValue::F64(value), false) => { + Ok((SensorType::Float, TypedSamples::one_float(value, datetime))) + } + (FieldValue::F64(value), true) => Ok(( + SensorType::Numeric, + TypedSamples::one_numeric( + Decimal::from_f64_retain(value) + .ok_or(anyhow::anyhow!("Failed to convert f64 to Decimal"))?, + datetime, + ), + )), + (FieldValue::String(value), _) => Ok(( + SensorType::String, + TypedSamples::one_string(value.into(), datetime), + )), + (FieldValue::Boolean(value), _) => Ok(( + SensorType::Boolean, + TypedSamples::one_boolean(value, datetime), + )), + } +} + +#[async_trait] +impl ParseData for InfluxParser { + async fn parse_data( + &self, + data: &[u8], + context: Option>, + batch_builder: &mut BatchBuilder, + ) -> Result<()> { + let bytes_string = self.bytes_to_string(data)?; + let parser = parse_lines(&bytes_string); + + let precision = self.precision; + + for line in parser { + let line = line?; + let measurement = line.series.measurement; + + let labels = SensAppLabels::build_with_context( + &context, + line.series.tag_set.map(|tags| { + tags.into_iter() + .map(|(k, v)| (k.to_string(), v.to_string())) + }), + ); + + let datetime = match line.timestamp { + Some(timestamp) => match precision { + Precision::Nanoseconds => SensAppDateTime::from_unix_nanoseconds_i64(timestamp), + Precision::Microseconds => { + SensAppDateTime::from_unix_microseconds_i64(timestamp) + } + Precision::Milliseconds => { + SensAppDateTime::from_unix_milliseconds_i64(timestamp) + } + Precision::Seconds => SensAppDateTime::from_unix_seconds_i64(timestamp), + }, + None => SensAppDateTime::now()?, + }; + + let url_encoded_field_name = urlencoding::encode(&measurement).to_string(); + + for (field_key, field_value) in line.field_set { + let unit = None; + let (sensor_type, value) = + influxdb_field_to_sensapp(field_value, datetime, self.floats_as_numeric)?; + let name = compute_field_name(&url_encoded_field_name, &field_key); + let sensor = Sensor::new_without_uuid(name, sensor_type, unit, labels.clone())?; + batch_builder.add(Arc::new(sensor), value).await?; + } + } + + Ok(()) + } +} + +#[cfg(test)] +mod tests { + + use super::*; + use flate2::write::GzEncoder; + use flate2::Compression; + use influxdb_line_protocol::EscapedStr; + use std::io::Write; + + #[test] + fn test_bytes_to_string() { + // Plain text + let parser = InfluxParser::new( + InfluxLineProtocolCompression::None, + Precision::Nanoseconds, + false, + ); + let bytes = "test".as_bytes(); + assert_eq!(parser.bytes_to_string(bytes).unwrap(), "test".to_string()); + + // With gzip compression + let parser = InfluxParser::new( + InfluxLineProtocolCompression::Gzip, + Precision::Nanoseconds, + false, + ); + let bytes = "test".as_bytes(); + let mut encoder = GzEncoder::new(Vec::new(), Compression::default()); + encoder.write_all(bytes).unwrap(); + let bytes = encoder.finish().unwrap(); + assert_eq!(parser.bytes_to_string(&bytes).unwrap(), "test".to_string()); + + // With automatic detection, plain text + let parser = InfluxParser::new( + InfluxLineProtocolCompression::Automatic, + Precision::Nanoseconds, + false, + ); + let bytes = "test".as_bytes(); + assert_eq!(parser.bytes_to_string(bytes).unwrap(), "test".to_string()); + + // With automatic detection, gzip compression + let parser = InfluxParser::new( + InfluxLineProtocolCompression::Automatic, + Precision::Nanoseconds, + false, + ); + let bytes = "test".as_bytes(); + let mut encoder = GzEncoder::new(Vec::new(), Compression::default()); + encoder.write_all(bytes).unwrap(); + let bytes = encoder.finish().unwrap(); + assert_eq!(parser.bytes_to_string(&bytes).unwrap(), "test".to_string()); + + // Invalid UTF-8 bytes + let parser = InfluxParser::new( + InfluxLineProtocolCompression::Automatic, + Precision::Nanoseconds, + false, + ); + let bytes = &[0, 159, 146, 150][..]; + assert!(parser.bytes_to_string(bytes).is_err()); + } + + #[test] + fn test_influxdb_field_to_sensapp() { + let datetime = SensAppDateTime::from_unix_seconds(0.0); + let result = influxdb_field_to_sensapp(FieldValue::I64(42), datetime, false).unwrap(); + assert_eq!( + result, + (SensorType::Integer, TypedSamples::one_integer(42, datetime)) + ); + + let result = influxdb_field_to_sensapp(FieldValue::U64(42), datetime, false).unwrap(); + assert_eq!( + result, + (SensorType::Integer, TypedSamples::one_integer(42, datetime)) + ); + + let result = influxdb_field_to_sensapp(FieldValue::F64(42.0), datetime, false).unwrap(); + assert_eq!( + result, + (SensorType::Float, TypedSamples::one_float(42.0, datetime)) + ); + + let result = influxdb_field_to_sensapp(FieldValue::F64(42.0), datetime, true).unwrap(); + assert_eq!( + result, + ( + SensorType::Numeric, + TypedSamples::one_numeric(rust_decimal::Decimal::new(42, 0), datetime) + ) + ); + + let result = influxdb_field_to_sensapp( + FieldValue::String(EscapedStr::from("test")), + datetime, + false, + ) + .unwrap(); + assert_eq!( + result, + ( + SensorType::String, + TypedSamples::one_string("test".to_string(), datetime) + ) + ); + + let result = influxdb_field_to_sensapp(FieldValue::Boolean(true), datetime, false).unwrap(); + assert_eq!( + result, + ( + SensorType::Boolean, + TypedSamples::one_boolean(true, datetime) + ) + ); + } + + #[test] + fn test_convert_too_high_u64_to_i64() { + let datetime = SensAppDateTime::from_unix_seconds(0.0); + let result = + influxdb_field_to_sensapp(FieldValue::U64(i64::MAX as u64 + 1), datetime, false); + assert!(result.is_err()); + } +} diff --git a/src/parsing/influx/precision.rs b/src/parsing/influx/precision.rs new file mode 100644 index 0000000..baec9f5 --- /dev/null +++ b/src/parsing/influx/precision.rs @@ -0,0 +1,50 @@ +use std::str::FromStr; + +#[derive(Debug, Default, Clone, Copy, PartialEq)] +pub enum Precision { + #[default] + Nanoseconds, + Microseconds, + Milliseconds, + Seconds, +} + +impl FromStr for Precision { + type Err = (); + + fn from_str(s: &str) -> Result { + match s { + "ns" => Ok(Precision::Nanoseconds), + "us" => Ok(Precision::Microseconds), + "ms" => Ok(Precision::Milliseconds), + "s" => Ok(Precision::Seconds), + _ => Err(()), + } + } +} + +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn test_precision_enum() { + let result = Precision::from_str("ns").unwrap(); + assert_eq!(result, Precision::Nanoseconds); + + let result = Precision::from_str("us").unwrap(); + assert_eq!(result, Precision::Microseconds); + + let result = Precision::from_str("ms").unwrap(); + assert_eq!(result, Precision::Milliseconds); + + let result = Precision::from_str("s").unwrap(); + assert_eq!(result, Precision::Seconds); + + let result = Precision::from_str("wrong"); + assert!(result.is_err()); + + let result = Precision::default(); + assert_eq!(result, Precision::Nanoseconds); + } +} diff --git a/src/parsing/mod.rs b/src/parsing/mod.rs index a243279..b1719d2 100644 --- a/src/parsing/mod.rs +++ b/src/parsing/mod.rs @@ -1 +1,30 @@ +use anyhow::{bail, Result}; +use async_trait::async_trait; +use hybridmap::HybridMap; + +use crate::datamodel::batch_builder::BatchBuilder; + +pub mod geobuf; +pub mod influx; pub mod prometheus; +pub mod senml; + +#[async_trait] +pub trait ParseData: Send + Sync { + async fn parse_data( + &self, + data: &[u8], + context: Option>, + batch_builder: &mut BatchBuilder, + ) -> Result<()>; +} + +pub fn get_parser_from_name(name: &str) -> Result> { + match name { + "prometheus_remote_write" => Ok(Box::new(prometheus::PrometheusParser)), + "senml_json" => Ok(Box::new(senml::SenMLParser)), + "geobuf" => Ok(Box::new(geobuf::GeobufParser)), + "influx_line_protocol" => Ok(Box::new(influx::InfluxParser::default())), + _ => bail!("Unsupported parser: {}", name), + } +} diff --git a/src/parsing/prometheus/mod.rs b/src/parsing/prometheus/mod.rs index c2ec303..8dc343f 100644 --- a/src/parsing/prometheus/mod.rs +++ b/src/parsing/prometheus/mod.rs @@ -1,2 +1,83 @@ pub mod remote_write_models; pub mod remote_write_parser; + +use super::ParseData; +use crate::datamodel::{ + batch_builder::BatchBuilder, sensapp_datetime::SensAppDateTimeExt, unit::Unit, Sample, + SensAppDateTime, SensAppLabels, SensAppLabelsExt, Sensor, SensorType, TypedSamples, +}; +use anyhow::Result; +use async_trait::async_trait; +use hybridmap::HybridMap; +use remote_write_parser::parse_remote_write_request; +use std::sync::Arc; + +pub struct PrometheusParser; + +#[async_trait] +impl ParseData for PrometheusParser { + async fn parse_data( + &self, + data: &[u8], + context: Option>, + batch_builder: &mut BatchBuilder, + ) -> Result<()> { + // Parse the content + let write_request = parse_remote_write_request(data)?; + + // Regularly, prometheus sends metadata on the undocumented reserved field, + // so we stop immediately when it happens. + if write_request.timeseries.is_empty() { + return Ok(()); + } + + for time_serie in write_request.timeseries { + let mut name: Option = None; + let mut unit: Option = None; + let labels = SensAppLabels::build_with_context( + &context, + Some(time_serie.labels.into_iter().map(|label| { + match label.name.as_str() { + "__name__" => { + name = Some(label.value.clone()); + } + "unit" => { + unit = Some(Unit::new(label.value.clone(), None)); + } + _ => {} + } + (label.name, label.value) + })), + ); + let name = match name { + Some(name) => name, + None => { + return Err(anyhow::anyhow!( + "A time serie is missing its __name__ label" + )); + } + }; + + // Prometheus has a very simple model, it's always a float. + let sensor = Sensor::new_without_uuid(name, SensorType::Float, unit, labels)?; + + // We can now add the samples + let samples = TypedSamples::Float( + time_serie + .samples + .into_iter() + // Special prometheus NaN value (Stale Marker) + .filter(|sample| sample.value.to_bits() != 0x7ff0000000000002) + .map(|sample| Sample { + datetime: SensAppDateTime::from_unix_milliseconds_i64(sample.timestamp), + value: sample.value, + }) + .collect(), + ); + + batch_builder.add(Arc::new(sensor), samples).await?; + } + + Ok(()) + } +} diff --git a/src/parsing/senml/mod.rs b/src/parsing/senml/mod.rs new file mode 100644 index 0000000..35521f7 --- /dev/null +++ b/src/parsing/senml/mod.rs @@ -0,0 +1,87 @@ +use async_trait::async_trait; +use hybridmap::HybridMap; +use std::sync::Arc; + +use anyhow::{bail, Result}; +use sindit_senml::{parse_json, SenMLValueField}; + +use crate::datamodel::{ + batch_builder::BatchBuilder, sensapp_datetime::SensAppDateTimeExt, unit::Unit, SensAppDateTime, + SensAppLabels, SensAppLabelsExt, Sensor, SensorType, TypedSamples, +}; + +use super::ParseData; + +pub struct SenMLParser; + +#[async_trait] +impl ParseData for SenMLParser { + async fn parse_data( + &self, + data: &[u8], + context: Option>, + batch_builder: &mut BatchBuilder, + ) -> Result<()> { + let data_str = std::str::from_utf8(data)?; + let records = parse_json(data_str, None)?; + + for record in records { + let name = record.name; + let unit = record.unit; + let value = record.value; + let sum = record.sum; + let time = record.time; + let extra_fields = record.extra_fields; + + let sensapp_time = SensAppDateTime::from_unix_milliseconds_i64(time.timestamp_millis()); + + let sensor_type: SensorType; + let sample: TypedSamples; + + if let Some(sum) = sum { + if value.is_some() { + bail!("Cannot have both value and sum"); + } + sample = TypedSamples::one_float(sum, sensapp_time); + sensor_type = SensorType::Float; + } else if let Some(value) = value { + match value { + SenMLValueField::FloatingPoint(number) => { + sample = TypedSamples::one_float(number, sensapp_time); + sensor_type = SensorType::Float; + } + SenMLValueField::StringValue(string) => { + sample = TypedSamples::one_string(string, sensapp_time); + sensor_type = SensorType::String; + } + SenMLValueField::BooleanValue(boolean) => { + sample = TypedSamples::one_boolean(boolean, sensapp_time); + sensor_type = SensorType::Boolean; + } + SenMLValueField::DataValue(data_value) => { + sample = TypedSamples::one_blob(data_value, sensapp_time); + sensor_type = SensorType::Blob; + } + } + } else { + bail!("No value or sum found"); + } + + let sensapp_unit = unit.map(|unit| Unit::new(unit, None)); + + let labels = SensAppLabels::build_with_context( + &context, + extra_fields.map(|extra_fields| { + extra_fields + .into_iter() + .map(|(key, value)| (key, value.to_string())) + }), + ); + + let sensor = Sensor::new_without_uuid(name, sensor_type, sensapp_unit, labels)?; + batch_builder.add(Arc::new(sensor), sample).await?; + } + + Ok(()) + } +} diff --git a/src/storage/bigquery/bigquery_crud.rs b/src/storage/bigquery/bigquery_crud.rs index 6f86de8..7d2b202 100644 --- a/src/storage/bigquery/bigquery_crud.rs +++ b/src/storage/bigquery/bigquery_crud.rs @@ -1,9 +1,6 @@ use std::collections::BTreeMap; -use crate::{ - crud::{list_cursor::ListCursor, viewmodel::sensor_viewmodel::SensorViewModel}, - datamodel::sensor, -}; +use crate::crud::{list_cursor::ListCursor, viewmodel::sensor_viewmodel::SensorViewModel}; use anyhow::{anyhow, Result}; use gcp_bigquery_client::model::{ query_parameter::QueryParameter, query_parameter_type::QueryParameterType, diff --git a/src/storage/duckdb/duckdb_crud.rs b/src/storage/duckdb/duckdb_crud.rs index 002fb42..d27ecc1 100644 --- a/src/storage/duckdb/duckdb_crud.rs +++ b/src/storage/duckdb/duckdb_crud.rs @@ -1,7 +1,4 @@ -use std::{ - collections::{BTreeMap, HashMap}, - sync::Arc, -}; +use std::{collections::BTreeMap, sync::Arc}; use anyhow::Result; use duckdb::{params, CachedStatement, Connection};