From e03a16d13e9bc1423e1251f187f317e86cbe2ad7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bianca=20F=C3=BCrstenau?= Date: Fri, 21 Feb 2025 22:19:51 +0100 Subject: [PATCH] Minimal Leptos setup --- .gitignore | 4 + Cargo.lock | 1282 +++++++++++++++++---- Cargo.toml | 39 +- Trunk.toml | 9 + build.rs | 6 +- {www/assets => font}/hessen_sagt_nein.otf | Bin {www/assets => img}/aldi.svg | 0 {www/assets => img}/angel.svg | 0 {www/assets => img}/cafe.svg | 0 {www/assets => img}/cash.svg | 0 {www/assets => img}/dm.svg | 0 {www/assets => img}/edeka.svg | 0 icon.svg => img/icon.svg | 0 {www/assets => img}/lidl.svg | 0 {www/assets => img}/rewe.svg | 0 {www/assets => img}/tegut.svg | 0 src/bin/leptos.rs | 5 + src/{main.rs => bin/tauri.rs} | 0 src/commands.rs | 7 +- src/lib.rs | 202 +--- src/{ => server}/app_state.rs | 0 src/{ => server}/data_door.rs | 2 +- src/{ => server}/isrg-root-x1.pem | 0 src/server/mod.rs | 200 ++++ www/styles.css => styles.scss | 0 tauri.conf.json | 6 +- trunk.html | 12 + www/index.html | 188 --- www/main.js | 67 -- 29 files changed, 1345 insertions(+), 684 deletions(-) create mode 100644 Trunk.toml rename {www/assets => font}/hessen_sagt_nein.otf (100%) rename {www/assets => img}/aldi.svg (100%) rename {www/assets => img}/angel.svg (100%) rename {www/assets => img}/cafe.svg (100%) rename {www/assets => img}/cash.svg (100%) rename {www/assets => img}/dm.svg (100%) rename {www/assets => img}/edeka.svg (100%) rename icon.svg => img/icon.svg (100%) rename {www/assets => img}/lidl.svg (100%) rename {www/assets => img}/rewe.svg (100%) rename {www/assets => img}/tegut.svg (100%) create mode 100644 src/bin/leptos.rs rename src/{main.rs => bin/tauri.rs} (100%) rename src/{ => server}/app_state.rs (100%) rename src/{ => server}/data_door.rs (98%) rename src/{ => server}/isrg-root-x1.pem (100%) create mode 100644 src/server/mod.rs rename www/styles.css => styles.scss (100%) create mode 100644 trunk.html delete mode 100644 www/index.html delete mode 100644 www/main.js diff --git a/.gitignore b/.gitignore index 602df2d..cc1a33d 100644 --- a/.gitignore +++ b/.gitignore @@ -9,3 +9,7 @@ gen/ # Generated by `cargo tauri icon` # will have various versions of the app icon icons/ + +# Generated by Trunk +# will have the files to be served over http +www/ diff --git a/Cargo.lock b/Cargo.lock index de948fa..9db229b 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -67,10 +67,21 @@ dependencies = [ ] [[package]] -name = "anyhow" -version = "1.0.95" +name = "any_spawner" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34ac096ce696dc2fcabef30516bb13c0a68a11d30131d3df6f04711467681b04" +checksum = "41058deaa38c9d9dd933d6d238d825227cffa668e2839b52879f6619c63eee3b" +dependencies = [ + "futures", + "thiserror 2.0.11", + "wasm-bindgen-futures", +] + +[[package]] +name = "anyhow" +version = "1.0.96" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6b964d184e89d9b6b67dd2715bc8e74cf3107fb2b529990c90cf517326150bf4" [[package]] name = "async-broadcast" @@ -244,6 +255,36 @@ version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0" +[[package]] +name = "attribute-derive" +version = "0.10.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0053e96dd3bec5b4879c23a138d6ef26f2cb936c9cdc96274ac2b9ed44b5bb54" +dependencies = [ + "attribute-derive-macro", + "derive-where", + "manyhow", + "proc-macro2", + "quote", + "syn 2.0.98", +] + +[[package]] +name = "attribute-derive-macro" +version = "0.10.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "463b53ad0fd5b460af4b1915fe045ff4d946d025fb6c4dc3337752eaa980f71b" +dependencies = [ + "collection_literals", + "interpolator", + "manyhow", + "proc-macro-utils", + "proc-macro2", + "quote", + "quote-use", + "syn 2.0.98", +] + [[package]] name = "autocfg" version = "1.4.0" @@ -310,6 +351,7 @@ version = "0.1.0" dependencies = [ "chrono", "curl", + "leptos", "openssl", "rand 0.8.5", "ring-compat", @@ -320,6 +362,7 @@ dependencies = [ "tauri-build", "tauri-plugin-fs", "tauri-plugin-opener", + "tauri-sys", "tokio", ] @@ -344,7 +387,16 @@ version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2c132eebf10f5cad5289222520a4a058514204aed6d791f1cf4fe8088b82d15f" dependencies = [ - "objc2", + "objc2 0.5.2", +] + +[[package]] +name = "block2" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d59b4c170e16f0405a2e95aff44432a0d41aa97675f3d52623effe95792a037" +dependencies = [ + "objc2 0.6.0", ] [[package]] @@ -477,9 +529,9 @@ dependencies = [ [[package]] name = "cc" -version = "1.2.13" +version = "1.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c7777341816418c02e033934a09f20dc0ccaf65a5201ef8a450ae0105a573fda" +checksum = "c736e259eea577f443d5c86c304f9f4ae0295c43f3ba05c21f1d66b5f06001af" dependencies = [ "shlex", ] @@ -568,6 +620,23 @@ dependencies = [ "objc", ] +[[package]] +name = "codee" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0f18d705321923b1a9358e3fc3c57c3b50171196827fc7f5f10b053242aca627" +dependencies = [ + "serde", + "serde_json", + "thiserror 2.0.11", +] + +[[package]] +name = "collection_literals" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "186dce98367766de751c42c4f03970fc60fc012296e706ccbb9d5df9b6c1e271" + [[package]] name = "combine" version = "4.6.7" @@ -587,18 +656,66 @@ dependencies = [ "crossbeam-utils", ] +[[package]] +name = "config" +version = "0.14.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "68578f196d2a33ff61b27fae256c3164f65e36382648e30666dde05b8cc9dfdf" +dependencies = [ + "convert_case 0.6.0", + "nom", + "pathdiff", + "serde", + "toml 0.8.20", +] + [[package]] name = "const-oid" version = "0.9.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c2459377285ad874054d797f3ccebf984978aa39129f6eafde5cdc8315b612f8" +[[package]] +name = "const_format" +version = "0.2.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "126f97965c8ad46d6d9163268ff28432e8f6a1196a55578867832e3049df63dd" +dependencies = [ + "const_format_proc_macros", +] + +[[package]] +name = "const_format_proc_macros" +version = "0.2.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d57c2eccfb16dbac1f4e61e206105db5820c9d26c3c472bc17c774259ef7744" +dependencies = [ + "proc-macro2", + "quote", + "unicode-xid", +] + +[[package]] +name = "const_str_slice_concat" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f67855af358fcb20fac58f9d714c94e2b228fe5694c1c9b4ead4a366343eda1b" + [[package]] name = "convert_case" version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6245d59a3e82a7fc217c5828a6692dbc6dfb63a0c8c90495621f7b9d79704a0e" +[[package]] +name = "convert_case" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec182b0ca2f35d8fc196cf3404988fd8b8c739a4d270ff118a398feb0cbec1ca" +dependencies = [ + "unicode-segmentation", +] + [[package]] name = "cookie" version = "0.18.1" @@ -758,9 +875,9 @@ dependencies = [ [[package]] name = "curl-sys" -version = "0.4.78+curl-8.11.0" +version = "0.4.80+curl-8.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8eec768341c5c7789611ae51cf6c459099f22e64a5d5d0ce4892434e33821eaf" +checksum = "55f7df2eac63200c3ab25bde3b2268ef2ee56af3d238e76d61f01c3c49bff734" dependencies = [ "cc", "libc", @@ -806,6 +923,20 @@ dependencies = [ "syn 2.0.98", ] +[[package]] +name = "dashmap" +version = "6.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5041cc499144891f3790297212f32a74fb938e5136a14943f338ef9e0ae276cf" +dependencies = [ + "cfg-if", + "crossbeam-utils", + "hashbrown 0.14.5", + "lock_api", + "once_cell", + "parking_lot_core", +] + [[package]] name = "der" version = "0.7.9" @@ -826,13 +957,24 @@ dependencies = [ "serde", ] +[[package]] +name = "derive-where" +version = "1.2.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "62d671cc41a825ebabc75757b62d3d168c577f9149b2d49ece1dad1f72119d25" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.98", +] + [[package]] name = "derive_more" version = "0.99.19" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3da29a38df43d6f156149c9b43ded5e018ddff2a855cf2cfd62e8cd7d079c69f" dependencies = [ - "convert_case", + "convert_case 0.4.0", "proc-macro2", "quote", "rustc_version", @@ -940,6 +1082,12 @@ dependencies = [ "serde", ] +[[package]] +name = "drain_filter_polyfill" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "669a445ee724c5c69b1b06fe0b63e70a1c84bc9bb7d9696cd4f4e3ec45050408" + [[package]] name = "dtoa" version = "1.0.9" @@ -988,6 +1136,22 @@ dependencies = [ "signature", ] +[[package]] +name = "either" +version = "1.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "60b1af1c220855b6ceac025d3f6ecdd2b7c4894bfe9cd9bda4fbb4bc7c0d4cf0" + +[[package]] +name = "either_of" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "169ae1dd00fb612cf27fd069b3b10f325ea60ac551f08e5b931b4413972a847d" +dependencies = [ + "paste", + "pin-project-lite", +] + [[package]] name = "elliptic-curve" version = "0.13.8" @@ -1055,9 +1219,9 @@ dependencies = [ [[package]] name = "equivalent" -version = "1.0.1" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" +checksum = "877a4ace8713b0bcf2a4e7eec82529c029f1d0619886d18145fea96c3ffe5c0f" [[package]] name = "erased-serde" @@ -1230,6 +1394,21 @@ dependencies = [ "new_debug_unreachable", ] +[[package]] +name = "futures" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "65bc07b1a8bc7c85c5f2e110c476c7389b4554ba72af57d8445ea63a576b0876" +dependencies = [ + "futures-channel", + "futures-core", + "futures-executor", + "futures-io", + "futures-sink", + "futures-task", + "futures-util", +] + [[package]] name = "futures-channel" version = "0.3.31" @@ -1237,6 +1416,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2dff15bf788c671c1934e366d07e30c1814a8ef514e1af724a602e8a2fbe1b10" dependencies = [ "futures-core", + "futures-sink", ] [[package]] @@ -1254,6 +1434,7 @@ dependencies = [ "futures-core", "futures-task", "futures-util", + "num_cpus", ] [[package]] @@ -1304,6 +1485,7 @@ version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9fa08315bb612088cc391249efdc3bc77536f16c91f6cf495e6fbe85b20a4a81" dependencies = [ + "futures-channel", "futures-core", "futures-io", "futures-macro", @@ -1561,6 +1743,40 @@ version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a8d1add55171497b4705a648c6b583acafb01d58050a51727785f0b2c8e0a2b2" +[[package]] +name = "gloo-net" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c06f627b1a58ca3d42b45d6104bf1e1a03799df472df00988b6ba21accc10580" +dependencies = [ + "futures-channel", + "futures-core", + "futures-sink", + "gloo-utils", + "http", + "js-sys", + "pin-project", + "serde", + "serde_json", + "thiserror 1.0.69", + "wasm-bindgen", + "wasm-bindgen-futures", + "web-sys", +] + +[[package]] +name = "gloo-utils" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b5555354113b18c547c1d3a98fbf7fb32a9ff4f6fa112ce823a21641a0ba3aa" +dependencies = [ + "js-sys", + "serde", + "serde_json", + "wasm-bindgen", + "web-sys", +] + [[package]] name = "gobject-sys" version = "0.18.0" @@ -1635,12 +1851,24 @@ dependencies = [ "syn 2.0.98", ] +[[package]] +name = "guardian" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "17e2ac29387b1aa07a1e448f7bb4f35b500787971e965b02842b900afa5c8f6f" + [[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.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1" + [[package]] name = "hashbrown" version = "0.15.2" @@ -1671,6 +1899,12 @@ version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" +[[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" @@ -1683,6 +1917,15 @@ version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" +[[package]] +name = "html-escape" +version = "0.2.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6d1ad449764d627e22bfd7cd5e8868264fc9236e07c752972b4080cd351cb476" +dependencies = [ + "utf8-width", +] + [[package]] name = "html5ever" version = "0.26.0" @@ -1737,6 +1980,22 @@ version = "1.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f2d708df4e7140240a16cd6ab0ab65c972d7433ab77819ea693fde9c43811e2a" +[[package]] +name = "hydration_context" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d35485b3dcbf7e044b8f28c73f04f13e7b509c2466fd10cb2a8a447e38f8a93a" +dependencies = [ + "futures", + "js-sys", + "once_cell", + "or_poisoned", + "pin-project-lite", + "serde", + "throw_error", + "wasm-bindgen", +] + [[package]] name = "hyper" version = "1.6.0" @@ -2002,6 +2261,21 @@ dependencies = [ "cfb", ] +[[package]] +name = "interpolator" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "71dd52191aae121e8611f1e8dc3e324dd0dd1dee1e6dd91d10ee07a3cfb4d9d8" + +[[package]] +name = "inventory" +version = "0.3.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "54b12ebb6799019b044deaf431eadfe23245b259bba5a2c0796acec3943a3cdb" +dependencies = [ + "rustversion", +] + [[package]] name = "ipnet" version = "2.11.0" @@ -2027,6 +2301,15 @@ dependencies = [ "once_cell", ] +[[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 = "0.4.8" @@ -2146,6 +2429,129 @@ version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" +[[package]] +name = "leptos" +version = "0.7.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "88613d81f70f4e267473b2ee107e1ee70cf765a3c3dfee945929c8e9c520b957" +dependencies = [ + "any_spawner", + "cfg-if", + "either_of", + "futures", + "hydration_context", + "leptos_config", + "leptos_dom", + "leptos_hot_reload", + "leptos_macro", + "leptos_server", + "oco_ref", + "or_poisoned", + "paste", + "reactive_graph", + "rustc-hash", + "send_wrapper", + "serde", + "serde_qs", + "server_fn", + "slotmap", + "tachys", + "thiserror 2.0.11", + "throw_error", + "typed-builder", + "typed-builder-macro", + "wasm-bindgen", + "web-sys", +] + +[[package]] +name = "leptos_config" +version = "0.7.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4172cfee12576224775ccfbb9d3e76625017a8b4207c4641a2f9b96a70e6d524" +dependencies = [ + "config", + "regex", + "serde", + "thiserror 2.0.11", + "typed-builder", +] + +[[package]] +name = "leptos_dom" +version = "0.7.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a41f6dc3ddaa09d876d7015f08f4f3905787da4ea5460cef130c365419483a89" +dependencies = [ + "js-sys", + "or_poisoned", + "reactive_graph", + "send_wrapper", + "tachys", + "wasm-bindgen", + "web-sys", +] + +[[package]] +name = "leptos_hot_reload" +version = "0.7.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "31f5c961e5d9b2aa6deab39d5d842272e8b1b165744b5caf674770d5cf0daa04" +dependencies = [ + "anyhow", + "camino", + "indexmap 2.7.1", + "parking_lot", + "proc-macro2", + "quote", + "rstml", + "serde", + "syn 2.0.98", + "walkdir", +] + +[[package]] +name = "leptos_macro" +version = "0.7.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2b9165909eabb02188a4b33b0ab6acff408bdf440018bf65b30bba0d38d61b19" +dependencies = [ + "attribute-derive", + "cfg-if", + "convert_case 0.6.0", + "html-escape", + "itertools", + "leptos_hot_reload", + "prettyplease", + "proc-macro-error2", + "proc-macro2", + "quote", + "rstml", + "server_fn_macro", + "syn 2.0.98", + "uuid", +] + +[[package]] +name = "leptos_server" +version = "0.7.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4fee9ed4526484b17561bc8ce1532c613e37be2c01788fed3d1c4104db674dd9" +dependencies = [ + "any_spawner", + "base64 0.22.1", + "codee", + "futures", + "hydration_context", + "or_poisoned", + "reactive_graph", + "send_wrapper", + "serde", + "serde_json", + "server_fn", + "tachys", +] + [[package]] name = "libappindicator" version = "0.9.0" @@ -2219,6 +2625,12 @@ dependencies = [ "vcpkg", ] +[[package]] +name = "linear-map" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bfae20f6b19ad527b550c223fddc3077a547fc70cda94b9b566575423fd303ee" + [[package]] name = "linux-raw-sys" version = "0.4.15" @@ -2243,9 +2655,9 @@ dependencies = [ [[package]] name = "log" -version = "0.4.25" +version = "0.4.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "04cbf5b083de1c7e0222a7a51dbfdba1cbe1c6ab0b15e29fff3f6c077fd9cd9f" +checksum = "30bde2b3dc3671ae49d8e2e9f044c7c005836e7a023ee57cffa25ab82764bb9e" [[package]] name = "mac" @@ -2262,6 +2674,29 @@ dependencies = [ "libc", ] +[[package]] +name = "manyhow" +version = "0.11.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b33efb3ca6d3b07393750d4030418d594ab1139cee518f0dc88db70fec873587" +dependencies = [ + "manyhow-macros", + "proc-macro2", + "quote", + "syn 2.0.98", +] + +[[package]] +name = "manyhow-macros" +version = "0.11.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "46fce34d199b78b6e6073abf984c9cf5fd3e9330145a93ee0738a7443e371495" +dependencies = [ + "proc-macro-utils", + "proc-macro2", + "quote", +] + [[package]] name = "markup5ever" version = "0.11.0" @@ -2304,10 +2739,16 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" [[package]] -name = "miniz_oxide" -version = "0.8.3" +name = "minimal-lexical" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b8402cab7aefae129c6977bb0ff1b8fd9a04eb5b51efc50a70bea51cda0c7924" +checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" + +[[package]] +name = "miniz_oxide" +version = "0.8.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b3b1c9bd4fe1f0f8b387f6eb9eb3b4a1aa26185e5750efb9140301703f62cd1b" dependencies = [ "adler2", "simd-adler32", @@ -2334,9 +2775,9 @@ dependencies = [ "dpi", "gtk", "keyboard-types", - "objc2", - "objc2-app-kit", - "objc2-foundation", + "objc2 0.5.2", + "objc2-app-kit 0.2.2", + "objc2-foundation 0.2.2", "once_cell", "png", "serde", @@ -2380,6 +2821,12 @@ version = "1.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "650eef8c711430f1a879fdd01d4745a7deea475becfb90269c06775983bbf086" +[[package]] +name = "next_tuple" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "60993920e071b0c9b66f14e2b32740a4e27ffc82854dcd72035887f336a09a28" + [[package]] name = "nix" version = "0.29.0" @@ -2399,6 +2846,16 @@ version = "0.1.14" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "72ef4a56884ca558e5ddb05a1d1e7e1bfd9a68d9ed024c21704cc98872dae1bb" +[[package]] +name = "nom" +version = "7.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d273983c5a657a70a3e8f2a01329822f3b8c8172b73826411a55751e404a0a4a" +dependencies = [ + "memchr", + "minimal-lexical", +] + [[package]] name = "num-conv" version = "0.1.0" @@ -2414,6 +2871,16 @@ dependencies = [ "autocfg", ] +[[package]] +name = "num_cpus" +version = "1.16.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4161fcb6d602d4d2081af7c3a45852d875a03dd337a6bfdd6e06407b61342a43" +dependencies = [ + "hermit-abi 0.3.9", + "libc", +] + [[package]] name = "num_enum" version = "0.7.3" @@ -2463,6 +2930,15 @@ dependencies = [ "objc2-encode", ] +[[package]] +name = "objc2" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3531f65190d9cff863b77a99857e74c314dd16bf56c538c4b57c7cbc3f3a6e59" +dependencies = [ + "objc2-encode", +] + [[package]] name = "objc2-app-kit" version = "0.2.2" @@ -2470,15 +2946,27 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e4e89ad9e3d7d297152b17d39ed92cd50ca8063a89a9fa569046d41568891eff" dependencies = [ "bitflags 2.8.0", - "block2", + "block2 0.5.1", "libc", - "objc2", + "objc2 0.5.2", "objc2-core-data", "objc2-core-image", - "objc2-foundation", + "objc2-foundation 0.2.2", "objc2-quartz-core", ] +[[package]] +name = "objc2-app-kit" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5906f93257178e2f7ae069efb89fbd6ee94f0592740b5f8a1512ca498814d0fb" +dependencies = [ + "bitflags 2.8.0", + "objc2 0.6.0", + "objc2-core-foundation", + "objc2-foundation 0.3.0", +] + [[package]] name = "objc2-cloud-kit" version = "0.2.2" @@ -2486,10 +2974,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "74dd3b56391c7a0596a295029734d3c1c5e7e510a4cb30245f8221ccea96b009" dependencies = [ "bitflags 2.8.0", - "block2", - "objc2", + "block2 0.5.1", + "objc2 0.5.2", "objc2-core-location", - "objc2-foundation", + "objc2-foundation 0.2.2", ] [[package]] @@ -2498,9 +2986,9 @@ version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a5ff520e9c33812fd374d8deecef01d4a840e7b41862d849513de77e44aa4889" dependencies = [ - "block2", - "objc2", - "objc2-foundation", + "block2 0.5.1", + "objc2 0.5.2", + "objc2-foundation 0.2.2", ] [[package]] @@ -2510,9 +2998,29 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "617fbf49e071c178c0b24c080767db52958f716d9eabdf0890523aeae54773ef" dependencies = [ "bitflags 2.8.0", - "block2", - "objc2", - "objc2-foundation", + "block2 0.5.1", + "objc2 0.5.2", + "objc2-foundation 0.2.2", +] + +[[package]] +name = "objc2-core-foundation" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "daeaf60f25471d26948a1c2f840e3f7d86f4109e3af4e8e4b5cd70c39690d925" +dependencies = [ + "bitflags 2.8.0", + "objc2 0.6.0", +] + +[[package]] +name = "objc2-core-graphics" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8dca602628b65356b6513290a21a6405b4d4027b8b250f0b98dddbb28b7de02" +dependencies = [ + "bitflags 2.8.0", + "objc2-core-foundation", ] [[package]] @@ -2521,9 +3029,9 @@ version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "55260963a527c99f1819c4f8e3b47fe04f9650694ef348ffd2227e8196d34c80" dependencies = [ - "block2", - "objc2", - "objc2-foundation", + "block2 0.5.1", + "objc2 0.5.2", + "objc2-foundation 0.2.2", "objc2-metal", ] @@ -2533,10 +3041,10 @@ version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "000cfee34e683244f284252ee206a27953279d370e309649dc3ee317b37e5781" dependencies = [ - "block2", - "objc2", + "block2 0.5.1", + "objc2 0.5.2", "objc2-contacts", - "objc2-foundation", + "objc2-foundation 0.2.2", ] [[package]] @@ -2552,9 +3060,21 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0ee638a5da3799329310ad4cfa62fbf045d5f56e3ef5ba4149e7452dcf89d5a8" dependencies = [ "bitflags 2.8.0", - "block2", + "block2 0.5.1", "libc", - "objc2", + "objc2 0.5.2", +] + +[[package]] +name = "objc2-foundation" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3a21c6c9014b82c39515db5b396f91645182611c97d24637cf56ac01e5f8d998" +dependencies = [ + "bitflags 2.8.0", + "block2 0.6.0", + "objc2 0.6.0", + "objc2-core-foundation", ] [[package]] @@ -2563,10 +3083,10 @@ version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a1a1ae721c5e35be65f01a03b6d2ac13a54cb4fa70d8a5da293d7b0020261398" dependencies = [ - "block2", - "objc2", - "objc2-app-kit", - "objc2-foundation", + "block2 0.5.1", + "objc2 0.5.2", + "objc2-app-kit 0.2.2", + "objc2-foundation 0.2.2", ] [[package]] @@ -2576,9 +3096,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dd0cba1276f6023976a406a14ffa85e1fdd19df6b0f737b063b95f6c8c7aadd6" dependencies = [ "bitflags 2.8.0", - "block2", - "objc2", - "objc2-foundation", + "block2 0.5.1", + "objc2 0.5.2", + "objc2-foundation 0.2.2", ] [[package]] @@ -2588,9 +3108,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e42bee7bff906b14b167da2bac5efe6b6a07e6f7c0a21a7308d40c960242dc7a" dependencies = [ "bitflags 2.8.0", - "block2", - "objc2", - "objc2-foundation", + "block2 0.5.1", + "objc2 0.5.2", + "objc2-foundation 0.2.2", "objc2-metal", ] @@ -2600,8 +3120,8 @@ version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0a684efe3dec1b305badae1a28f6555f6ddd3bb2c2267896782858d5a78404dc" dependencies = [ - "objc2", - "objc2-foundation", + "objc2 0.5.2", + "objc2-foundation 0.2.2", ] [[package]] @@ -2611,13 +3131,13 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b8bb46798b20cd6b91cbd113524c490f1686f4c4e8f49502431415f3512e2b6f" dependencies = [ "bitflags 2.8.0", - "block2", - "objc2", + "block2 0.5.1", + "objc2 0.5.2", "objc2-cloud-kit", "objc2-core-data", "objc2-core-image", "objc2-core-location", - "objc2-foundation", + "objc2-foundation 0.2.2", "objc2-link-presentation", "objc2-quartz-core", "objc2-symbols", @@ -2631,9 +3151,9 @@ version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "44fa5f9748dbfe1ca6c0b79ad20725a11eca7c2218bceb4b005cb1be26273bfe" dependencies = [ - "block2", - "objc2", - "objc2-foundation", + "block2 0.5.1", + "objc2 0.5.2", + "objc2-foundation 0.2.2", ] [[package]] @@ -2643,10 +3163,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "76cfcbf642358e8689af64cee815d139339f3ed8ad05103ed5eaf73db8d84cb3" dependencies = [ "bitflags 2.8.0", - "block2", - "objc2", + "block2 0.5.1", + "objc2 0.5.2", "objc2-core-location", - "objc2-foundation", + "objc2-foundation 0.2.2", ] [[package]] @@ -2656,10 +3176,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "68bc69301064cebefc6c4c90ce9cba69225239e4b8ff99d445a2b5563797da65" dependencies = [ "bitflags 2.8.0", - "block2", - "objc2", - "objc2-app-kit", - "objc2-foundation", + "block2 0.5.1", + "objc2 0.5.2", + "objc2-app-kit 0.2.2", + "objc2-foundation 0.2.2", ] [[package]] @@ -2671,6 +3191,16 @@ dependencies = [ "memchr", ] +[[package]] +name = "oco_ref" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "64b94982fe39a861561cf67ff17a7849f2cedadbbad960a797634032b7abb998" +dependencies = [ + "serde", + "thiserror 1.0.69", +] + [[package]] name = "once_cell" version = "1.20.3" @@ -2691,9 +3221,9 @@ dependencies = [ [[package]] name = "openssl" -version = "0.10.70" +version = "0.10.71" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61cfb4e166a8bb8c9b55c500bc2308550148ece889be90f609377e58140f42c6" +checksum = "5e14130c6a98cd258fdcb0fb6d744152343ff729cbfcb28c656a9d12b999fbcd" dependencies = [ "bitflags 2.8.0", "cfg-if", @@ -2723,18 +3253,18 @@ checksum = "d05e27ee213611ffe7d6348b942e8f942b37114c00cc03cec254295a4a17852e" [[package]] name = "openssl-src" -version = "300.4.1+3.4.0" +version = "300.4.2+3.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "faa4eac4138c62414b5622d1b31c5c304f34b406b013c079c2bbc652fdd6678c" +checksum = "168ce4e058f975fe43e89d9ccf78ca668601887ae736090aacc23ae353c298e2" dependencies = [ "cc", ] [[package]] name = "openssl-sys" -version = "0.9.105" +version = "0.9.106" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b22d5b84be05a8d6947c7cb71f7c849aa0f112acd4bf51c2a7c1c988ac0a9dc" +checksum = "8bb61ea9811cc39e3c2069f40b8b8e2e70d8569b361f879786cc7ed48b777cdd" dependencies = [ "cc", "libc", @@ -2749,6 +3279,12 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "04744f49eae99ab78e0d5c0b603ab218f515ea8cfe5a456d7629ad883a3b6e7d" +[[package]] +name = "or_poisoned" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8c04f5d74368e4d0dfe06c45c8627c81bd7c317d52762d118fb9b3076f6420fd" + [[package]] name = "ordered-stream" version = "0.2.0" @@ -2834,6 +3370,12 @@ dependencies = [ "windows-targets 0.52.6", ] +[[package]] +name = "paste" +version = "1.0.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "57c0d7b74b563b49d38dae00a0c37d4d6de9b432382b2892f0574ddcae73fd0a" + [[package]] name = "pathdiff" version = "0.2.3" @@ -2980,6 +3522,26 @@ dependencies = [ "siphasher 1.0.1", ] +[[package]] +name = "pin-project" +version = "1.1.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dfe2e71e1471fe07709406bf725f710b02927c9c54b2b5b2ec0e8087d97c327d" +dependencies = [ + "pin-project-internal", +] + +[[package]] +name = "pin-project-internal" +version = "1.1.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f6e859e6e5bd50440ab63c47e3ebabc90f26251f7c73c3d3e837b74a1cc3fa67" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.98", +] + [[package]] name = "pin-project-lite" version = "0.2.16" @@ -3053,7 +3615,7 @@ checksum = "a604568c3202727d1507653cb121dbd627a58684eb09a820fd746bee38b4442f" dependencies = [ "cfg-if", "concurrent-queue", - "hermit-abi", + "hermit-abi 0.4.0", "pin-project-lite", "rustix", "tracing", @@ -3081,6 +3643,16 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "925383efa346730478fb4838dbe9137d2a47675ad789c546d150a6e1dd4ab31c" +[[package]] +name = "prettyplease" +version = "0.2.29" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6924ced06e1f7dfe3fa48d57b9f74f55d8915f5036121bef647ef4b204895fac" +dependencies = [ + "proc-macro2", + "syn 2.0.98", +] + [[package]] name = "primeorder" version = "0.13.6" @@ -3115,7 +3687,7 @@ version = "3.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8ecf48c7ca261d60b74ab1a7b20da18bede46776b2e55535cb958eb595c5fa7b" dependencies = [ - "toml_edit 0.22.23", + "toml_edit 0.22.24", ] [[package]] @@ -3142,12 +3714,45 @@ dependencies = [ "version_check", ] +[[package]] +name = "proc-macro-error-attr2" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "96de42df36bb9bba5542fe9f1a054b8cc87e172759a1868aa05c1f3acc89dfc5" +dependencies = [ + "proc-macro2", + "quote", +] + +[[package]] +name = "proc-macro-error2" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "11ec05c52be0a07b08061f7dd003e7d7092e0472bc731b4af7bb1ef876109802" +dependencies = [ + "proc-macro-error-attr2", + "proc-macro2", + "quote", + "syn 2.0.98", +] + [[package]] name = "proc-macro-hack" version = "0.5.20+deprecated" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dc375e1527247fe1a97d8b7156678dfe7c1af2fc075c9a4db3690ecd2a148068" +[[package]] +name = "proc-macro-utils" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eeaf08a13de400bc215877b5bdc088f241b12eb42f0a548d3390dc1c56bb7071" +dependencies = [ + "proc-macro2", + "quote", + "smallvec", +] + [[package]] name = "proc-macro2" version = "1.0.93" @@ -3157,6 +3762,19 @@ dependencies = [ "unicode-ident", ] +[[package]] +name = "proc-macro2-diagnostics" +version = "0.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "af066a9c399a26e020ada66a034357a868728e72cd426f3adcd35f80d88d88c8" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.98", + "version_check", + "yansi", +] + [[package]] name = "quick-xml" version = "0.32.0" @@ -3206,9 +3824,9 @@ dependencies = [ [[package]] name = "quinn-udp" -version = "0.5.9" +version = "0.5.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1c40286217b4ba3a71d644d752e6a0b71f13f1b6a2c5311acfcbe0c2418ed904" +checksum = "e46f3055866785f6b92bc6164b76be02ca8f2eb4b002c0354b28cf4c119e5944" dependencies = [ "cfg_aliases", "libc", @@ -3227,6 +3845,28 @@ dependencies = [ "proc-macro2", ] +[[package]] +name = "quote-use" +version = "0.8.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9619db1197b497a36178cfc736dc96b271fe918875fbf1344c436a7e93d0321e" +dependencies = [ + "quote", + "quote-use-macros", +] + +[[package]] +name = "quote-use-macros" +version = "0.8.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "82ebfb7faafadc06a7ab141a6f67bcfb24cb8beb158c6fe933f2f035afa99f35" +dependencies = [ + "proc-macro-utils", + "proc-macro2", + "quote", + "syn 2.0.98", +] + [[package]] name = "rand" version = "0.7.3" @@ -3315,10 +3955,59 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "20675572f6f24e9e76ef639bc5552774ed45f1c30e2951e1e99c59888861c539" [[package]] -name = "redox_syscall" -version = "0.5.8" +name = "reactive_graph" +version = "0.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "03a862b389f93e68874fbf580b9de08dd02facb9a788ebadaf4a3fd33cf58834" +checksum = "9996b4c0f501d64a755ff3dfbe9276e9f834d105d7d45059ad4bd6d2a56477d0" +dependencies = [ + "any_spawner", + "async-lock", + "futures", + "guardian", + "hydration_context", + "or_poisoned", + "pin-project-lite", + "rustc-hash", + "send_wrapper", + "serde", + "slotmap", + "thiserror 2.0.11", + "web-sys", +] + +[[package]] +name = "reactive_stores" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "74c3d2a20d8edd8ac6628718209f743da86349d7f10a4458304666c2ddfc082e" +dependencies = [ + "guardian", + "itertools", + "or_poisoned", + "paste", + "reactive_graph", + "reactive_stores_macro", + "rustc-hash", +] + +[[package]] +name = "reactive_stores_macro" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6d4d8e40112b8ee1424e5ec636fcbc9764c1a099e81f8fa818f6762b43cc10cd" +dependencies = [ + "convert_case 0.6.0", + "proc-macro-error2", + "proc-macro2", + "quote", + "syn 2.0.98", +] + +[[package]] +name = "redox_syscall" +version = "0.5.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "82b568323e98e49e2a0899dcee453dd679fae22d69adf9b11dd508d1549b7e2f" dependencies = [ "bitflags 2.8.0", ] @@ -3421,15 +4110,14 @@ dependencies = [ [[package]] name = "ring" -version = "0.17.8" +version = "0.17.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c17fa4cb658e3583423e915b9f3acc01cceaee1860e33d59ebae66adc3a2dc0d" +checksum = "d34b5020fcdea098ef7d95e9f89ec15952123a4a039badd09fabebe9e963e839" dependencies = [ "cc", "cfg-if", "getrandom 0.2.15", "libc", - "spin", "untrusted", "windows-sys 0.52.0", ] @@ -3453,6 +4141,21 @@ dependencies = [ "signature", ] +[[package]] +name = "rstml" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "61cf4616de7499fc5164570d40ca4e1b24d231c6833a88bff0fe00725080fd56" +dependencies = [ + "derive-where", + "proc-macro2", + "proc-macro2-diagnostics", + "quote", + "syn 2.0.98", + "syn_derive", + "thiserror 2.0.11", +] + [[package]] name = "rusqlite" version = "0.33.0" @@ -3503,9 +4206,9 @@ dependencies = [ [[package]] name = "rustls" -version = "0.23.22" +version = "0.23.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9fb9263ab4eb695e42321db096e3b8fbd715a59b154d5c88d82db2175b681ba7" +checksum = "47796c98c480fce5406ef69d1c76378375492c3b0a0de587be0c1d9feb12f395" dependencies = [ "once_cell", "ring", @@ -3650,10 +4353,19 @@ dependencies = [ ] [[package]] -name = "serde" -version = "1.0.217" +name = "send_wrapper" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "02fc4265df13d6fa1d00ecff087228cc0a2b5f3c0e87e258d8b94a156e984c70" +checksum = "cd0b0ec5f1c1ca621c432a25813d8d60c88abe6d3e08a3eb9cf37d97a0fe3d73" +dependencies = [ + "futures-core", +] + +[[package]] +name = "serde" +version = "1.0.218" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e8dfc9d19bdbf6d17e22319da49161d5d0108e4188e8b680aef6299eed22df60" dependencies = [ "serde_derive", ] @@ -3670,10 +4382,21 @@ dependencies = [ ] [[package]] -name = "serde_derive" -version = "1.0.217" +name = "serde-wasm-bindgen" +version = "0.6.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a9bf7cf98d04a2b28aead066b7496853d4779c9cc183c440dbac457641e19a0" +checksum = "8302e169f0eddcc139c70f139d19d6467353af16f9fce27e8c30158036a1e16b" +dependencies = [ + "js-sys", + "serde", + "wasm-bindgen", +] + +[[package]] +name = "serde_derive" +version = "1.0.218" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f09503e191f4e797cb8aac08e9a4a4695c5edf6a2e70e376d961ddd5c969f82b" dependencies = [ "proc-macro2", "quote", @@ -3693,9 +4416,9 @@ dependencies = [ [[package]] name = "serde_json" -version = "1.0.138" +version = "1.0.139" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d434192e7da787e94a6ea7e9670b26a036d0ca41e0b7efb2676dd32bae872949" +checksum = "44f86c3acccc9c65b153fe1b85a3be07fe5515274ec9f0653b4a0875731c72a6" dependencies = [ "itoa 1.0.14", "memchr", @@ -3703,6 +4426,17 @@ dependencies = [ "serde", ] +[[package]] +name = "serde_qs" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cd34f36fe4c5ba9654417139a9b3a20d2e1de6012ee678ad14d240c22c78d8d6" +dependencies = [ + "percent-encoding", + "serde", + "thiserror 1.0.69", +] + [[package]] name = "serde_repr" version = "0.1.19" @@ -3787,6 +4521,61 @@ dependencies = [ "syn 1.0.109", ] +[[package]] +name = "server_fn" +version = "0.7.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "055476c2a42c9a98a69e3f0ce29b86aa3acbdef19a84e0523330f095097defcf" +dependencies = [ + "bytes", + "const_format", + "dashmap", + "futures", + "gloo-net", + "http", + "inventory", + "js-sys", + "once_cell", + "pin-project-lite", + "send_wrapper", + "serde", + "serde_json", + "serde_qs", + "server_fn_macro_default", + "thiserror 2.0.11", + "throw_error", + "url", + "wasm-bindgen", + "wasm-bindgen-futures", + "wasm-streams", + "web-sys", + "xxhash-rust", +] + +[[package]] +name = "server_fn_macro" +version = "0.7.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e65737414a9583ce3b43dddd4e5dfb33fe385a6933ed79a9b539b8eb0767cd07" +dependencies = [ + "const_format", + "convert_case 0.6.0", + "proc-macro2", + "quote", + "syn 2.0.98", + "xxhash-rust", +] + +[[package]] +name = "server_fn_macro_default" +version = "0.7.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "563909a43390341403ab76fbc33fde306712613da02244e692eabeae8ffde949" +dependencies = [ + "server_fn_macro", + "syn 2.0.98", +] + [[package]] name = "servo_arc" version = "0.1.1" @@ -3860,10 +4649,19 @@ dependencies = [ ] [[package]] -name = "smallvec" -version = "1.13.2" +name = "slotmap" +version = "1.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67" +checksum = "dbff4acf519f630b3a3ddcfaea6c06b42174d9a44bc70c620e9ed1649d58b82a" +dependencies = [ + "version_check", +] + +[[package]] +name = "smallvec" +version = "1.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7fcf8323ef1faaee30a44a340193b1ac6814fd9b7b4e88e9d4519a3e4abe1cfd" [[package]] name = "socket2" @@ -3887,8 +4685,8 @@ dependencies = [ "foreign-types 0.5.0", "js-sys", "log", - "objc2", - "objc2-foundation", + "objc2 0.5.2", + "objc2-foundation 0.2.2", "objc2-quartz-core", "raw-window-handle", "redox_syscall", @@ -3923,12 +4721,6 @@ dependencies = [ "system-deps", ] -[[package]] -name = "spin" -version = "0.9.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67" - [[package]] name = "spki" version = "0.7.3" @@ -3966,9 +4758,9 @@ dependencies = [ [[package]] name = "string_cache_codegen" -version = "0.5.3" +version = "0.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "244292f3441c89febe5b5bdfbb6863aeaf4f64da810ea3050fd927b27b8d92ce" +checksum = "c711928715f1fe0fe509c53b43e993a9a557babc2d0a3567d0a3006f1ac931a0" dependencies = [ "phf_generator 0.11.3", "phf_shared 0.11.3", @@ -4021,6 +4813,18 @@ dependencies = [ "unicode-ident", ] +[[package]] +name = "syn_derive" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cdb066a04799e45f5d582e8fc6ec8e6d6896040d00898eb4e6a835196815b219" +dependencies = [ + "proc-macro-error2", + "proc-macro2", + "quote", + "syn 2.0.98", +] + [[package]] name = "sync_wrapper" version = "1.0.2" @@ -4054,6 +4858,40 @@ dependencies = [ "version-compare", ] +[[package]] +name = "tachys" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4c05fed41ed4e334257090500510df21bb1611680c0cfd3be14acec7ffdf3d95" +dependencies = [ + "any_spawner", + "async-trait", + "const_str_slice_concat", + "drain_filter_polyfill", + "dyn-clone", + "either_of", + "futures", + "html-escape", + "indexmap 2.7.1", + "itertools", + "js-sys", + "linear-map", + "next_tuple", + "oco_ref", + "once_cell", + "or_poisoned", + "parking_lot", + "paste", + "reactive_graph", + "reactive_stores", + "rustc-hash", + "send_wrapper", + "slotmap", + "throw_error", + "wasm-bindgen", + "web-sys", +] + [[package]] name = "tao" version = "0.31.1" @@ -4131,9 +4969,9 @@ dependencies = [ "log", "mime", "muda", - "objc2", - "objc2-app-kit", - "objc2-foundation", + "objc2 0.5.2", + "objc2-app-kit 0.2.2", + "objc2-foundation 0.2.2", "percent-encoding", "plist", "raw-window-handle", @@ -4270,8 +5108,8 @@ checksum = "635ed7c580dc3cdc61c94097d38ef517d749ffc0141c806d904e68e4b0cf1c2a" dependencies = [ "dunce", "glob", - "objc2-app-kit", - "objc2-foundation", + "objc2-app-kit 0.2.2", + "objc2-foundation 0.2.2", "open", "schemars", "serde", @@ -4313,9 +5151,9 @@ dependencies = [ "http", "jni", "log", - "objc2", - "objc2-app-kit", - "objc2-foundation", + "objc2 0.5.2", + "objc2-app-kit 0.2.2", + "objc2-foundation 0.2.2", "percent-encoding", "raw-window-handle", "softbuffer", @@ -4329,6 +5167,22 @@ dependencies = [ "wry", ] +[[package]] +name = "tauri-sys" +version = "0.1.0" +source = "git+https://github.com/JonasKruckenberg/tauri-sys#e953a9c912212d43fa42add71bc84c40c30140e0" +dependencies = [ + "js-sys", + "log", + "serde", + "serde-wasm-bindgen", + "serde_repr", + "thiserror 1.0.69", + "url", + "wasm-bindgen", + "wasm-bindgen-futures", +] + [[package]] name = "tauri-utils" version = "2.1.1" @@ -4378,9 +5232,9 @@ dependencies = [ [[package]] name = "tempfile" -version = "3.16.0" +version = "3.17.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38c246215d7d24f48ae091a2902398798e05d978b24315d6efbc00ede9a8bb91" +checksum = "22e5a0acb1f3f55f65cc4a866c361b2fb2a0ff6366785ae6fbb5f85df07ba230" dependencies = [ "cfg-if", "fastrand", @@ -4447,6 +5301,15 @@ dependencies = [ "syn 2.0.98", ] +[[package]] +name = "throw_error" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e4ef8bf264c6ae02a065a4a16553283f0656bd6266fc1fcb09fd2e6b5e91427b" +dependencies = [ + "pin-project-lite", +] + [[package]] name = "time" version = "0.3.37" @@ -4562,7 +5425,7 @@ dependencies = [ "serde", "serde_spanned", "toml_datetime", - "toml_edit 0.22.23", + "toml_edit 0.22.24", ] [[package]] @@ -4600,15 +5463,15 @@ dependencies = [ [[package]] name = "toml_edit" -version = "0.22.23" +version = "0.22.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "02a8b472d1a3d7c18e2d61a489aee3453fd9031c33e4f55bd533f4a7adca1bee" +checksum = "17b4795ff5edd201c7cd6dca065ae59972ce77d1b80fa0a84d94950ece7d1474" dependencies = [ "indexmap 2.7.1", "serde", "serde_spanned", "toml_datetime", - "winnow 0.7.1", + "winnow 0.7.3", ] [[package]] @@ -4671,22 +5534,23 @@ dependencies = [ [[package]] name = "tray-icon" -version = "0.19.2" +version = "0.19.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d48a05076dd272615d03033bf04f480199f7d1b66a8ac64d75c625fc4a70c06b" +checksum = "eadd75f5002e2513eaa19b2365f533090cc3e93abd38788452d9ea85cff7b48a" dependencies = [ - "core-graphics", "crossbeam-channel", - "dirs 5.0.1", + "dirs 6.0.0", "libappindicator", "muda", - "objc2", - "objc2-app-kit", - "objc2-foundation", + "objc2 0.6.0", + "objc2-app-kit 0.3.0", + "objc2-core-foundation", + "objc2-core-graphics", + "objc2-foundation 0.3.0", "once_cell", "png", "serde", - "thiserror 1.0.69", + "thiserror 2.0.11", "windows-sys 0.59.0", ] @@ -4696,6 +5560,26 @@ version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b" +[[package]] +name = "typed-builder" +version = "0.20.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7e14ed59dc8b7b26cacb2a92bad2e8b1f098806063898ab42a3bd121d7d45e75" +dependencies = [ + "typed-builder-macro", +] + +[[package]] +name = "typed-builder-macro" +version = "0.20.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "560b82d656506509d43abe30e0ba64c56b1953ab3d4fe7ba5902747a7a3cedd5" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.98", +] + [[package]] name = "typeid" version = "1.0.2" @@ -4704,9 +5588,9 @@ checksum = "0e13db2e0ccd5e14a544e8a246ba2312cd25223f616442d7f2cb0e3db614236e" [[package]] name = "typenum" -version = "1.17.0" +version = "1.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825" +checksum = "1dccffe3ce07af9386bfd29e80c0ab1a8205a2fc34e4bcd40364df902cfa8f3f" [[package]] name = "uds_windows" @@ -4762,9 +5646,9 @@ dependencies = [ [[package]] name = "unicode-ident" -version = "1.0.16" +version = "1.0.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a210d160f08b701c8721ba1c726c11662f877ea6b7094007e1ca9a1041945034" +checksum = "00e2473a93778eb0bad35909dff6a10d28e63f792f16ed15e404fca9d5eeedbe" [[package]] name = "unicode-segmentation" @@ -4772,6 +5656,12 @@ version = "1.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f6ccf251212114b54433ec949fd6a7841275f9ada20dddd2f29e9ceea4501493" +[[package]] +name = "unicode-xid" +version = "0.2.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ebc1c04c71510c7f702b52b7c350734c9ff1295c464a03335b00bb84fc54f853" + [[package]] name = "untrusted" version = "0.9.0" @@ -4814,6 +5704,12 @@ version = "1.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c8232dd3cdaed5356e0f716d285e4b40b932ac434100fe9b7e0e8e935b9e6246" +[[package]] +name = "utf8-width" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "86bd8d4e895da8537e5315b8254664e6b769c4ff3db18321b297a1e7004392e3" + [[package]] name = "utf8_iter" version = "1.0.4" @@ -4822,9 +5718,9 @@ checksum = "b6c140620e7ffbb22c2dee59cafe6084a59b5ffc27a8859a5f0d494b5d52b6be" [[package]] name = "uuid" -version = "1.13.1" +version = "1.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ced87ca4be083373936a67f8de945faa23b6b42384bd5b64434850802c6dccd0" +checksum = "93d59ca99a559661b96bf898d8fce28ed87935fd2bea9f05983c1464dd6c71b1" dependencies = [ "getrandom 0.3.1", "serde", @@ -4860,9 +5756,9 @@ dependencies = [ [[package]] name = "vswhom-sys" -version = "0.1.2" +version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3b17ae1f6c8a2b28506cd96d412eebf83b4a0ff2cbefeeb952f2f9dfa44ba18" +checksum = "fb067e4cbd1ff067d1df46c9194b5de0e98efd2810bbc95c5d5e5f25a3231150" dependencies = [ "cc", "libc", @@ -5134,13 +6030,13 @@ checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" [[package]] name = "window-vibrancy" -version = "0.5.2" +version = "0.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3ea403deff7b51fff19e261330f71608ff2cdef5721d72b64180bb95be7c4150" +checksum = "831ad7678290beae36be6f9fad9234139c7f00f3b536347de7745621716be82d" dependencies = [ - "objc2", - "objc2-app-kit", - "objc2-foundation", + "objc2 0.5.2", + "objc2-app-kit 0.2.2", + "objc2-foundation 0.2.2", "raw-window-handle", "windows-sys 0.59.0", "windows-version", @@ -5200,6 +6096,12 @@ dependencies = [ "syn 2.0.98", ] +[[package]] +name = "windows-link" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6dccfd733ce2b1753b03b6d3c65edf020262ea35e20ccdf3e288043e6dd620e3" + [[package]] name = "windows-registry" version = "0.2.0" @@ -5305,36 +6207,20 @@ dependencies = [ "windows_aarch64_gnullvm 0.52.6", "windows_aarch64_msvc 0.52.6", "windows_i686_gnu 0.52.6", - "windows_i686_gnullvm 0.52.6", + "windows_i686_gnullvm", "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]] -name = "windows-targets" -version = "0.53.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1e4c7e8ceaaf9cb7d7507c974735728ab453b67ef8f18febdd7c11fe59dca8b" -dependencies = [ - "windows_aarch64_gnullvm 0.53.0", - "windows_aarch64_msvc 0.53.0", - "windows_i686_gnu 0.53.0", - "windows_i686_gnullvm 0.53.0", - "windows_i686_msvc 0.53.0", - "windows_x86_64_gnu 0.53.0", - "windows_x86_64_gnullvm 0.53.0", - "windows_x86_64_msvc 0.53.0", -] - [[package]] name = "windows-version" -version = "0.1.2" +version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c12476c23a74725c539b24eae8bfc0dac4029c39cdb561d9f23616accd4ae26d" +checksum = "7bfbcc4996dd183ff1376a20ade1242da0d2dcaff83cc76710a588d24fd4c5db" dependencies = [ - "windows-targets 0.53.0", + "windows-link", ] [[package]] @@ -5355,12 +6241,6 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" -[[package]] -name = "windows_aarch64_gnullvm" -version = "0.53.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "86b8d5f90ddd19cb4a147a5fa63ca848db3df085e25fee3cc10b39b6eebae764" - [[package]] name = "windows_aarch64_msvc" version = "0.42.2" @@ -5379,12 +6259,6 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" -[[package]] -name = "windows_aarch64_msvc" -version = "0.53.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c7651a1f62a11b8cbd5e0d42526e55f2c99886c77e007179efff86c2b137e66c" - [[package]] name = "windows_i686_gnu" version = "0.42.2" @@ -5403,24 +6277,12 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" -[[package]] -name = "windows_i686_gnu" -version = "0.53.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1dc67659d35f387f5f6c479dc4e28f1d4bb90ddd1a5d3da2e5d97b42d6272c3" - [[package]] name = "windows_i686_gnullvm" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" -[[package]] -name = "windows_i686_gnullvm" -version = "0.53.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ce6ccbdedbf6d6354471319e781c0dfef054c81fbc7cf83f338a4296c0cae11" - [[package]] name = "windows_i686_msvc" version = "0.42.2" @@ -5439,12 +6301,6 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" -[[package]] -name = "windows_i686_msvc" -version = "0.53.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "581fee95406bb13382d2f65cd4a908ca7b1e4c2f1917f143ba16efe98a589b5d" - [[package]] name = "windows_x86_64_gnu" version = "0.42.2" @@ -5463,12 +6319,6 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" -[[package]] -name = "windows_x86_64_gnu" -version = "0.53.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2e55b5ac9ea33f2fc1716d1742db15574fd6fc8dadc51caab1c16a3d3b4190ba" - [[package]] name = "windows_x86_64_gnullvm" version = "0.42.2" @@ -5487,12 +6337,6 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" -[[package]] -name = "windows_x86_64_gnullvm" -version = "0.53.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0a6e035dd0599267ce1ee132e51c27dd29437f63325753051e71dd9e42406c57" - [[package]] name = "windows_x86_64_msvc" version = "0.42.2" @@ -5511,12 +6355,6 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" -[[package]] -name = "windows_x86_64_msvc" -version = "0.53.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "271414315aff87387382ec3d271b52d7ae78726f5d44ac98b4f4030c91880486" - [[package]] name = "winnow" version = "0.5.40" @@ -5528,9 +6366,9 @@ dependencies = [ [[package]] name = "winnow" -version = "0.7.1" +version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "86e376c75f4f43f44db463cf729e0d3acbf954d13e22c51e26e4c264b4ab545f" +checksum = "0e7f4ea97f6f78012141bcdb6a216b2609f0979ada50b20ca5b52dde2eac2bb1" dependencies = [ "memchr", ] @@ -5573,7 +6411,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a2e33c08b174442ff80d5c791020696f9f8b4e4a87b8cfc7494aad6167ec44e1" dependencies = [ "base64 0.22.1", - "block2", + "block2 0.5.1", "cookie", "crossbeam-channel", "dpi", @@ -5587,9 +6425,9 @@ dependencies = [ "kuchikiki", "libc", "ndk", - "objc2", - "objc2-app-kit", - "objc2-foundation", + "objc2 0.5.2", + "objc2-app-kit 0.2.2", + "objc2-foundation 0.2.2", "objc2-ui-kit", "objc2-web-kit", "once_cell", @@ -5640,6 +6478,18 @@ dependencies = [ "windows-sys 0.59.0", ] +[[package]] +name = "xxhash-rust" +version = "0.8.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fdd20c5420375476fbd4394763288da7eb0cc0b8c11deed431a91562af7335d3" + +[[package]] +name = "yansi" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cfe53a6657fd280eaa890a3bc59152892ffa3e30101319d168b781ed6529b049" + [[package]] name = "yoke" version = "0.7.5" @@ -5693,7 +6543,7 @@ dependencies = [ "tracing", "uds_windows", "windows-sys 0.59.0", - "winnow 0.7.1", + "winnow 0.7.3", "xdg-home", "zbus_macros", "zbus_names", @@ -5723,7 +6573,7 @@ checksum = "7be68e64bf6ce8db94f63e72f0c7eb9a60d733f7e0499e628dfab0f84d6bcb97" dependencies = [ "serde", "static_assertions", - "winnow 0.7.1", + "winnow 0.7.3", "zvariant", ] @@ -5807,7 +6657,7 @@ dependencies = [ "enumflags2", "serde", "static_assertions", - "winnow 0.7.1", + "winnow 0.7.3", "zvariant_derive", "zvariant_utils", ] @@ -5836,5 +6686,5 @@ dependencies = [ "serde", "static_assertions", "syn 2.0.98", - "winnow 0.7.1", + "winnow 0.7.3", ] diff --git a/Cargo.toml b/Cargo.toml index c51920e..f64612c 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -5,6 +5,22 @@ description = "Buchhaltung für „Darmstadt sagt Nein zur Bezahlkarte!“" authors = ["Bianca Fürstenau"] edition = "2021" +[features] +tauri = ["server"] +leptos = [] +server = [ + "dep:tauri", + "dep:tauri-plugin-opener", + "dep:tauri-plugin-fs", + "dep:rusqlite", + "dep:rand", + "dep:chrono", + "dep:tokio", + "dep:curl", + "dep:openssl", + "dep:ring-compat", +] + # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [lib] @@ -18,15 +34,18 @@ crate-type = ["staticlib", "cdylib", "rlib"] tauri-build = { version = "2", features = [] } [dependencies] -tauri = { version = "2", features = [] } -tauri-plugin-opener = "2" +leptos = { version = "^0.7", features = ["ssr"] } +tauri-sys = { git = "https://github.com/JonasKruckenberg/tauri-sys", features = ["tauri"] } serde = { version = "1", features = ["derive"] } serde_json = "1" -rusqlite = {version = "^0.33", features = ["backup", "bundled"] } -rand = {version = "^0.8"} -chrono = {version = "^0.4"} -tokio = {version = "^1.43"} -tauri-plugin-fs = {version = "2"} -curl = {version = "^0.4"} -openssl = {version = "^0.10", features = ["vendored"] } -ring-compat = {version = "^0.8", features = ["signature", "rand_core"] } + +tauri = { version = "2", features = [], optional = true } +tauri-plugin-opener = { version = "2", optional = true } +tauri-plugin-fs = {version = "2", optional = true} +rusqlite = {version = "^0.33", features = ["backup", "bundled"], optional = true } +rand = {version = "^0.8", optional = true} +chrono = {version = "^0.4", optional = true} +tokio = {version = "^1.43", optional = true} +curl = {version = "^0.4", optional = true} +openssl = {version = "^0.10", features = ["vendored"], optional = true} +ring-compat = {version = "^0.8", features = ["signature", "rand_core"], optional = true} diff --git a/Trunk.toml b/Trunk.toml new file mode 100644 index 0000000..29257e2 --- /dev/null +++ b/Trunk.toml @@ -0,0 +1,9 @@ +[build] +target = "trunk.html" +html_output = "index.html" +dist = "www" + +[serve] +port = 1420 +open = false +ws_protocol = "ws" diff --git a/build.rs b/build.rs index c1ea373..9e3463b 100644 --- a/build.rs +++ b/build.rs @@ -1,3 +1,7 @@ fn main() { - tauri_build::build() + if cfg!(feature = "tauri") { + tauri_build::build(); + } else { + println!("cargo::rustc-check-cfg=cfg(mobile)"); + } } diff --git a/www/assets/hessen_sagt_nein.otf b/font/hessen_sagt_nein.otf similarity index 100% rename from www/assets/hessen_sagt_nein.otf rename to font/hessen_sagt_nein.otf diff --git a/www/assets/aldi.svg b/img/aldi.svg similarity index 100% rename from www/assets/aldi.svg rename to img/aldi.svg diff --git a/www/assets/angel.svg b/img/angel.svg similarity index 100% rename from www/assets/angel.svg rename to img/angel.svg diff --git a/www/assets/cafe.svg b/img/cafe.svg similarity index 100% rename from www/assets/cafe.svg rename to img/cafe.svg diff --git a/www/assets/cash.svg b/img/cash.svg similarity index 100% rename from www/assets/cash.svg rename to img/cash.svg diff --git a/www/assets/dm.svg b/img/dm.svg similarity index 100% rename from www/assets/dm.svg rename to img/dm.svg diff --git a/www/assets/edeka.svg b/img/edeka.svg similarity index 100% rename from www/assets/edeka.svg rename to img/edeka.svg diff --git a/icon.svg b/img/icon.svg similarity index 100% rename from icon.svg rename to img/icon.svg diff --git a/www/assets/lidl.svg b/img/lidl.svg similarity index 100% rename from www/assets/lidl.svg rename to img/lidl.svg diff --git a/www/assets/rewe.svg b/img/rewe.svg similarity index 100% rename from www/assets/rewe.svg rename to img/rewe.svg diff --git a/www/assets/tegut.svg b/img/tegut.svg similarity index 100% rename from www/assets/tegut.svg rename to img/tegut.svg diff --git a/src/bin/leptos.rs b/src/bin/leptos.rs new file mode 100644 index 0000000..570d45c --- /dev/null +++ b/src/bin/leptos.rs @@ -0,0 +1,5 @@ +use leptos::prelude::*; + +fn main() { + leptos::mount::mount_to_body(|| view! {

