diff --git a/Cargo.lock b/Cargo.lock index c3b45641f7e0..6dce829b3fd4 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -307,17 +307,6 @@ 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 0.3.9", -] - [[package]] name = "auto_impl" version = "1.1.0" @@ -379,7 +368,7 @@ dependencies = [ "criterion", "differential-dataflow-master", "futures", - "hydroflow 0.6.2", + "hydroflow", "lazy_static", "rand 0.8.5", "rand_distr", @@ -593,21 +582,6 @@ dependencies = [ "half", ] -[[package]] -name = "clap" -version = "2.34.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a0610544180c38b88101fecf2dd634b174a62eef6946f84dfc6a7127512b381c" -dependencies = [ - "ansi_term", - "atty", - "bitflags 1.3.2", - "strsim 0.8.0", - "textwrap", - "unicode-width", - "vec_map", -] - [[package]] name = "clap" version = "4.5.4" @@ -627,7 +601,7 @@ dependencies = [ "anstream", "anstyle", "clap_lex", - "strsim 0.11.1", + "strsim", ] [[package]] @@ -770,7 +744,7 @@ dependencies = [ "anes", "cast", "ciborium", - "clap 4.5.4", + "clap", "criterion-plot", "futures", "is-terminal", @@ -878,7 +852,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "978747c1d849a7d2ee5e8adc0159961c48fb7e5db2f06af6723b80123bb53856" dependencies = [ "cfg-if 1.0.0", - "hashbrown 0.14.3", + "hashbrown", "lock_api", "once_cell", "parking_lot_core 0.9.9", @@ -938,33 +912,13 @@ dependencies = [ "crypto-common", ] -[[package]] -name = "dirs" -version = "3.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "30baa043103c9d0c2a57cf537cc2f35623889dc0d405e6c3cccfadbc81c71309" -dependencies = [ - "dirs-sys 0.3.7", -] - [[package]] name = "dirs" version = "5.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "44c45a9d03d6676652bcb5e724c7e988de1acad23a711b5217ab9cbecbec2225" dependencies = [ - "dirs-sys 0.4.1", -] - -[[package]] -name = "dirs-sys" -version = "0.3.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b1d1d91c932ef41c0f2663aa8b0ca0342d444d842c06914aa0a7e352d0bada6" -dependencies = [ - "libc", - "redox_users", - "winapi 0.3.9", + "dirs-sys", ] [[package]] @@ -1305,9 +1259,9 @@ checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b" name = "gossip_kv" version = "0.1.0" dependencies = [ - "clap 4.5.4", + "clap", "hostname", - "hydroflow 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", + "hydroflow", "serde", ] @@ -1317,12 +1271,6 @@ version = "1.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "eabb4a44450da02c90444cf74558da904edde8fb4e9035a9a6a4e15445af0bd7" -[[package]] -name = "hashbrown" -version = "0.12.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" - [[package]] name = "hashbrown" version = "0.14.3" @@ -1355,15 +1303,6 @@ 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.3" @@ -1442,7 +1381,7 @@ dependencies = [ "async-channel 1.9.0", "async-ssh2-lite", "bytes", - "clap 4.5.4", + "clap", "futures", "hydro_deploy", "hydroflow_cli_integration", @@ -1459,8 +1398,8 @@ version = "0.0.0" dependencies = [ "dashmap", "futures", - "hydroflow 0.6.2", - "hydroflow_datalog 0.6.0", + "hydroflow", + "hydroflow_datalog", "procinfo", "rand 0.8.5", "serde", @@ -1507,7 +1446,7 @@ dependencies = [ "byteorder", "bytes", "chrono", - "clap 4.5.4", + "clap", "colored", "core_affinity", "criterion", @@ -1516,14 +1455,14 @@ dependencies = [ "getrandom 0.2.11", "hdrhistogram", "hydroflow_cli_integration", - "hydroflow_datalog 0.6.0", - "hydroflow_lang 0.6.2", - "hydroflow_macro 0.6.0", + "hydroflow_datalog", + "hydroflow_lang", + "hydroflow_macro", "insta", "itertools", - "lattices 0.5.4", + "lattices", "multiplatform_test", - "pusherator 0.0.5", + "pusherator", "pyo3", "rand 0.8.5", "rand_distr", @@ -1544,45 +1483,12 @@ dependencies = [ "tracing", "tracing-subscriber", "trybuild", - "variadics 0.0.4", + "variadics", "wasm-bindgen-test", "web-time", "zipf", ] -[[package]] -name = "hydroflow" -version = "0.6.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cd6ac3719cf8c69dcbad71762cd0ae837768e5a8e24f14ec0bf808f4c720823c" -dependencies = [ - "bincode", - "byteorder", - "bytes", - "futures", - "getrandom 0.2.11", - "hydroflow_datalog 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", - "hydroflow_lang 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", - "hydroflow_macro 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", - "instant", - "itertools", - "lattices 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)", - "pusherator 0.0.5 (registry+https://github.com/rust-lang/crates.io-index)", - "ref-cast", - "regex", - "rustc-hash", - "sealed", - "serde", - "serde_json", - "slotmap", - "smallvec", - "tokio", - "tokio-stream", - "tokio-util", - "tracing", - "variadics 0.0.4 (registry+https://github.com/rust-lang/crates.io-index)", -] - [[package]] name = "hydroflow_cli_integration" version = "0.5.2" @@ -1603,20 +1509,7 @@ dependencies = [ name = "hydroflow_datalog" version = "0.7.0" dependencies = [ - "hydroflow_datalog_core 0.6.1", - "proc-macro-crate", - "proc-macro2", - "quote", - "syn 2.0.60", -] - -[[package]] -name = "hydroflow_datalog" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "156a1a8bd7b81f06707ceef009fe62f5f2a3d470d1edd9e2d1a56a8b46be526f" -dependencies = [ - "hydroflow_datalog_core 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", + "hydroflow_datalog_core", "proc-macro-crate", "proc-macro2", "quote", @@ -1627,62 +1520,25 @@ dependencies = [ name = "hydroflow_datalog_core" version = "0.7.0" dependencies = [ - "hydroflow_lang 0.6.2", + "hydroflow_lang", "insta", "prettyplease", "proc-macro-crate", "proc-macro2", "quote", - "rust-sitter 0.4.2", - "rust-sitter-tool 0.4.2", + "rust-sitter", + "rust-sitter-tool", "slotmap", "syn 2.0.60", "tempfile", ] -[[package]] -name = "hydroflow_datalog_core" -version = "0.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "52105d6dad9f92751d3352fdb4a615faceff8881b82cf1be029130baa9e34afa" -dependencies = [ - "hydroflow_lang 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", - "proc-macro-crate", - "proc-macro2", - "quote", - "rust-sitter 0.3.4", - "rust-sitter-tool 0.3.4", - "slotmap", - "syn 2.0.60", -] - [[package]] name = "hydroflow_lang" version = "0.7.0" dependencies = [ "auto_impl", - "clap 4.5.4", - "data-encoding", - "itertools", - "prettyplease", - "proc-macro2", - "quote", - "regex", - "serde", - "serde_json", - "slotmap", - "syn 2.0.60", - "webbrowser", -] - -[[package]] -name = "hydroflow_lang" -version = "0.6.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b07417fd6a912d4425bfb70032255d8b71a757ff7f27a3afe197cd1975a05857" -dependencies = [ - "auto_impl", - "clap 4.5.4", + "clap", "data-encoding", "itertools", "prettyplease", @@ -1700,21 +1556,7 @@ dependencies = [ name = "hydroflow_macro" version = "0.7.0" dependencies = [ - "hydroflow_lang 0.6.2", - "itertools", - "proc-macro-crate", - "proc-macro2", - "quote", - "syn 2.0.60", -] - -[[package]] -name = "hydroflow_macro" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "07a29a1a755c4f97d8f394430c1ea2e183d7341905a58ad667297f4e531e7b9b" -dependencies = [ - "hydroflow_lang 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", + "hydroflow_lang", "itertools", "proc-macro-crate", "proc-macro2", @@ -1728,8 +1570,8 @@ version = "0.7.0" dependencies = [ "bincode", "dyn-clone", - "hydroflow 0.6.2", - "hydroflow_lang 0.6.2", + "hydroflow", + "hydroflow_lang", "insta", "proc-macro-crate", "proc-macro2", @@ -1817,16 +1659,6 @@ dependencies = [ "unicode-normalization", ] -[[package]] -name = "indexmap" -version = "1.9.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd070e393353796e801d209ad339e89596eb4c8d430d18ede6a1cced8fafbd99" -dependencies = [ - "autocfg", - "hashbrown 0.12.3", -] - [[package]] name = "indexmap" version = "2.2.6" @@ -1834,7 +1666,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "168fb715dda47215e360912c096649d23d58bf392ac62f73919e831745e40f26" dependencies = [ "equivalent", - "hashbrown 0.14.3", + "hashbrown", ] [[package]] @@ -1876,9 +1708,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7a5bbe824c507c5da5956355e86a746d82e0e1464f65d862cc5e71da70e94b2c" dependencies = [ "cfg-if 1.0.0", - "js-sys", - "wasm-bindgen", - "web-sys", ] [[package]] @@ -1887,7 +1716,7 @@ version = "1.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "eae7b9aee968036d54dce06cebaefd919e4472e753296daccd6d344e3e2df0c2" dependencies = [ - "hermit-abi 0.3.3", + "hermit-abi", "libc", "windows-sys 0.48.0", ] @@ -1898,7 +1727,7 @@ version = "0.4.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cb0889898416213fab133e1d33a0e5858a48177452750691bde3666d0fdbaf8b" dependencies = [ - "hermit-abi 0.3.3", + "hermit-abi", "rustix 0.38.32", "windows-sys 0.48.0", ] @@ -1968,17 +1797,6 @@ dependencies = [ "serde", ] -[[package]] -name = "lattices" -version = "0.5.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9137f72966a5066356053b1f2fe5f2a11bb699c93f21b5f908b29e47fbf206a8" -dependencies = [ - "cc-traits", - "sealed", - "serde", -] - [[package]] name = "lazy_static" version = "1.4.0" @@ -1991,16 +1809,6 @@ version = "0.2.153" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9c198f91728a82281a64e1f4f9eeb25d82cb32a5de251c6bd1b5154d63a8e7bd" -[[package]] -name = "libloading" -version = "0.7.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b67380fd3b2fbe7527a606e18729d21c6f3951633d0500574c4dc22d2d638b9f" -dependencies = [ - "cfg-if 1.0.0", - "winapi 0.3.9", -] - [[package]] name = "libloading" version = "0.8.3" @@ -2257,7 +2065,7 @@ version = "1.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4161fcb6d602d4d2081af7c3a45852d875a03dd337a6bfdd6e06407b61342a43" dependencies = [ - "hermit-abi 0.3.3", + "hermit-abi", "libc", ] @@ -2592,17 +2400,7 @@ name = "pusherator" version = "0.0.6" dependencies = [ "either", - "variadics 0.0.4", -] - -[[package]] -name = "pusherator" -version = "0.0.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2c1cf2ea1a7a4410d46386e89e99e33456098abe938d4370a9f8e358cd0ed882" -dependencies = [ - "either", - "variadics 0.0.4 (registry+https://github.com/rust-lang/crates.io-index)", + "variadics", ] [[package]] @@ -2918,41 +2716,21 @@ version = "0.0.0" dependencies = [ "anyhow", "datadriven", - "hydroflow 0.6.2", + "hydroflow", "prettyplease", "proc-macro2", "quote", "syn 2.0.60", ] -[[package]] -name = "rust-sitter" -version = "0.3.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a0f365b4eb9591dd3e685791389a932041b0dc6ccf5db1ec3d8913f67279365" -dependencies = [ - "rust-sitter-macro 0.3.4", - "tree-sitter-c2rust 0.20.10", -] - [[package]] name = "rust-sitter" version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f69b9a5d53b74db5166799a0024c2849e144c652dd6253c5bf58dfe086798cbc" dependencies = [ - "rust-sitter-macro 0.4.2", - "tree-sitter-c2rust 0.22.5", -] - -[[package]] -name = "rust-sitter-common" -version = "0.3.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3c0a0b1da7317031274502b7c52cbb7cf529e7d1e1f3e23876519372b173a94" -dependencies = [ - "quote", - "syn 1.0.109", + "rust-sitter-macro", + "tree-sitter-c2rust", ] [[package]] @@ -2965,18 +2743,6 @@ dependencies = [ "syn 1.0.109", ] -[[package]] -name = "rust-sitter-macro" -version = "0.3.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d25e213e40efa00713547cc0f3529694aca547cfceb0839bbc9406632e14d410" -dependencies = [ - "proc-macro2", - "quote", - "rust-sitter-common 0.3.4", - "syn 1.0.109", -] - [[package]] name = "rust-sitter-macro" version = "0.4.2" @@ -2985,27 +2751,10 @@ checksum = "8238447de92f7104ddbda8b5fd38a9be055229373283ef42b774b340d8117def" dependencies = [ "proc-macro2", "quote", - "rust-sitter-common 0.4.2", + "rust-sitter-common", "syn 1.0.109", ] -[[package]] -name = "rust-sitter-tool" -version = "0.3.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "803c6596476a188a4dd18106eb927a926a202e00077cdaa5648dd620262af158" -dependencies = [ - "cc", - "rust-sitter-common 0.3.4", - "serde", - "serde_json", - "syn 1.0.109", - "syn-inline-mod 0.5.0", - "tempfile", - "tree-sitter 0.20.10", - "tree-sitter-cli 0.20.8", -] - [[package]] name = "rust-sitter-tool" version = "0.4.2" @@ -3013,14 +2762,14 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b840052f42d08fb67d13f68b72f1c41f99865d83239f4edff8fa1c6fd6fa0a12" dependencies = [ "cc", - "rust-sitter-common 0.4.2", + "rust-sitter-common", "serde", "serde_json", "syn 1.0.109", "syn-inline-mod 0.5.0", "tempfile", - "tree-sitter 0.22.5", - "tree-sitter-cli 0.22.5", + "tree-sitter", + "tree-sitter-cli", ] [[package]] @@ -3177,7 +2926,7 @@ version = "1.0.116" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3e17db7126d17feb94eb3fad46bf1a96b034e8aacbc2e775fe81505f8b0b2813" dependencies = [ - "indexmap 2.2.6", + "indexmap", "itoa", "ryu", "serde", @@ -3370,12 +3119,6 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" -[[package]] -name = "strsim" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ea5119cdb4c55b55d432abb513a0429384878c15dde60cc77b1c99de1a95a6a" - [[package]] name = "strsim" version = "0.11.1" @@ -3473,15 +3216,6 @@ dependencies = [ "rand 0.7.3", ] -[[package]] -name = "textwrap" -version = "0.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d326610f408c7a4eb6f51c37c330e496b08506c9457c9d34287ecc38809fb060" -dependencies = [ - "unicode-width", -] - [[package]] name = "thiserror" version = "1.0.58" @@ -3693,15 +3427,6 @@ dependencies = [ "tracing", ] -[[package]] -name = "toml" -version = "0.5.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f4f7f0dd8d50a853a531c426359045b1998f04219d88799810762cd4ad314234" -dependencies = [ - "serde", -] - [[package]] name = "toml_datetime" version = "0.6.5" @@ -3714,7 +3439,7 @@ version = "0.19.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1b5bb770da30e5cbfde35a2d7b9b8a2c4b8ef89548a7a6aeab5c9a576e3e7421" dependencies = [ - "indexmap 2.2.6", + "indexmap", "toml_datetime", "winnow", ] @@ -3725,8 +3450,8 @@ version = "0.0.0" dependencies = [ "dashmap", "futures", - "hydroflow 0.6.2", - "hydroflow_datalog 0.6.0", + "hydroflow", + "hydroflow_datalog", "procinfo", "rand 0.8.5", "serde", @@ -3795,16 +3520,6 @@ dependencies = [ "tracing-log", ] -[[package]] -name = "tree-sitter" -version = "0.20.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e747b1f9b7b931ed39a548c1fae149101497de3c1fc8d9e18c62c1a66c683d3d" -dependencies = [ - "cc", - "regex", -] - [[package]] name = "tree-sitter" version = "0.22.5" @@ -3815,17 +3530,6 @@ dependencies = [ "regex", ] -[[package]] -name = "tree-sitter-c2rust" -version = "0.20.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee40a4d9cf5a30c199935f346887588239daceae4d1418d81b789276fffb8d91" -dependencies = [ - "c2rust-bitfields", - "once_cell", - "regex", -] - [[package]] name = "tree-sitter-c2rust" version = "0.22.5" @@ -3837,42 +3541,6 @@ dependencies = [ "regex", ] -[[package]] -name = "tree-sitter-cli" -version = "0.20.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae7e9d844d4d38e511a7b93fe8ced79f2a364c32fdea10d04546f1c8317d5a0c" -dependencies = [ - "ansi_term", - "anyhow", - "atty", - "clap 2.34.0", - "difference", - "dirs 3.0.2", - "glob", - "html-escape", - "indexmap 1.9.3", - "lazy_static", - "log", - "regex", - "regex-syntax 0.6.29", - "rustc-hash", - "semver 1.0.22", - "serde", - "serde_json", - "smallbitvec", - "tiny_http", - "toml", - "tree-sitter 0.20.10", - "tree-sitter-config 0.19.0", - "tree-sitter-highlight 0.20.1", - "tree-sitter-loader 0.20.0", - "tree-sitter-tags 0.20.2", - "walkdir", - "webbrowser", - "which", -] - [[package]] name = "tree-sitter-cli" version = "0.22.5" @@ -3882,15 +3550,15 @@ dependencies = [ "ansi_term", "anstyle", "anyhow", - "clap 4.5.4", + "clap", "ctrlc", "difference", - "dirs 5.0.1", + "dirs", "filetime", "glob", "heck 0.5.0", "html-escape", - "indexmap 2.2.6", + "indexmap", "indoc", "lazy_static", "log", @@ -3904,28 +3572,16 @@ dependencies = [ "serde_json", "smallbitvec", "tiny_http", - "tree-sitter 0.22.5", - "tree-sitter-config 0.22.5", - "tree-sitter-highlight 0.22.5", - "tree-sitter-loader 0.22.5", - "tree-sitter-tags 0.22.5", + "tree-sitter", + "tree-sitter-config", + "tree-sitter-highlight", + "tree-sitter-loader", + "tree-sitter-tags", "walkdir", "wasmparser", "webbrowser", ] -[[package]] -name = "tree-sitter-config" -version = "0.19.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f5fec4cb27f052ead2246631b332dba0cb6af9a54ce012badee59c4b0ded5e03" -dependencies = [ - "anyhow", - "dirs 3.0.2", - "serde", - "serde_json", -] - [[package]] name = "tree-sitter-config" version = "0.22.5" @@ -3933,22 +3589,11 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a7a8030ede22ade2ba5d7fe2cd0fb822086003f6dd47e8f408c6228ccd7792a4" dependencies = [ "anyhow", - "dirs 5.0.1", + "dirs", "serde", "serde_json", ] -[[package]] -name = "tree-sitter-highlight" -version = "0.20.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "042342584c5a7a0b833d9fc4e2bdab3f9868ddc6c4b339a1e01451c6720868bc" -dependencies = [ - "regex", - "thiserror", - "tree-sitter 0.20.10", -] - [[package]] name = "tree-sitter-highlight" version = "0.22.5" @@ -3958,26 +3603,7 @@ dependencies = [ "lazy_static", "regex", "thiserror", - "tree-sitter 0.22.5", -] - -[[package]] -name = "tree-sitter-loader" -version = "0.20.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d0b17eef4833c7c139abed66d562dfa23228e97e647597baf246fd56c21bbfaf" -dependencies = [ - "anyhow", - "cc", - "dirs 3.0.2", - "libloading 0.7.4", - "once_cell", - "regex", - "serde", - "serde_json", - "tree-sitter 0.20.10", - "tree-sitter-highlight 0.20.1", - "tree-sitter-tags 0.20.2", + "tree-sitter", ] [[package]] @@ -3988,30 +3614,18 @@ checksum = "e4c7608bfbd6acc9ebbd33ce217a76e9dcec7aa51298fa0a62640fc6d20d6813" dependencies = [ "anyhow", "cc", - "dirs 5.0.1", + "dirs", "fs4", "indoc", - "libloading 0.8.3", + "libloading", "once_cell", "regex", "serde", "serde_json", "tempfile", - "tree-sitter 0.22.5", - "tree-sitter-highlight 0.22.5", - "tree-sitter-tags 0.22.5", -] - -[[package]] -name = "tree-sitter-tags" -version = "0.20.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ccb3f1376219530a37a809751ecf65aa35fd8b9c1c4ab6d4faf5f6a9eeda2c05" -dependencies = [ - "memchr", - "regex", - "thiserror", - "tree-sitter 0.20.10", + "tree-sitter", + "tree-sitter-highlight", + "tree-sitter-tags", ] [[package]] @@ -4023,7 +3637,7 @@ dependencies = [ "memchr", "regex", "thiserror", - "tree-sitter 0.22.5", + "tree-sitter", ] [[package]] @@ -4148,27 +3762,12 @@ dependencies = [ "trybuild", ] -[[package]] -name = "variadics" -version = "0.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b71419b74d712d041a7b119b8ef8e716d625ea4a2e62a3d56a3347e64c677f0c" -dependencies = [ - "sealed", -] - [[package]] name = "vcpkg" version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426" -[[package]] -name = "vec_map" -version = "0.8.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1bddf1187be692e79c5ffeab891132dfb0f236ed36a43c7ed39f1165ee20191" - [[package]] name = "version_check" version = "0.9.4" @@ -4301,7 +3900,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "84e5df6dba6c0d7fafc63a450f1738451ed7a0b52295d83e868218fa286bf708" dependencies = [ "bitflags 2.4.1", - "indexmap 2.2.6", + "indexmap", "semver 1.0.22", ] @@ -4348,9 +3947,9 @@ version = "0.0.0" dependencies = [ "console_error_panic_hook", "futures", - "hydroflow 0.6.2", - "hydroflow_datalog_core 0.6.1", - "hydroflow_lang 0.6.2", + "hydroflow", + "hydroflow_datalog_core", + "hydroflow_lang", "prettyplease", "proc-macro2", "quote", @@ -4376,18 +3975,6 @@ dependencies = [ "winapi 0.3.9", ] -[[package]] -name = "which" -version = "4.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87ba24419a2078cd2b0f2ede2691b6c66d8e47836da3b6db8265ebad47afbfc7" -dependencies = [ - "either", - "home", - "once_cell", - "rustix 0.38.32", -] - [[package]] name = "winapi" version = "0.2.8" diff --git a/datastores/gossip_kv/Cargo.toml b/datastores/gossip_kv/Cargo.toml index 9a1216098c5c..298b1ce9016c 100644 --- a/datastores/gossip_kv/Cargo.toml +++ b/datastores/gossip_kv/Cargo.toml @@ -9,13 +9,9 @@ publish = false [dependencies] clap = { version = "4.5.4", features = ["derive"] } serde = { version = "1.0.198", features = ["derive"] } -hydroflow = { version = "0.6.2"} +hydroflow = { path="../../hydroflow" } hostname = "0.4.0" -[lib] -name = "gossip_kv" -path = "src/lib.rs" - [[bin]] name = "gossip_server" -path = "examples/server/main.rs" +path = "server/main.rs" diff --git a/datastores/gossip_kv/examples/server/main.rs b/datastores/gossip_kv/examples/server/main.rs deleted file mode 100644 index efe2d460e531..000000000000 --- a/datastores/gossip_kv/examples/server/main.rs +++ /dev/null @@ -1,25 +0,0 @@ -use hydroflow::util::bind_tcp_lines; -use hydroflow::{hydroflow_syntax, tokio}; - -#[hydroflow::main] -async fn main() { - // Start admin port - - let my_hostname = hostname::get().unwrap(); - - let (tx, rx, server_addr) = bind_tcp_lines("0.0.0.0:80".parse().unwrap()).await; - - println!("Starting admin server"); - - let mut echo_server = hydroflow_syntax! { - source_stream(rx) - -> filter_map(Result::ok) - -> inspect(|(msg, addr)| { println!("Received {:?} from {:?}", msg, addr)} ) - -> map(|(msg, addr)| { (format!("Echo from: {:?}: {:?}", my_hostname, msg), addr) }) - -> dest_sink(tx); - }; - - println!("Admin server running on {:?}", server_addr); - - echo_server.run_async().await; -} diff --git a/datastores/gossip_kv/examples/server/Dockerfile b/datastores/gossip_kv/server/Dockerfile similarity index 100% rename from datastores/gossip_kv/examples/server/Dockerfile rename to datastores/gossip_kv/server/Dockerfile diff --git a/datastores/gossip_kv/examples/server/README.md b/datastores/gossip_kv/server/README.md similarity index 100% rename from datastores/gossip_kv/examples/server/README.md rename to datastores/gossip_kv/server/README.md diff --git a/datastores/gossip_kv/examples/server/baseimage.Dockerfile b/datastores/gossip_kv/server/baseimage.Dockerfile similarity index 100% rename from datastores/gossip_kv/examples/server/baseimage.Dockerfile rename to datastores/gossip_kv/server/baseimage.Dockerfile diff --git a/datastores/gossip_kv/examples/server/deployment/local/deployment.yaml b/datastores/gossip_kv/server/deployment/local/deployment.yaml similarity index 100% rename from datastores/gossip_kv/examples/server/deployment/local/deployment.yaml rename to datastores/gossip_kv/server/deployment/local/deployment.yaml diff --git a/datastores/gossip_kv/examples/server/deployment/local/service.yaml b/datastores/gossip_kv/server/deployment/local/service.yaml similarity index 100% rename from datastores/gossip_kv/examples/server/deployment/local/service.yaml rename to datastores/gossip_kv/server/deployment/local/service.yaml diff --git a/datastores/gossip_kv/examples/server/deployment/patch.yaml b/datastores/gossip_kv/server/deployment/patch.yaml similarity index 100% rename from datastores/gossip_kv/examples/server/deployment/patch.yaml rename to datastores/gossip_kv/server/deployment/patch.yaml diff --git a/datastores/gossip_kv/server/main.rs b/datastores/gossip_kv/server/main.rs new file mode 100644 index 000000000000..80c045d83200 --- /dev/null +++ b/datastores/gossip_kv/server/main.rs @@ -0,0 +1,17 @@ +use std::time::Duration; + +use hydroflow::{hydroflow_syntax, tokio}; + +#[allow(dead_code)] +mod model; + +#[hydroflow::main] +async fn main() { + let mut server = hydroflow_syntax! { + + source_interval(Duration::from_secs(5)) -> for_each(|_| println!("Coming soon!")); + + }; + + server.run_async().await; +} diff --git a/datastores/gossip_kv/server/model.rs b/datastores/gossip_kv/server/model.rs new file mode 100644 index 000000000000..758ebd3937f3 --- /dev/null +++ b/datastores/gossip_kv/server/model.rs @@ -0,0 +1,125 @@ +use hydroflow::lattices::map_union::MapUnionHashMap; +use hydroflow::lattices::set_union::SetUnionHashSet; +use hydroflow::lattices::{DomPair, Max}; + +/// Primary key for entries in a table. +pub type RowKey = String; + +/// Value stored in a table. Modelled as a timestamped set of strings. +/// +/// Each value is timestamped with the time at which it was last updated. Concurrent updates at +/// the same timestamp are stored as a set. +pub type RowValue = DomPair>; + +/// A map from row keys to values in a table. +pub type Table = MapUnionHashMap>; + +/// Name of a table in the data store. +pub type TableName = String; + +/// A map from table names to tables. +pub type TableMap = MapUnionHashMap>; + +/// Timestamps used in the model. +// TODO: This will be updated to use a more sophisticated clock type with https://github.com/hydro-project/hydroflow/issues/1207. +pub type Clock = Max; + +/// TableMap element to upsert a row in an existing TableMap. +/// +/// Merge this into an existing TableMap to upsert a row in a table. If the table does not exist, +/// it gets created. There's no explicit "create table" operation. +/// +/// Parameters: +/// - `row_ts`: New timestamp of the row being upserted. +/// - `table_name`: Name of the table. +/// - `key`: Primary key of the row. +/// - `val`: Row value. +pub fn upsert_row(row_ts: C, table_name: TableName, key: RowKey, val: String) -> TableMap { + let value: RowValue = RowValue::new_from(row_ts, SetUnionHashSet::new_from([val])); + let row: Table = Table::new_from([(key, value)]); + TableMap::new_from([(table_name, row)]) +} + +/// TableMap element to delete a row from an existing TableMap. +/// +/// Merge this into an existing TableMap to delete a row from a table. +/// +/// Parameters: +/// - `row_ts`: New timestamp of the row being deleted. +/// - `table_name`: Name of the table. +/// - `key`: Primary key of the row. +pub fn delete_row(row_ts: C, table_name: TableName, key: RowKey) -> TableMap { + let value: RowValue = RowValue::new_from(row_ts, SetUnionHashSet::new_from([])); + let row: Table = Table::new_from([(key, value)]); + TableMap::new_from([(table_name, row)]) +} + +#[cfg(test)] +mod tests { + use std::collections::HashSet; + + use hydroflow::lattices::map_union::MapUnionHashMap; + use hydroflow::lattices::Merge; + + use crate::model::{delete_row, upsert_row, Clock, RowKey, TableMap, TableName}; + + #[test] + fn test_table_map() { + let mut table_map: TableMap = MapUnionHashMap::default(); + + let first_tick: Clock = Clock::new(0); + let second_tick: Clock = Clock::new(1); + + let members_table = TableName::from("members"); + let key_1 = RowKey::from("key1"); + let value_1: String = "value1".to_string(); + + // Table starts out empty. + assert_eq!(table_map.as_reveal_ref().len(), 0, "Expected empty table."); + + let insert = upsert_row( + first_tick, + members_table.clone(), + key_1.clone(), + value_1.clone(), + ); + Merge::merge(&mut table_map, insert); + { + let table = table_map.as_reveal_ref().get(&members_table).unwrap(); + + let row = table.as_reveal_ref().get(&key_1); + assert!(row.is_some(), "Row should exist"); + assert_eq!( + *row.unwrap().as_reveal_ref().0, + first_tick, + "Unexpected row timestamp" + ); + + let value = row.unwrap().as_reveal_ref().1.as_reveal_ref(); + assert_eq!( + value, + &HashSet::from([value_1.to_string()]), + "Unexpected row value" + ); + } + + let delete_row = delete_row(second_tick, members_table.clone(), key_1.to_string()); + Merge::merge(&mut table_map, delete_row); + { + let table = table_map.as_reveal_ref().get(&members_table).unwrap(); + + // Deletion in this case leaves a "tombstone" + let row = table.as_reveal_ref().get(&key_1); + + assert!(row.is_some(), "Row should exist"); + assert_eq!( + *row.unwrap().as_reveal_ref().0, + second_tick, + "Unexpected row timestamp" + ); + + let value = row.unwrap().as_reveal_ref().1.as_reveal_ref(); + assert_eq!(value, &HashSet::from([]), "Row should be empty"); + } + } +} diff --git a/datastores/gossip_kv/src/lib.rs b/datastores/gossip_kv/src/lib.rs deleted file mode 100644 index b4a2a9e5dd8d..000000000000 --- a/datastores/gossip_kv/src/lib.rs +++ /dev/null @@ -1,3 +0,0 @@ -pub fn add(a: i32, b: i32) -> i32 { - a + b -}