"Hello, world!"

}) +} diff --git a/src/main.rs b/src/bin/tauri.rs similarity index 100% rename from src/main.rs rename to src/bin/tauri.rs diff --git a/src/commands.rs b/src/commands.rs index 9cf9c79..2b92214 100644 --- a/src/commands.rs +++ b/src/commands.rs @@ -1,11 +1,12 @@ use tauri_sys::Error; use tauri_sys::tauri::invoke; -pub struct Swap { - store: &str, +#[derive(serde::Serialize)] +pub struct Swap<'a> { + store: &'a str, acc: i64, } pub async fn swap(store: &str, acc: i64) -> Result<(), Error> { let args = Swap { store, acc }; - invoke("swap", &args) + invoke("swap", &args).await } diff --git a/src/lib.rs b/src/lib.rs index b21e1f0..2f8d086 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1,201 +1,9 @@ -use chrono::offset::Utc; -use rusqlite::{types::ToSqlOutput, ToSql}; -use tauri::{Manager, State}; -use tauri_plugin_fs::FsExt; -use tokio::sync::Mutex; -use std::collections::HashMap; - -mod app_state; -mod data_door; - -use app_state::AppState; - -#[derive(Clone, Copy, Debug)] -enum Store { - Aldi, - Edeka, - Dm, - Lidl, - Rewe, - Tegut, -} - -#[derive(Clone, Copy, Debug)] -enum Account { - Sumpf, - Heinersyndikat, -} - -struct Inventory { - acc: Account, - cash: i64, - vouchers: Vec, -} - -#[derive(Debug)] -struct VoucherInventory { - store: Store, - count: i64, -} - -impl TryFrom<&str> for Store { - type Error = (); - - fn try_from(s: &str) -> Result { - match s { - "aldi" => Ok(Store::Aldi), - "edeka" => Ok(Store::Edeka), - "dm" => Ok(Store::Dm), - "lidl" => Ok(Store::Lidl), - "rewe" => Ok(Store::Rewe), - "tegut" => Ok(Store::Tegut), - _ => Err(()), - } - } -} - -impl TryFrom<&str> for Account { - type Error = (); - - fn try_from(s: &str) -> Result { - match s { - "sumpf" => Ok(Account::Sumpf), - "hs" => Ok(Account::Heinersyndikat), - _ => Err(()), - } - } -} - -impl ToSql for Store { - fn to_sql(&self) -> rusqlite::Result> { - match self { - Store::Aldi => 0.to_sql(), - Store::Edeka => 1.to_sql(), - Store::Dm => 2.to_sql(), - Store::Lidl => 3.to_sql(), - Store::Rewe => 4.to_sql(), - Store::Tegut => 5.to_sql(), - } - } -} - -impl ToSql for Account { - fn to_sql(&self) -> rusqlite::Result> { - match self { - Account::Sumpf => 0.to_sql(), - Account::Heinersyndikat => 1.to_sql(), - } - } -} - -fn parse_inventory(data: HashMap) -> Result { - let a = data.get("cafe-inventory-acc").ok_or(())?; - let acc: Account = Account::try_from(a.as_ref())?; - let mut vouchers = Vec::new(); - for s in ["aldi", "dm", "lidl", "rewe", "tegut"] { - let Ok(store) = s.try_into() else { - println!("Did not find '{}' in inventory data.", s); - continue; - }; - match data.get(&format!("cafe-inventory-{}", s)) { - None => (), - Some(c) => { - let c = if c == "" {"0"} else {c}; - let Ok(count) = c.parse() else { - println!("Invalid count '{}' for '{}' in inventory data.", c, s); - continue; - }; - let v = VoucherInventory { store, count }; - vouchers.push(v); - }, - } - } - unimplemented!() -} - -#[tauri::command] -async fn inventory( - data: HashMap, - state: State<'_, Mutex>, -) -> Result<(), ()> { - let now = Utc::now().timestamp(); - let state = state.lock().await; - let inv = parse_inventory(data)?; - for v in inv.vouchers { - state.db.execute( - "INSERT INTO voucher_inventory VALUES ()", - ( - inv.acc, - v.store, - v.count, - now, - ), - ) - .map_err(|e| println!("{:?}", e))?; - }; - Ok(()) -} - -#[tauri::command] -async fn swap( - store: &str, - acc: i64, - state: State<'_, Mutex>, -) -> Result<(), ()> { - let state = state.lock().await; - let store: Store = store.try_into()?; - state.db.execute( - "INSERT INTO swap VALUES (?1, ?2, ?3, ?4, ?5)", - ( - store, - acc, - i64::from_ne_bytes(state.id.to_ne_bytes()), - Utc::now().timestamp(), - false, - ), - ) - .map_err(|e| println!("{:?}", e))?; - Ok(()) -} - -#[tauri::command] -async fn count(state: State<'_, Mutex>) -> Result { - let state = state.lock().await; - let mut stmt = - state.db.prepare("SELECT COUNT(*) FROM swap") - .map_err(|e| println!("{:?}", e))?; - let mut rows = stmt.query([]).map_err(|e| println!("{:?}", e))?; - let row = rows.next().map_err(|e| println!("{:?}", e))?; - let row = match row { - Some(r) => Ok(r), - None => { - println!("No rows"); - Err(()) - } - }?; - let cnt: u64 = row.get(0).map_err(|e| println!("{:?}", e))?; - Ok(cnt.to_string()) -} +mod commands; +#[cfg(feature = "server")] +mod server; +#[cfg(feature = "server")] #[cfg_attr(mobile, tauri::mobile_entry_point)] pub fn run() { - let state = AppState::new(); - tauri::Builder::default() - .plugin(tauri_plugin_fs::init()) - .setup(|app| { - app.manage(Mutex::new(state)); - let scope = app.fs_scope(); - let path = app.path(); - scope.allow_directory(path.temp_dir()?, false)?; - Ok(()) - }) - .invoke_handler(tauri::generate_handler![ - swap, - count, - inventory, - data_door::pull_data, - data_door::push_data, - ]) - .run(tauri::generate_context!()) - .expect("error while running tauri application"); + server::run(); } diff --git a/src/app_state.rs b/src/server/app_state.rs similarity index 100% rename from src/app_state.rs rename to src/server/app_state.rs diff --git a/src/data_door.rs b/src/server/data_door.rs similarity index 98% rename from src/data_door.rs rename to src/server/data_door.rs index a96441e..555c9ac 100644 --- a/src/data_door.rs +++ b/src/server/data_door.rs @@ -6,7 +6,7 @@ use ring_compat::signature::ed25519::SigningKey; use tauri::{Manager, State}; use tokio::sync::Mutex; -use crate::app_state::AppState; +use crate::server::app_state::AppState; #[derive(Debug)] struct Collector(Vec, Vec, usize); diff --git a/src/isrg-root-x1.pem b/src/server/isrg-root-x1.pem similarity index 100% rename from src/isrg-root-x1.pem rename to src/server/isrg-root-x1.pem diff --git a/src/server/mod.rs b/src/server/mod.rs new file mode 100644 index 0000000..70a9f56 --- /dev/null +++ b/src/server/mod.rs @@ -0,0 +1,200 @@ +use chrono::offset::Utc; +use rusqlite::{types::ToSqlOutput, ToSql}; +use tauri::{Manager, State}; +use tauri_plugin_fs::FsExt; +use tokio::sync::Mutex; +use std::collections::HashMap; + +mod app_state; +mod data_door; + +use app_state::AppState; + +#[derive(Clone, Copy, Debug)] +enum Store { + Aldi, + Edeka, + Dm, + Lidl, + Rewe, + Tegut, +} + +#[derive(Clone, Copy, Debug)] +enum Account { + Sumpf, + Heinersyndikat, +} + +struct Inventory { + acc: Account, + cash: i64, + vouchers: Vec, +} + +#[derive(Debug)] +struct VoucherInventory { + store: Store, + count: i64, +} + +impl TryFrom<&str> for Store { + type Error = (); + + fn try_from(s: &str) -> Result { + match s { + "aldi" => Ok(Store::Aldi), + "edeka" => Ok(Store::Edeka), + "dm" => Ok(Store::Dm), + "lidl" => Ok(Store::Lidl), + "rewe" => Ok(Store::Rewe), + "tegut" => Ok(Store::Tegut), + _ => Err(()), + } + } +} + +impl TryFrom<&str> for Account { + type Error = (); + + fn try_from(s: &str) -> Result { + match s { + "sumpf" => Ok(Account::Sumpf), + "hs" => Ok(Account::Heinersyndikat), + _ => Err(()), + } + } +} + +impl ToSql for Store { + fn to_sql(&self) -> rusqlite::Result> { + match self { + Store::Aldi => 0.to_sql(), + Store::Edeka => 1.to_sql(), + Store::Dm => 2.to_sql(), + Store::Lidl => 3.to_sql(), + Store::Rewe => 4.to_sql(), + Store::Tegut => 5.to_sql(), + } + } +} + +impl ToSql for Account { + fn to_sql(&self) -> rusqlite::Result> { + match self { + Account::Sumpf => 0.to_sql(), + Account::Heinersyndikat => 1.to_sql(), + } + } +} + +fn parse_inventory(data: HashMap) -> Result { + let a = data.get("cafe-inventory-acc").ok_or(())?; + let acc: Account = Account::try_from(a.as_ref())?; + let mut vouchers = Vec::new(); + for s in ["aldi", "dm", "lidl", "rewe", "tegut"] { + let Ok(store) = s.try_into() else { + println!("Did not find '{}' in inventory data.", s); + continue; + }; + match data.get(&format!("cafe-inventory-{}", s)) { + None => (), + Some(c) => { + let c = if c == "" {"0"} else {c}; + let Ok(count) = c.parse() else { + println!("Invalid count '{}' for '{}' in inventory data.", c, s); + continue; + }; + let v = VoucherInventory { store, count }; + vouchers.push(v); + }, + } + } + unimplemented!() +} + +#[tauri::command] +async fn inventory( + data: HashMap, + state: State<'_, Mutex>, +) -> Result<(), ()> { + let now = Utc::now().timestamp(); + let state = state.lock().await; + let inv = parse_inventory(data)?; + for v in inv.vouchers { + state.db.execute( + "INSERT INTO voucher_inventory VALUES ()", + ( + inv.acc, + v.store, + v.count, + now, + ), + ) + .map_err(|e| println!("{:?}", e))?; + }; + Ok(()) +} + +#[tauri::command] +async fn swap( + store: &str, + acc: i64, + state: State<'_, Mutex>, +) -> Result<(), ()> { + let state = state.lock().await; + let store: Store = store.try_into()?; + state.db.execute( + "INSERT INTO swap VALUES (?1, ?2, ?3, ?4, ?5)", + ( + store, + acc, + i64::from_ne_bytes(state.id.to_ne_bytes()), + Utc::now().timestamp(), + false, + ), + ) + .map_err(|e| println!("{:?}", e))?; + Ok(()) +} + +#[tauri::command] +async fn count(state: State<'_, Mutex>) -> Result { + let state = state.lock().await; + let mut stmt = + state.db.prepare("SELECT COUNT(*) FROM swap") + .map_err(|e| println!("{:?}", e))?; + let mut rows = stmt.query([]).map_err(|e| println!("{:?}", e))?; + let row = rows.next().map_err(|e| println!("{:?}", e))?; + let row = match row { + Some(r) => Ok(r), + None => { + println!("No rows"); + Err(()) + } + }?; + let cnt: u64 = row.get(0).map_err(|e| println!("{:?}", e))?; + Ok(cnt.to_string()) +} + +pub fn run() { + let state = AppState::new(); + tauri::Builder::default() + .plugin(tauri_plugin_fs::init()) + .setup(|app| { + app.manage(Mutex::new(state)); + let scope = app.fs_scope(); + let path = app.path(); + scope.allow_directory(path.temp_dir()?, false)?; + Ok(()) + }) + .invoke_handler(tauri::generate_handler![ + swap, + count, + inventory, + data_door::pull_data, + data_door::push_data, + ]) + .run(tauri::generate_context!()) + .expect("error while running tauri application"); +} diff --git a/www/styles.css b/styles.scss similarity index 100% rename from www/styles.css rename to styles.scss diff --git a/tauri.conf.json b/tauri.conf.json index 2e1ed07..5ef499e 100644 --- a/tauri.conf.json +++ b/tauri.conf.json @@ -4,7 +4,11 @@ "version": "0.1.0", "identifier": "de.mathebau.bkbh", "build": { - "frontendDist": "www" + "beforeDevCommand": "cd bkbh && trunk serve", + "devUrl": "http://localhost:1420", + "beforeBuildCommand": "cd bkbh && trunk build", + "frontendDist": "www", + "features": ["tauri"] }, "app": { "withGlobalTauri": true, diff --git a/trunk.html b/trunk.html new file mode 100644 index 0000000..5562473 --- /dev/null +++ b/trunk.html @@ -0,0 +1,12 @@ + + + + + + + Darmstadt sagt Nein zur Bezahlkartei! + + + + + diff --git a/www/index.html b/www/index.html deleted file mode 100644 index d078ceb..0000000 --- a/www/index.html +++ /dev/null @@ -1,188 +0,0 @@ - - - - - - - Darmstadt sagt Nein zur Bezahlkartei! - - - - - -
-
-
-
-
-
- - - diff --git a/www/main.js b/www/main.js deleted file mode 100644 index f3ada68..0000000 --- a/www/main.js +++ /dev/null @@ -1,67 +0,0 @@ -const { invoke } = window.__TAURI__.core; - -let callbacks = { - '#nav-cafe': () => activate("", "cafe", ["angel"]), - '#nav-angel': () => activate("", "angel", ["cafe"]), - '#cafe-nav-inventory': () => activate("cafe-", "inventory", ["voucher"]), - '#cafe-nav-voucher': () => activate("cafe-", "voucher", ["inventory"]), - '#cafe-inventory form': () => inventory(), - '#cafe-voucher-aldi': () => swap("aldi"), - '#cafe-voucher-dm': () => swap("dm"), - '#cafe-voucher-lidl': () => swap("lidl"), - '#cafe-voucher-rewe': () => swap("rewe"), - '#cafe-voucher-tegut': () => swap("tegut"), -} -let stores = [ - "aldi", - "dm", - "lidl", - "rewe", - "tegut", -] - -async function increment(el) { - var el = document.querySelector(el+" input"); - let v = parseInt(el.value, 10); - v = isNaN(v) ? 0 : v; - v++; - el.value = v; -} - -async function inventory() { - const form = document.querySelector("#cafe-inventory form"); - const fd = new FormData(form); - const obj = Object.fromEntries(fd); - await invoke("inventory", { data: obj }); -} - -async function swap(s) { - await invoke("swap", { store: s, acc: 1 }); - document.querySelector("h1").textContent = await invoke("count", {}); -} - -async function activate(ctx, el, nels) { - document.querySelector("#"+ctx+el).style.display = ""; - for (const nel of nels) { - document.querySelector("#"+ctx+nel).style.display = "none"; - } - document.querySelector("#"+ctx+"nav").classList.remove("v-container"); - document.querySelector("#"+ctx+"nav").classList.add("h-container"); -} - -window.addEventListener("DOMContentLoaded", () => { - for (let key in callbacks) { - if (callbacks.hasOwnProperty(key)) { - document.querySelector(key).addEventListener("submit", (e) => { - e.preventDefault(); - callbacks[key](); - }); - } - } - for (const store of stores) { - document.querySelector("#cafe-inventory-"+store+" label").addEventListener("click", (e) => { - e.preventDefault(); - increment("#cafe-inventory-"+store); - }); - } -});