From e6d00e9d55362e36d87fc58f5132bb10739a0a4e Mon Sep 17 00:00:00 2001 From: spinline Date: Mon, 9 Feb 2026 20:07:28 +0300 Subject: [PATCH] modernize: migrate to Leptos 0.8 and Server Functions architecture, break backend->shared loop --- Cargo.lock | 1261 +++++++++++++++++++++-------- backend/Cargo.toml | 15 +- backend/src/handlers/mod.rs | 10 +- backend/src/main.rs | 6 +- backend/src/sse.rs | 2 +- frontend/Cargo.toml | 12 +- shared/Cargo.toml | 28 +- shared/src/lib.rs | 10 +- {backend => shared}/src/scgi.rs | 38 +- shared/src/server_fns/mod.rs | 26 + {backend => shared}/src/xmlrpc.rs | 2 + 11 files changed, 1026 insertions(+), 384 deletions(-) rename {backend => shared}/src/scgi.rs (77%) create mode 100644 shared/src/server_fns/mod.rs rename {backend => shared}/src/xmlrpc.rs (99%) diff --git a/Cargo.lock b/Cargo.lock index bb00932..06802e8 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -97,6 +97,29 @@ dependencies = [ "windows-sys 0.61.2", ] +[[package]] +name = "any_spawner" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "41058deaa38c9d9dd933d6d238d825227cffa668e2839b52879f6619c63eee3b" +dependencies = [ + "futures", + "thiserror 2.0.18", + "wasm-bindgen-futures", +] + +[[package]] +name = "any_spawner" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1384d3fe1eecb464229fcf6eebb72306591c56bf27b373561489458a7c73027d" +dependencies = [ + "futures", + "thiserror 2.0.18", + "tokio", + "wasm-bindgen-futures", +] + [[package]] name = "anyhow" version = "1.0.101" @@ -125,16 +148,22 @@ dependencies = [ ] [[package]] -name = "async-recursion" -version = "1.1.1" +name = "async-lock" +version = "3.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b43422f69d8ff38f95f1b2bb76517c91589a924d1559a0e935d7c8ce0274c11" +checksum = "290f7f2596bd5b78a9fec8088ccd89180d7f9f55b94b0576823bbbdc72ee8311" dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.114", + "event-listener", + "event-listener-strategy", + "pin-project-lite", ] +[[package]] +name = "async-once-cell" +version = "0.5.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4288f83726785267c6f2ef073a3d83dc3f9b81464e9f99898240cced85fce35a" + [[package]] name = "async-trait" version = "0.1.89" @@ -163,9 +192,9 @@ checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0" [[package]] name = "attribute-derive" -version = "0.9.2" +version = "0.10.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f1ee502851995027b06f99f5ffbeffa1406b38d0b318a1ebfa469332c6cbafd" +checksum = "05832cdddc8f2650cc2cc187cc2e952b8c133a48eb055f35211f61ee81502d77" dependencies = [ "attribute-derive-macro", "derive-where", @@ -177,14 +206,14 @@ dependencies = [ [[package]] name = "attribute-derive-macro" -version = "0.9.2" +version = "0.10.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3601467f634cfe36c4780ca9c75dea9a5b34529c1f2810676a337e7e0997f954" +checksum = "0a7cdbbd4bd005c5d3e2e9c885e6fa575db4f4a3572335b974d8db853b6beb61" dependencies = [ "collection_literals", "interpolator", "manyhow", - "proc-macro-utils 0.8.0", + "proc-macro-utils", "proc-macro2", "quote", "quote-use", @@ -218,6 +247,7 @@ dependencies = [ "matchit", "memchr", "mime", + "multer", "percent-encoding", "pin-project-lite", "serde_core", @@ -228,7 +258,7 @@ dependencies = [ "sync_wrapper", "tokio", "tokio-tungstenite", - "tower 0.5.3", + "tower", "tower-layer", "tower-service", "tracing", @@ -301,6 +331,8 @@ dependencies = [ "dotenvy", "futures", "governor", + "leptos 0.8.15", + "leptos_axum", "mime_guess", "openssl", "quick-xml", @@ -315,7 +347,7 @@ dependencies = [ "tokio", "tokio-stream", "tokio-util", - "tower 0.4.13", + "tower", "tower-http", "tower_governor", "tracing", @@ -325,6 +357,12 @@ dependencies = [ "web-push", ] +[[package]] +name = "base16" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d27c3610c36aee21ce8ac510e6224498de4228ad772a171ed65643a24693a5a8" + [[package]] name = "base16ct" version = "0.2.0" @@ -479,33 +517,6 @@ dependencies = [ "windows-link", ] -[[package]] -name = "ciborium" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "42e69ffd6f0917f5c029256a24d0161db17cea3997d185db0d35926308770f0e" -dependencies = [ - "ciborium-io", - "ciborium-ll", - "serde", -] - -[[package]] -name = "ciborium-io" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05afea1e0a06c9be33d539b876f1ce3692f4afea2cb41f740e7743225ed1c757" - -[[package]] -name = "ciborium-ll" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57663b653d948a338bfb3eeba9bb2fd5fcfaecb9e199e87e1eda4d9e8b240fd9" -dependencies = [ - "ciborium-io", - "half", -] - [[package]] name = "cipher" version = "0.4.4" @@ -575,6 +586,17 @@ dependencies = [ "thiserror 1.0.69", ] +[[package]] +name = "codee" +version = "0.3.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a9dbbdc4b4d349732bc6690de10a9de952bd39ba6a065c586e26600b6b0b91f5" +dependencies = [ + "serde", + "serde_json", + "thiserror 2.0.18", +] + [[package]] name = "collection_literals" version = "1.0.3" @@ -618,15 +640,15 @@ dependencies = [ [[package]] name = "config" -version = "0.14.1" +version = "0.15.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68578f196d2a33ff61b27fae256c3164f65e36382648e30666dde05b8cc9dfdf" +checksum = "b30fa8254caad766fc03cb0ccae691e14bf3bd72bfff27f72802ce729551b3d6" dependencies = [ - "convert_case", - "nom", + "convert_case 0.6.0", "pathdiff", - "serde", + "serde_core", "toml", + "winnow", ] [[package]] @@ -661,6 +683,12 @@ version = "0.9.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c2459377285ad874054d797f3ccebf984978aa39129f6eafde5cdc8315b612f8" +[[package]] +name = "const-str" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b0664d2867b4a32697dfe655557f5c3b187e9b605b38612a748e5ec99811d160" + [[package]] name = "const_format" version = "0.2.35" @@ -681,6 +709,12 @@ dependencies = [ "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.6.0" @@ -690,6 +724,33 @@ dependencies = [ "unicode-segmentation", ] +[[package]] +name = "convert_case" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bb402b8d4c85569410425650ce3eddc7d698ed96d39a73f941b08fb63082f1e7" +dependencies = [ + "unicode-segmentation", +] + +[[package]] +name = "convert_case" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "baaaa0ecca5b51987b9423ccdc971514dd8b0bb7b4060b983d3664dad3f1f89f" +dependencies = [ + "unicode-segmentation", +] + +[[package]] +name = "convert_case" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "633458d4ef8c78b72454de2d54fd6ab2e60f9e02be22f3c6104cdc8a4e0fceb9" +dependencies = [ + "unicode-segmentation", +] + [[package]] name = "cookie" version = "0.18.1" @@ -765,12 +826,6 @@ version = "0.8.21" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d0a5c400df2834b80a4c3327b3aad3a4c4cd4de0629063962b03235697506a28" -[[package]] -name = "crunchy" -version = "0.2.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "460fbee9c2c2f33933d720630a6a0bac33ba7053db5344fac858d4b8952d77d5" - [[package]] name = "crypto-bigint" version = "0.5.5" @@ -834,19 +889,6 @@ dependencies = [ "syn 2.0.114", ] -[[package]] -name = "dashmap" -version = "5.5.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "978747c1d849a7d2ee5e8adc0159961c48fb7e5db2f06af6723b80123bb53856" -dependencies = [ - "cfg-if", - "hashbrown 0.14.5", - "lock_api", - "once_cell", - "parking_lot_core", -] - [[package]] name = "dashmap" version = "6.1.0" @@ -990,6 +1032,12 @@ version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "669a445ee724c5c69b1b06fe0b63e70a1c84bc9bb7d9696cd4f4e3ec45050408" +[[package]] +name = "dyn-clone" +version = "1.0.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d0881ea181b1df73ff77ffaaf9c7544ecc11e82fba9b5f27b262a3c73a332555" + [[package]] name = "ecdsa" version = "0.16.9" @@ -1041,6 +1089,16 @@ dependencies = [ "serde", ] +[[package]] +name = "either_of" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "216d23e0ec69759a17f05e1c553f3a6870e5ec73420fbb07807a6f34d5d1d5a4" +dependencies = [ + "paste", + "pin-project-lite", +] + [[package]] name = "elliptic-curve" version = "0.13.8" @@ -1062,12 +1120,27 @@ dependencies = [ "zeroize", ] +[[package]] +name = "encoding_rs" +version = "0.8.35" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "75030f3c4f45dafd7586dd6780965a8c7e8e285a5ecb86713e63a79c5b2766f3" +dependencies = [ + "cfg-if", +] + [[package]] name = "equivalent" version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "877a4ace8713b0bcf2a4e7eec82529c029f1d0619886d18145fea96c3ffe5c0f" +[[package]] +name = "erased" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a1731451909bde27714eacba19c2566362a7f35224f52b153d3f42cf60f72472" + [[package]] name = "errno" version = "0.3.14" @@ -1100,6 +1173,16 @@ dependencies = [ "pin-project-lite", ] +[[package]] +name = "event-listener-strategy" +version = "0.5.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8be9f3dfaaffdae2972880079a491a1a8bb7cbed0b8dd7a347f668b4150a3b93" +dependencies = [ + "event-listener", + "pin-project-lite", +] + [[package]] name = "fastrand" version = "2.3.0" @@ -1202,14 +1285,14 @@ version = "0.1.0" dependencies = [ "base64 0.22.1", "chrono", - "codee", + "codee 0.2.0", "console_error_panic_hook", "console_log", "futures", - "gloo-net 0.5.0", + "gloo-net", "gloo-timers", "js-sys", - "leptos", + "leptos 0.8.15", "leptos-use", "leptos_router", "log", @@ -1265,6 +1348,7 @@ dependencies = [ "futures-core", "futures-task", "futures-util", + "num_cpus", ] [[package]] @@ -1349,10 +1433,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ff2abc00be7fca6ebc474524697ae276ad847ad0a6b3faa4bcb027e9a4614ad0" dependencies = [ "cfg-if", - "js-sys", "libc", "wasi", - "wasm-bindgen", ] [[package]] @@ -1369,27 +1451,6 @@ dependencies = [ "wasm-bindgen", ] -[[package]] -name = "gloo-net" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43aaa242d1239a8822c15c645f02166398da4f8b5c4bae795c1f5b44e9eee173" -dependencies = [ - "futures-channel", - "futures-core", - "futures-sink", - "gloo-utils", - "http 0.2.12", - "js-sys", - "pin-project", - "serde", - "serde_json", - "thiserror 1.0.69", - "wasm-bindgen", - "wasm-bindgen-futures", - "web-sys", -] - [[package]] name = "gloo-net" version = "0.6.0" @@ -1443,7 +1504,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9efcab3c1958580ff1f25a2a41be1668f7603d849bb63af523b208a3cc1223b8" dependencies = [ "cfg-if", - "dashmap 6.1.0", + "dashmap", "futures-sink", "futures-timer", "futures-util", @@ -1470,6 +1531,12 @@ dependencies = [ "subtle", ] +[[package]] +name = "guardian" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "17e2ac29387b1aa07a1e448f7bb4f35b500787971e965b02842b900afa5c8f6f" + [[package]] name = "h2" version = "0.4.13" @@ -1489,17 +1556,6 @@ dependencies = [ "tracing", ] -[[package]] -name = "half" -version = "2.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ea2d84b969582b4b1864a92dc5d27cd2b77b622a8d79306834f1be5ba20d84b" -dependencies = [ - "cfg-if", - "crunchy", - "zerocopy", -] - [[package]] name = "hashbrown" version = "0.14.5" @@ -1543,6 +1599,12 @@ version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" +[[package]] +name = "hermit-abi" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fc0fef456e4baa96da950455cd02c081ca953b141298e41db3fc7e36b1da849c" + [[package]] name = "hex" version = "0.4.3" @@ -1682,6 +1744,36 @@ version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9" +[[package]] +name = "hydration_context" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d35485b3dcbf7e044b8f28c73f04f13e7b509c2466fd10cb2a8a447e38f8a93a" +dependencies = [ + "futures", + "once_cell", + "or_poisoned", + "pin-project-lite", + "serde", + "throw_error 0.2.0", +] + +[[package]] +name = "hydration_context" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e8714ae4adeaa846d838f380fbd72f049197de629948f91bf045329e0cf0a283" +dependencies = [ + "futures", + "js-sys", + "once_cell", + "or_poisoned", + "pin-project-lite", + "serde", + "throw_error 0.3.1", + "wasm-bindgen", +] + [[package]] name = "hyper" version = "0.14.32" @@ -1951,9 +2043,9 @@ checksum = "a6cb138bb79a146c1bd460005623e142ef0181e3d0219cb493e02f7d08a35695" [[package]] name = "itertools" -version = "0.12.1" +version = "0.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba291022dbbd398a455acf126c1e341954079855bc60dfdda641363bd6922569" +checksum = "2b192c782037fadd9cfa75548310488aabdbf3d2da73885b31bd0abd03351285" dependencies = [ "either", ] @@ -2035,42 +2127,100 @@ dependencies = [ [[package]] name = "leptos" -version = "0.6.15" +version = "0.7.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0cbb3237c274dadf00dcc27db96c52601b40375117178fb24a991cda073624f0" +checksum = "26b8731cb00f3f0894058155410b95c8955b17273181d2bc72600ab84edd24f1" dependencies = [ + "any_spawner 0.2.0", "cfg-if", - "leptos_config", - "leptos_dom", - "leptos_macro", - "leptos_reactive", - "leptos_server", - "server_fn", - "tracing", - "typed-builder", - "typed-builder-macro", + "either_of", + "futures", + "hydration_context 0.2.1", + "leptos_config 0.7.8", + "leptos_dom 0.7.8", + "leptos_hot_reload 0.7.8", + "leptos_macro 0.7.9", + "leptos_server 0.7.8", + "oco_ref", + "or_poisoned", + "paste", + "reactive_graph 0.1.8", + "rustc-hash", + "send_wrapper", + "serde", + "serde_qs 0.13.0", + "server_fn 0.7.8", + "slotmap", + "tachys 0.1.9", + "thiserror 2.0.18", + "throw_error 0.2.0", + "typed-builder 0.20.1", + "typed-builder-macro 0.20.1", "wasm-bindgen", "web-sys", ] [[package]] -name = "leptos-use" -version = "0.13.13" +name = "leptos" +version = "0.8.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "789bf9f4337e6ebd8f1b407e3f762fdc538d48dc145f9d1dce2338014b38f4dd" +checksum = "5f9569fc37575a5d64c0512145af7630bf651007237ef67a8a77328199d315bb" +dependencies = [ + "any_spawner 0.3.0", + "base64 0.22.1", + "cfg-if", + "either_of", + "futures", + "getrandom 0.3.4", + "hydration_context 0.3.0", + "leptos_config 0.8.8", + "leptos_dom 0.8.7", + "leptos_hot_reload 0.8.5", + "leptos_macro 0.8.14", + "leptos_server 0.8.6", + "oco_ref", + "or_poisoned", + "paste", + "rand 0.9.2", + "reactive_graph 0.2.12", + "rustc-hash", + "rustc_version", + "send_wrapper", + "serde", + "serde_json", + "serde_qs 0.15.0", + "server_fn 0.8.9", + "slotmap", + "tachys 0.2.11", + "thiserror 2.0.18", + "throw_error 0.3.1", + "typed-builder 0.23.2", + "typed-builder-macro 0.23.2", + "wasm-bindgen", + "wasm-bindgen-futures", + "wasm_split_helpers", + "web-sys", +] + +[[package]] +name = "leptos-use" +version = "0.15.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2457c1abaa00dd4601695a989ed796bb19bc44e47ecffe2ad1336cc4c9e4f505" dependencies = [ "cfg-if", "chrono", - "codee", + "codee 0.3.5", "cookie", "default-struct-builder", "futures-util", "gloo-timers", "js-sys", "lazy_static", - "leptos", + "leptos 0.7.8", "paste", - "thiserror 1.0.69", + "send_wrapper", + "thiserror 2.0.18", "unic-langid", "wasm-bindgen", "wasm-bindgen-futures", @@ -2078,53 +2228,90 @@ dependencies = [ ] [[package]] -name = "leptos_config" -version = "0.6.15" +name = "leptos_axum" +version = "0.8.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62ed778611380ddea47568ac6ad6ec5158d39b5bd59e6c4dcd24efc15dc3dc0d" +checksum = "f0caa95760f87f3067e05025140becefdbdfd36cbc2adac4519f06e1f1edf4af" +dependencies = [ + "any_spawner 0.3.0", + "axum", + "dashmap", + "futures", + "hydration_context 0.3.0", + "leptos 0.8.15", + "leptos_integration_utils", + "leptos_macro 0.8.14", + "leptos_meta", + "leptos_router", + "parking_lot", + "server_fn 0.8.9", + "tachys 0.2.11", + "tokio", + "tower", + "tower-http", +] + +[[package]] +name = "leptos_config" +version = "0.7.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5bae3e0ead5a7a814c8340eef7cb8b6cba364125bd8174b15dc9fe1b3cab7e03" dependencies = [ "config", "regex", "serde", - "thiserror 1.0.69", - "typed-builder", + "thiserror 2.0.18", + "typed-builder 0.20.1", +] + +[[package]] +name = "leptos_config" +version = "0.8.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "071fc40aeb9fcab885965bad1887990477253ad51f926cd19068f45a44c59e89" +dependencies = [ + "config", + "regex", + "serde", + "thiserror 2.0.18", + "typed-builder 0.21.2", ] [[package]] name = "leptos_dom" -version = "0.6.15" +version = "0.7.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8401c46c86c1f4c16dcb7881ed319fcdca9cda9b9e78a6088955cb423afcf119" +checksum = "f89d4eb263bd5a9e7c49f780f17063f15aca56fd638c90b9dfd5f4739152e87d" dependencies = [ - "async-recursion", - "cfg-if", - "drain_filter_polyfill", - "futures", - "getrandom 0.2.17", - "html-escape", - "indexmap", - "itertools", "js-sys", - "leptos_reactive", - "once_cell", - "pad-adapter", - "paste", - "rustc-hash", - "serde", - "serde_json", - "server_fn", - "smallvec", - "tracing", + "or_poisoned", + "reactive_graph 0.1.8", + "send_wrapper", + "tachys 0.1.9", + "wasm-bindgen", + "web-sys", +] + +[[package]] +name = "leptos_dom" +version = "0.8.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "78f4330c88694c5575e0bfe4eecf81b045d14e76a4f8b00d5fd2a63f8779f895" +dependencies = [ + "js-sys", + "or_poisoned", + "reactive_graph 0.2.12", + "send_wrapper", + "tachys 0.2.11", "wasm-bindgen", - "wasm-bindgen-futures", "web-sys", ] [[package]] name = "leptos_hot_reload" -version = "0.6.15" +version = "0.7.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6cb53d4794240b684a2f4be224b84bee9e62d2abc498cf2bcd643cd565e01d96" +checksum = "e80219388501d99b246f43b6e7d08a28f327cdd34ba630a35654d917f3e1788e" dependencies = [ "anyhow", "camino", @@ -2139,95 +2326,173 @@ dependencies = [ ] [[package]] -name = "leptos_macro" -version = "0.6.15" +name = "leptos_hot_reload" +version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4b13bc3db70715cd8218c4535a5af3ae3c0e5fea6f018531fc339377b36bc0e0" +checksum = "0d61ec3e1ff8aaee8c5151688550c0363f85bc37845450764c31ff7584a33f38" +dependencies = [ + "anyhow", + "camino", + "indexmap", + "parking_lot", + "proc-macro2", + "quote", + "rstml", + "serde", + "syn 2.0.114", + "walkdir", +] + +[[package]] +name = "leptos_integration_utils" +version = "0.8.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "13cccc9305df53757bae61bf15641bfa6a667b5f78456ace4879dfe0591ae0e8" +dependencies = [ + "futures", + "hydration_context 0.3.0", + "leptos 0.8.15", + "leptos_config 0.8.8", + "leptos_meta", + "leptos_router", + "reactive_graph 0.2.12", +] + +[[package]] +name = "leptos_macro" +version = "0.7.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e621f8f5342b9bdc93bb263b839cee7405027a74560425a2dabea9de7952b1fd" dependencies = [ "attribute-derive", "cfg-if", - "convert_case", + "convert_case 0.7.1", "html-escape", "itertools", - "leptos_hot_reload", + "leptos_hot_reload 0.7.8", "prettyplease", "proc-macro-error2", "proc-macro2", "quote", "rstml", - "server_fn_macro", + "server_fn_macro 0.7.8", "syn 2.0.114", - "tracing", "uuid", ] [[package]] -name = "leptos_reactive" -version = "0.6.15" +name = "leptos_macro" +version = "0.8.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e4161acbf80f59219d8d14182371f57302bc7ff81ee41aba8ba1ff7295727f23" +checksum = "c86ffd2e9cf3e264e9b3e16bdb086cefa26bd0fa7bc6a26b0cc5f6c1fd3178ed" dependencies = [ - "base64 0.22.1", + "attribute-derive", "cfg-if", + "convert_case 0.10.0", + "html-escape", + "itertools", + "leptos_hot_reload 0.8.5", + "prettyplease", + "proc-macro-error2", + "proc-macro2", + "quote", + "rstml", + "rustc_version", + "server_fn_macro 0.8.8", + "syn 2.0.114", + "uuid", +] + +[[package]] +name = "leptos_meta" +version = "0.8.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2d489e38d3f541e9e43ecc2e3a815527840345a2afca629b3e23fcc1dd254578" +dependencies = [ "futures", "indexmap", - "js-sys", - "oco_ref", - "paste", - "pin-project", - "rustc-hash", - "self_cell", - "serde", - "serde-wasm-bindgen", - "serde_json", - "slotmap", - "thiserror 1.0.69", - "tracing", + "leptos 0.8.15", + "or_poisoned", + "send_wrapper", "wasm-bindgen", - "wasm-bindgen-futures", "web-sys", ] [[package]] name = "leptos_router" -version = "0.6.15" +version = "0.8.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8d71dea7d42c0d29c40842750232d3425ed1cf10e313a1f898076d20871dad32" +checksum = "01e573711f2fb9ab5d655ec38115220d359eaaf1dcb93cc0ea624543b6dba959" dependencies = [ - "cfg-if", - "gloo-net 0.6.0", - "itertools", + "any_spawner 0.3.0", + "either_of", + "futures", + "gloo-net", "js-sys", - "lazy_static", - "leptos", - "linear-map", - "once_cell", + "leptos 0.8.15", + "leptos_router_macro", + "or_poisoned", "percent-encoding", + "reactive_graph 0.2.12", + "rustc_version", "send_wrapper", - "serde", - "serde_json", - "serde_qs 0.13.0", - "thiserror 1.0.69", - "tracing", + "tachys 0.2.11", + "thiserror 2.0.18", + "url", "wasm-bindgen", - "wasm-bindgen-futures", "web-sys", ] [[package]] -name = "leptos_server" -version = "0.6.15" +name = "leptos_router_macro" +version = "0.8.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4a97eb90a13f71500b831c7119ddd3bdd0d7ae0a6b0487cade4fddeed3b8c03f" +checksum = "409c0bd99f986c3cfa1a4db2443c835bc602ded1a12784e22ecb28c3ed5a2ae2" dependencies = [ - "inventory", - "lazy_static", - "leptos_macro", - "leptos_reactive", + "proc-macro-error2", + "proc-macro2", + "quote", + "syn 2.0.114", +] + +[[package]] +name = "leptos_server" +version = "0.7.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "66985242812ec95e224fb48effe651ba02728beca92c461a9464c811a71aab11" +dependencies = [ + "any_spawner 0.2.0", + "base64 0.22.1", + "codee 0.3.5", + "futures", + "hydration_context 0.2.1", + "or_poisoned", + "reactive_graph 0.1.8", + "send_wrapper", "serde", - "server_fn", - "thiserror 1.0.69", - "tracing", + "serde_json", + "server_fn 0.7.8", + "tachys 0.1.9", +] + +[[package]] +name = "leptos_server" +version = "0.8.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dbf1045af93050bf3388d1c138426393fc131f6d9e46a65519da884c033ed730" +dependencies = [ + "any_spawner 0.3.0", + "base64 0.22.1", + "codee 0.3.5", + "futures", + "hydration_context 0.3.0", + "or_poisoned", + "reactive_graph 0.2.12", + "send_wrapper", + "serde", + "serde_json", + "server_fn 0.8.9", + "tachys 0.2.11", ] [[package]] @@ -2269,10 +2534,6 @@ name = "linear-map" version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bfae20f6b19ad527b550c223fddc3077a547fc70cda94b9b566575423fd303ee" -dependencies = [ - "serde", - "serde_test", -] [[package]] name = "linux-raw-sys" @@ -2303,9 +2564,9 @@ checksum = "5e5032e24019045c762d3c0f28f5b6b8bbf38563a65908389bf7978758920897" [[package]] name = "manyhow" -version = "0.10.4" +version = "0.11.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f91ea592d76c0b6471965708ccff7e6a5d277f676b90ab31f4d3f3fc77fade64" +checksum = "b33efb3ca6d3b07393750d4030418d594ab1139cee518f0dc88db70fec873587" dependencies = [ "manyhow-macros", "proc-macro2", @@ -2315,11 +2576,11 @@ dependencies = [ [[package]] name = "manyhow-macros" -version = "0.10.4" +version = "0.11.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c64621e2c08f2576e4194ea8be11daf24ac01249a4f53cd8befcbb7077120ead" +checksum = "46fce34d199b78b6e6073abf984c9cf5fd3e9330145a93ee0738a7443e371495" dependencies = [ - "proc-macro-utils 0.8.0", + "proc-macro-utils", "proc-macro2", "quote", ] @@ -2398,6 +2659,23 @@ dependencies = [ "windows-sys 0.61.2", ] +[[package]] +name = "multer" +version = "3.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "83e87776546dc87511aa5ee218730c92b666d7264ab6ed41f9d215af9cd5224b" +dependencies = [ + "bytes", + "encoding_rs", + "futures-util", + "http 1.4.0", + "httparse", + "memchr", + "mime", + "spin", + "version_check", +] + [[package]] name = "native-tls" version = "0.2.14" @@ -2415,6 +2693,12 @@ dependencies = [ "tempfile", ] +[[package]] +name = "next_tuple" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "60993920e071b0c9b66f14e2b32740a4e27ffc82854dcd72035887f336a09a28" + [[package]] name = "nom" version = "7.1.3" @@ -2499,13 +2783,23 @@ dependencies = [ ] [[package]] -name = "oco_ref" -version = "0.1.1" +name = "num_cpus" +version = "1.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c51ebcefb2f0b9a5e0bea115532c8ae4215d1b01eff176d0f4ba4192895c2708" +checksum = "91df4bbde75afed763b708b7eee1e8e7651e02d97f6d5dd763e89367e957b23b" +dependencies = [ + "hermit-abi", + "libc", +] + +[[package]] +name = "oco_ref" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed0423ff9973dea4d6bd075934fdda86ebb8c05bdf9d6b0507067d4a1226371d" dependencies = [ "serde", - "thiserror 1.0.69", + "thiserror 2.0.18", ] [[package]] @@ -2574,6 +2868,12 @@ dependencies = [ "vcpkg", ] +[[package]] +name = "or_poisoned" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8c04f5d74368e4d0dfe06c45c8627c81bd7c317d52762d118fb9b3076f6420fd" + [[package]] name = "p256" version = "0.13.2" @@ -2598,12 +2898,6 @@ dependencies = [ "sha2", ] -[[package]] -name = "pad-adapter" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56d80efc4b6721e8be2a10a5df21a30fa0b470f1539e53d8b4e6e75faf938b63" - [[package]] name = "parking" version = "2.2.1" @@ -2820,29 +3114,6 @@ dependencies = [ "elliptic-curve", ] -[[package]] -name = "proc-macro-error" -version = "1.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c" -dependencies = [ - "proc-macro-error-attr", - "proc-macro2", - "quote", - "version_check", -] - -[[package]] -name = "proc-macro-error-attr" -version = "1.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869" -dependencies = [ - "proc-macro2", - "quote", - "version_check", -] - [[package]] name = "proc-macro-error-attr2" version = "2.0.0" @@ -2862,17 +3133,7 @@ dependencies = [ "proc-macro-error-attr2", "proc-macro2", "quote", -] - -[[package]] -name = "proc-macro-utils" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f59e109e2f795a5070e69578c4dc101068139f74616778025ae1011d4cd41a8" -dependencies = [ - "proc-macro2", - "quote", - "smallvec", + "syn 2.0.114", ] [[package]] @@ -2958,7 +3219,7 @@ version = "0.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "82ebfb7faafadc06a7ab141a6f67bcfb24cb8beb158c6fe933f2f035afa99f35" dependencies = [ - "proc-macro-utils 0.10.0", + "proc-macro-utils", "proc-macro2", "quote", "syn 2.0.114", @@ -3038,6 +3299,109 @@ dependencies = [ "bitflags", ] +[[package]] +name = "reactive_graph" +version = "0.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "76a0ccddbc11a648bd09761801dac9e3f246ef7641130987d6120fced22515e6" +dependencies = [ + "any_spawner 0.2.0", + "async-lock", + "futures", + "guardian", + "hydration_context 0.2.1", + "or_poisoned", + "pin-project-lite", + "rustc-hash", + "send_wrapper", + "serde", + "slotmap", + "thiserror 2.0.18", + "web-sys", +] + +[[package]] +name = "reactive_graph" +version = "0.2.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "17f0df355582937223ea403e52490201d65295bd6981383c69bfae5a1f8730c2" +dependencies = [ + "any_spawner 0.3.0", + "async-lock", + "futures", + "guardian", + "hydration_context 0.3.0", + "indexmap", + "or_poisoned", + "paste", + "pin-project-lite", + "rustc-hash", + "rustc_version", + "send_wrapper", + "serde", + "slotmap", + "thiserror 2.0.18", + "web-sys", +] + +[[package]] +name = "reactive_stores" +version = "0.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aadc7c19e3a360bf19cd595d2dc8b58ce67b9240b95a103fbc1317a8ff194237" +dependencies = [ + "guardian", + "itertools", + "or_poisoned", + "paste", + "reactive_graph 0.1.8", + "reactive_stores_macro 0.1.8", + "rustc-hash", +] + +[[package]] +name = "reactive_stores" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "35372f05664a62a3dd389503371a15b8feb3396f99f6ec000de651fddb030942" +dependencies = [ + "dashmap", + "guardian", + "itertools", + "or_poisoned", + "paste", + "reactive_graph 0.2.12", + "reactive_stores_macro 0.2.6", + "rustc-hash", + "send_wrapper", +] + +[[package]] +name = "reactive_stores_macro" +version = "0.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "221095cb028dc51fbc2833743ea8b1a585da1a2af19b440b3528027495bf1f2d" +dependencies = [ + "convert_case 0.7.1", + "proc-macro-error2", + "proc-macro2", + "quote", + "syn 2.0.114", +] + +[[package]] +name = "reactive_stores_macro" +version = "0.2.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4fa40919eb2975100283b2a70e68eafce1e8bcf81f0622ff168e4c2b3f8d46bb" +dependencies = [ + "convert_case 0.8.0", + "proc-macro-error2", + "proc-macro2", + "quote", + "syn 2.0.114", +] + [[package]] name = "redox_syscall" version = "0.5.18" @@ -3138,16 +3502,17 @@ dependencies = [ [[package]] name = "rstml" -version = "0.11.2" +version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fe542870b8f59dd45ad11d382e5339c9a1047cde059be136a7016095bbdefa77" +checksum = "61cf4616de7499fc5164570d40ca4e1b24d231c6833a88bff0fe00725080fd56" dependencies = [ + "derive-where", "proc-macro2", "proc-macro2-diagnostics", "quote", "syn 2.0.114", "syn_derive", - "thiserror 1.0.69", + "thiserror 2.0.18", ] [[package]] @@ -3186,9 +3551,18 @@ dependencies = [ [[package]] name = "rustc-hash" -version = "1.1.0" +version = "2.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" +checksum = "357703d41365b4b27c590e3ed91eabb1b663f07c4c084095e60cbed4362dff0d" + +[[package]] +name = "rustc_version" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cfcb3a22ef46e85b45de6ee7e79d063319ebb6594faafcf1c225ea92ab6e9b92" +dependencies = [ + "semver", +] [[package]] name = "rustix" @@ -3288,10 +3662,10 @@ dependencies = [ ] [[package]] -name = "self_cell" -version = "1.2.2" +name = "semver" +version = "1.0.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b12e76d157a900eb52e81bc6e9f3069344290341720e9178cde2407113ac8d89" +checksum = "d767eb0aabc880b29956c35734170f26ed551a859dbd361d140cdbeca61ab1e2" [[package]] name = "send_wrapper" @@ -3367,17 +3741,6 @@ dependencies = [ "serde_core", ] -[[package]] -name = "serde_qs" -version = "0.12.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0431a35568651e363364210c91983c1da5eb29404d9f0928b67d4ebcfa7d330c" -dependencies = [ - "percent-encoding", - "serde", - "thiserror 1.0.69", -] - [[package]] name = "serde_qs" version = "0.13.0" @@ -3390,21 +3753,23 @@ dependencies = [ ] [[package]] -name = "serde_spanned" -version = "0.6.9" +name = "serde_qs" +version = "0.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf41e0cfaf7226dca15e8197172c295a782857fcb97fad1808a166870dee75a3" +checksum = "f3faaf9e727533a19351a43cc5a8de957372163c7d35cc48c90b75cdda13c352" dependencies = [ + "percent-encoding", "serde", + "thiserror 2.0.18", ] [[package]] -name = "serde_test" -version = "1.0.177" +name = "serde_spanned" +version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f901ee573cab6b3060453d2d5f0bae4e6d628c23c0a962ff9b5f1d7c8d4f1ed" +checksum = "f8bbf91e5a4d6315eee45e704372590b30e260ee83af6639d64557f51b067776" dependencies = [ - "serde", + "serde_core", ] [[package]] @@ -3421,25 +3786,66 @@ dependencies = [ [[package]] name = "server_fn" -version = "0.6.15" +version = "0.7.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4fae7a3038a32e5a34ba32c6c45eb4852f8affaf8b794ebfcd4b1099e2d62ebe" +checksum = "8d05a9e3fd8d7404985418db38c6617cc793a1a27f398d4fbc9dfe8e41b804e6" dependencies = [ "bytes", - "ciborium", "const_format", - "dashmap 5.5.3", + "dashmap", "futures", - "gloo-net 0.6.0", + "gloo-net", "http 1.4.0", "js-sys", "once_cell", + "pin-project-lite", "send_wrapper", "serde", "serde_json", - "serde_qs 0.12.0", - "server_fn_macro_default", - "thiserror 1.0.69", + "serde_qs 0.13.0", + "server_fn_macro_default 0.7.8", + "thiserror 2.0.18", + "throw_error 0.2.0", + "url", + "wasm-bindgen", + "wasm-bindgen-futures", + "wasm-streams", + "web-sys", + "xxhash-rust", +] + +[[package]] +name = "server_fn" +version = "0.8.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "353d02fa2886cd8dae0b8da0965289fa8f2ecc7df633d1ce965f62fdf9644d29" +dependencies = [ + "axum", + "base64 0.22.1", + "bytes", + "const-str", + "const_format", + "dashmap", + "futures", + "gloo-net", + "http 1.4.0", + "http-body-util", + "hyper 1.8.1", + "inventory", + "js-sys", + "pin-project-lite", + "rustc_version", + "rustversion", + "send_wrapper", + "serde", + "serde_json", + "serde_qs 0.15.0", + "server_fn_macro_default 0.8.5", + "thiserror 2.0.18", + "throw_error 0.3.1", + "tokio", + "tower", + "tower-layer", "url", "wasm-bindgen", "wasm-bindgen-futures", @@ -3450,12 +3856,12 @@ dependencies = [ [[package]] name = "server_fn_macro" -version = "0.6.15" +version = "0.7.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "faaaf648c6967aef78177c0610478abb5a3455811f401f3c62d10ae9bd3901a1" +checksum = "504b35e883267b3206317b46d02952ed7b8bf0e11b2e209e2eb453b609a5e052" dependencies = [ "const_format", - "convert_case", + "convert_case 0.6.0", "proc-macro2", "quote", "syn 2.0.114", @@ -3463,12 +3869,37 @@ dependencies = [ ] [[package]] -name = "server_fn_macro_default" -version = "0.6.15" +name = "server_fn_macro" +version = "0.8.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f2aa8119b558a17992e0ac1fd07f080099564f24532858811ce04f742542440" +checksum = "950b8cfc9ff5f39ca879c5a7c5e640de2695a199e18e424c3289d0964cabe642" dependencies = [ - "server_fn_macro", + "const_format", + "convert_case 0.8.0", + "proc-macro2", + "quote", + "rustc_version", + "syn 2.0.114", + "xxhash-rust", +] + +[[package]] +name = "server_fn_macro_default" +version = "0.7.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eb8b274f568c94226a8045668554aace8142a59b8bca5414ac5a79627c825568" +dependencies = [ + "server_fn_macro 0.7.8", + "syn 2.0.114", +] + +[[package]] +name = "server_fn_macro_default" +version = "0.8.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "63eb08f80db903d3c42f64e60ebb3875e0305be502bdc064ec0a0eab42207f00" +dependencies = [ + "server_fn_macro 0.8.8", "syn 2.0.114", ] @@ -3507,7 +3938,14 @@ dependencies = [ name = "shared" version = "0.1.0" dependencies = [ + "bytes", + "leptos 0.8.15", + "leptos_axum", + "leptos_router", + "quick-xml", "serde", + "thiserror 2.0.18", + "tokio", "utoipa", ] @@ -3565,7 +4003,6 @@ version = "1.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bdd58c3c93c3d278ca835519292445cb4b0d4dc59ccfdf7ceadaab3f8aeb4038" dependencies = [ - "serde", "version_check", ] @@ -3877,11 +4314,11 @@ dependencies = [ [[package]] name = "syn_derive" -version = "0.1.8" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1329189c02ff984e9736652b1631330da25eaa6bc639089ed4915d25446cbe7b" +checksum = "cdb066a04799e45f5d582e8fc6ec8e6d6896040d00898eb4e6a835196815b219" dependencies = [ - "proc-macro-error", + "proc-macro-error2", "proc-macro2", "quote", "syn 2.0.114", @@ -3916,6 +4353,74 @@ dependencies = [ "syn 2.0.114", ] +[[package]] +name = "tachys" +version = "0.1.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f66c3b70c32844a6f1e2943c72a33ebb777ad6acbeb20d1329d62e3a7806d6ec" +dependencies = [ + "any_spawner 0.2.0", + "async-trait", + "const_str_slice_concat", + "drain_filter_polyfill", + "dyn-clone", + "either_of", + "futures", + "html-escape", + "indexmap", + "itertools", + "js-sys", + "linear-map", + "next_tuple", + "oco_ref", + "once_cell", + "or_poisoned", + "parking_lot", + "paste", + "reactive_graph 0.1.8", + "reactive_stores 0.1.8", + "rustc-hash", + "send_wrapper", + "slotmap", + "throw_error 0.2.0", + "wasm-bindgen", + "web-sys", +] + +[[package]] +name = "tachys" +version = "0.2.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f2b2db11e455f7e84e2cc3e76f8a3f3843f7956096265d5ecff781eabe235077" +dependencies = [ + "any_spawner 0.3.0", + "async-trait", + "const_str_slice_concat", + "drain_filter_polyfill", + "either_of", + "erased", + "futures", + "html-escape", + "indexmap", + "itertools", + "js-sys", + "linear-map", + "next_tuple", + "oco_ref", + "or_poisoned", + "parking_lot", + "paste", + "reactive_graph 0.2.12", + "reactive_stores 0.3.1", + "rustc-hash", + "rustc_version", + "send_wrapper", + "slotmap", + "throw_error 0.3.1", + "wasm-bindgen", + "web-sys", +] + [[package]] name = "tailwind_fuse" version = "0.3.2" @@ -3987,6 +4492,24 @@ dependencies = [ "cfg-if", ] +[[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 = "throw_error" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc0ed6038fcbc0795aca7c92963ddda636573b956679204e044492d2b13c8f64" +dependencies = [ + "pin-project-lite", +] + [[package]] name = "time" version = "0.3.47" @@ -4120,44 +4643,34 @@ dependencies = [ [[package]] name = "toml" -version = "0.8.23" +version = "0.9.11+spec-1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc1beb996b9d83529a9e75c17a1686767d148d70663143c7854d8b4a09ced362" +checksum = "f3afc9a848309fe1aaffaed6e1546a7a14de1f935dc9d89d32afd9a44bab7c46" dependencies = [ - "serde", + "serde_core", "serde_spanned", "toml_datetime", - "toml_edit", -] - -[[package]] -name = "toml_datetime" -version = "0.6.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22cddaf88f4fbc13c51aebbf5f8eceb5c7c5a9da2ac40a13519eb5b0a0e8f11c" -dependencies = [ - "serde", -] - -[[package]] -name = "toml_edit" -version = "0.22.27" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41fe8c660ae4257887cf66394862d21dbca4a6ddd26f04a3560410406a2f819a" -dependencies = [ - "indexmap", - "serde", - "serde_spanned", - "toml_datetime", - "toml_write", + "toml_parser", "winnow", ] [[package]] -name = "toml_write" -version = "0.1.2" +name = "toml_datetime" +version = "0.7.5+spec-1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d99f8c9a7727884afe522e9bd5edbfc91a3312b36a77b5fb8926e4c31a41801" +checksum = "92e1cfed4a3038bc5a127e35a2d360f145e1f4b971b551a2ba5fd7aedf7e1347" +dependencies = [ + "serde_core", +] + +[[package]] +name = "toml_parser" +version = "1.0.6+spec-1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a3198b4b0a8e11f09dd03e133c0280504d0801269e9afa46362ffde1cbeebf44" +dependencies = [ + "winnow", +] [[package]] name = "tonic" @@ -4182,23 +4695,7 @@ dependencies = [ "sync_wrapper", "tokio", "tokio-stream", - "tower 0.5.3", - "tower-layer", - "tower-service", - "tracing", -] - -[[package]] -name = "tower" -version = "0.4.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b8fa9be0de6cf49e536ce1851f987bd21a43b771b09473c3549a6c853db37c1c" -dependencies = [ - "futures-core", - "futures-util", - "pin-project", - "pin-project-lite", - "tokio", + "tower", "tower-layer", "tower-service", "tracing", @@ -4225,9 +4722,9 @@ dependencies = [ [[package]] name = "tower-http" -version = "0.5.2" +version = "0.6.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e9cd434a998747dd2c4276bc96ee2e0c7a2eadf3cae88e52be55a05fa9053f5" +checksum = "d4e6559d53cc268e5031cd8429d05415bc4cb4aefc4aa5d6cc35fbf5b924a1f8" dependencies = [ "async-compression", "bitflags", @@ -4275,7 +4772,7 @@ dependencies = [ "pin-project", "thiserror 2.0.18", "tonic", - "tower 0.5.3", + "tower", "tracing", ] @@ -4366,18 +4863,58 @@ dependencies = [ [[package]] name = "typed-builder" -version = "0.18.2" +version = "0.20.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77739c880e00693faef3d65ea3aad725f196da38b22fdc7ea6ded6e1ce4d3add" +checksum = "cd9d30e3a08026c78f246b173243cf07b3696d274debd26680773b6773c2afc7" dependencies = [ - "typed-builder-macro", + "typed-builder-macro 0.20.1", +] + +[[package]] +name = "typed-builder" +version = "0.21.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fef81aec2ca29576f9f6ae8755108640d0a86dd3161b2e8bca6cfa554e98f77d" +dependencies = [ + "typed-builder-macro 0.21.2", +] + +[[package]] +name = "typed-builder" +version = "0.23.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "31aa81521b70f94402501d848ccc0ecaa8f93c8eb6999eb9747e72287757ffda" +dependencies = [ + "typed-builder-macro 0.23.2", ] [[package]] name = "typed-builder-macro" -version = "0.18.2" +version = "0.20.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f718dfaf347dcb5b983bfc87608144b0bad87970aebcbea5ce44d2a30c08e63" +checksum = "3c36781cc0e46a83726d9879608e4cf6c2505237e263a8eb8c24502989cfdb28" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.114", +] + +[[package]] +name = "typed-builder-macro" +version = "0.21.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1ecb9ecf7799210407c14a8cfdfe0173365780968dc57973ed082211958e0b18" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.114", +] + +[[package]] +name = "typed-builder-macro" +version = "0.23.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "076a02dc54dd46795c2e9c8282ed40bcfb1e22747e955de9389a1de28190fb26" dependencies = [ "proc-macro2", "quote", @@ -4681,6 +5218,28 @@ dependencies = [ "web-sys", ] +[[package]] +name = "wasm_split_helpers" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a114b3073258dd5de3d812cdd048cca6842342755e828a14dbf15f843f2d1b84" +dependencies = [ + "async-once-cell", + "wasm_split_macros", +] + +[[package]] +name = "wasm_split_macros" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "56481f8ed1a9f9ae97ea7b08a5e2b12e8adf9a7818a6ba952b918e09c7be8bf0" +dependencies = [ + "base16", + "quote", + "sha2", + "syn 2.0.114", +] + [[package]] name = "web-push" version = "0.10.4" diff --git a/backend/Cargo.toml b/backend/Cargo.toml index 7e015bf..82ef086 100644 --- a/backend/Cargo.toml +++ b/backend/Cargo.toml @@ -4,15 +4,15 @@ version = "0.1.0" edition = "2021" [features] -default = ["push-notifications", "swagger"] +default = ["swagger"] # push-notifications kaldırıldı push-notifications = ["web-push", "openssl"] swagger = ["utoipa-swagger-ui"] [dependencies] axum = { version = "0.8", features = ["macros", "ws"] } tokio = { version = "1", features = ["full"] } -tower = { version = "0.4", features = ["util", "timeout"] } -tower-http = { version = "0.5", features = ["fs", "trace", "cors", "compression-full"] } +tower = { version = "0.5", features = ["util", "timeout"] } +tower-http = { version = "0.6", features = ["fs", "trace", "cors", "compression-full"] } serde = { version = "1", features = ["derive"] } serde_json = "1" tracing = "0.1" @@ -21,16 +21,15 @@ tokio-stream = "0.1" bytes = "1" futures = "0.3" quick-xml = { version = "0.31", features = ["serde", "serialize"] } -# We might need `tokio-util` for codecs if we implement SCGI manually tokio-util = { version = "0.7", features = ["codec", "io"] } clap = { version = "4.4", features = ["derive", "env"] } rust-embed = "8.2" mime_guess = "2.0" -shared = { path = "../shared" } +shared = { path = "../shared", features = ["ssr"] } thiserror = "2.0.18" dotenvy = "0.15.7" utoipa = { version = "5.4.0", features = ["axum_extras"] } -utoipa-swagger-ui = { version = "9.0.2", features = ["axum"], optional = true } +utoipa-swagger-ui = { version = "9.0", features = ["axum"], optional = true } web-push = { version = "0.10", default-features = false, features = ["hyper-client"], optional = true } base64 = "0.22" openssl = { version = "0.10", features = ["vendored"], optional = true } @@ -42,3 +41,7 @@ anyhow = "1.0.101" time = { version = "0.3.47", features = ["serde", "formatting", "parsing"] } tower_governor = "0.8.0" governor = "0.10.4" + +# Leptos +leptos = { version = "0.8.15", features = ["nightly"] } +leptos_axum = { version = "0.8.7" } \ No newline at end of file diff --git a/backend/src/handlers/mod.rs b/backend/src/handlers/mod.rs index c858a26..9bebd2b 100644 --- a/backend/src/handlers/mod.rs +++ b/backend/src/handlers/mod.rs @@ -1,7 +1,9 @@ -use crate::{ +use shared::{ xmlrpc::{self, RpcParam}, - AppState, + AddTorrentRequest, GlobalLimitRequest, SetFilePriorityRequest, SetLabelRequest, TorrentActionRequest, + TorrentFile, TorrentPeer, TorrentTracker, }; +use crate::AppState; #[cfg(feature = "push-notifications")] use crate::push; use axum::{ @@ -11,10 +13,6 @@ use axum::{ BoxError, }; use rust_embed::RustEmbed; -use shared::{ - AddTorrentRequest, GlobalLimitRequest, SetFilePriorityRequest, SetLabelRequest, TorrentActionRequest, - TorrentFile, TorrentPeer, TorrentTracker, -}; pub mod auth; pub mod setup; diff --git a/backend/src/main.rs b/backend/src/main.rs index 0bacb64..73917c5 100644 --- a/backend/src/main.rs +++ b/backend/src/main.rs @@ -4,9 +4,9 @@ mod handlers; #[cfg(feature = "push-notifications")] mod push; mod rate_limit; -mod scgi; mod sse; -mod xmlrpc; + +use shared::{scgi, xmlrpc}; use axum::error_handling::HandleErrorLayer; use axum::{ @@ -59,6 +59,7 @@ async fn auth_middleware( if path.starts_with("/api/auth/login") || path.starts_with("/api/auth/check") // Used by frontend to decide where to go || path.starts_with("/api/setup") + || path.starts_with("/api/server_fns") || path.starts_with("/swagger-ui") || path.starts_with("/api-docs") || !path.starts_with("/api/") // Allow static files (frontend) @@ -528,6 +529,7 @@ async fn main() { "/api/settings/global-limits", get(handlers::get_global_limit_handler).post(handlers::set_global_limit_handler), ) + .route("/api/server_fns/{*fn_name}", post(leptos_axum::handle_server_fns)) .fallback(handlers::static_handler); // Serve static files for everything else #[cfg(feature = "push-notifications")] diff --git a/backend/src/sse.rs b/backend/src/sse.rs index 0d62c2c..fe9ad57 100644 --- a/backend/src/sse.rs +++ b/backend/src/sse.rs @@ -1,4 +1,4 @@ -use crate::xmlrpc::{ +use shared::xmlrpc::{ parse_i64_response, parse_multicall_response, RpcParam, RtorrentClient, XmlRpcError, }; use crate::AppState; diff --git a/frontend/Cargo.toml b/frontend/Cargo.toml index 491e8aa..c63ac09 100644 --- a/frontend/Cargo.toml +++ b/frontend/Cargo.toml @@ -7,15 +7,15 @@ edition = "2021" crate-type = ["cdylib", "rlib"] [dependencies] -leptos = { version = "0.6", features = ["csr"] } -leptos_router = { version = "0.6", features = ["csr"] } +leptos = { version = "0.8.7", features = ["csr", "nightly"] } +leptos_router = { version = "0.8.7", features = ["nightly"] } console_error_panic_hook = "0.1" console_log = "1" log = "0.4" serde = { version = "1", features = ["derive"] } serde_json = "1" -gloo-net = "0.5" +gloo-net = "0.6" gloo-timers = { version = "0.3", features = ["futures"] } wasm-bindgen = "0.2" wasm-bindgen-futures = "0.4" @@ -23,11 +23,11 @@ uuid = { version = "1", features = ["v4", "js"] } futures = "0.3" chrono = { version = "0.4", features = ["serde", "wasm-bindgen"] } web-sys = { version = "0.3", features = ["HtmlDivElement", "HtmlUListElement", "HtmlLiElement", "HtmlAnchorElement", "MouseEvent", "Event", "Window", "Document", "Element", "DomTokenList", "CssStyleDeclaration", "Storage", "TouchEvent", "TouchList", "Touch", "Navigator", "Notification", "NotificationOptions", "NotificationPermission", "ServiceWorkerContainer", "ServiceWorkerRegistration", "PushManager", "PushSubscription", "PushSubscriptionOptions", "PushSubscriptionOptionsInit", "HtmlDetailsElement"] } -shared = { path = "../shared" } +shared = { path = "../shared", features = ["hydrate"] } tailwind_fuse = "0.3.2" js-sys = "0.3.85" base64 = "0.22.1" serde-wasm-bindgen = "0.6.5" -leptos-use = "0.13" +leptos-use = "0.15" codee = "0.2" -thiserror = "2.0" +thiserror = "2.0" \ No newline at end of file diff --git a/shared/Cargo.toml b/shared/Cargo.toml index f36fa6d..5bbc0c3 100644 --- a/shared/Cargo.toml +++ b/shared/Cargo.toml @@ -1,8 +1,32 @@ [package] name = "shared" version = "0.1.0" -edition = "2024" +edition = "2021" + +[features] +default = [] +ssr = [ + "dep:tokio", + "dep:bytes", + "dep:thiserror", + "dep:quick-xml", + "dep:leptos_axum", + "leptos/ssr", + "leptos_router/ssr", +] +hydrate = ["leptos/hydrate"] [dependencies] -serde = { version = "1.0.228", features = ["derive"] } +serde = { version = "1.0", features = ["derive"] } utoipa = { version = "5.4.0", features = ["axum_extras"] } + +# Leptos 0.8.7 +leptos = { version = "0.8.7", features = ["nightly"] } +leptos_router = { version = "0.8.7", features = ["nightly"] } +leptos_axum = { version = "0.8.7", optional = true } + +# SSR Dependencies (XML-RPC & SCGI) +tokio = { version = "1", features = ["full"], optional = true } +bytes = { version = "1", optional = true } +thiserror = { version = "2", optional = true } +quick-xml = { version = "0.31", features = ["serde", "serialize"], optional = true } \ No newline at end of file diff --git a/shared/src/lib.rs b/shared/src/lib.rs index 4dc6361..dda631b 100644 --- a/shared/src/lib.rs +++ b/shared/src/lib.rs @@ -1,6 +1,14 @@ use serde::{Deserialize, Serialize}; use utoipa::ToSchema; +#[cfg(feature = "ssr")] +pub mod scgi; + +#[cfg(feature = "ssr")] +pub mod xmlrpc; + +pub mod server_fns; + #[derive(Debug, Serialize, Deserialize, Clone, PartialEq, ToSchema)] pub struct Torrent { pub hash: String, @@ -135,4 +143,4 @@ pub struct SetLabelRequest { pub struct AddTorrentRequest { #[schema(example = "magnet:?xt=urn:btih:...")] pub uri: String, -} +} \ No newline at end of file diff --git a/backend/src/scgi.rs b/shared/src/scgi.rs similarity index 77% rename from backend/src/scgi.rs rename to shared/src/scgi.rs index 2a7dffe..eb1db03 100644 --- a/backend/src/scgi.rs +++ b/shared/src/scgi.rs @@ -1,3 +1,5 @@ +#![cfg(feature = "ssr")] + use bytes::Bytes; use std::collections::HashMap; use thiserror::Error; @@ -94,16 +96,34 @@ pub async fn send_request(socket_path: &str, request: ScgiRequest) -> Result Result { + let socket_path = std::env::var("RTORRENT_SOCKET").unwrap_or_else(|_| "/tmp/rtorrent.sock".to_string()); + + #[cfg(feature = "ssr")] + { + let client = RtorrentClient::new(&socket_path); + match client.call("system.client_version", &[]).await { + Ok(xml) => { + let version = xmlrpc::parse_string_response(&xml).unwrap_or(xml); + Ok(version) + }, + Err(e) => Err(ServerFnError::ServerError(e.to_string())), + } + } + #[cfg(not(feature = "ssr"))] + { + unreachable!() + } +} \ No newline at end of file diff --git a/backend/src/xmlrpc.rs b/shared/src/xmlrpc.rs similarity index 99% rename from backend/src/xmlrpc.rs rename to shared/src/xmlrpc.rs index 9ca6022..d5c1499 100644 --- a/backend/src/xmlrpc.rs +++ b/shared/src/xmlrpc.rs @@ -1,3 +1,5 @@ +#![cfg(feature = "ssr")] + use crate::scgi::{send_request, ScgiError, ScgiRequest}; use quick_xml::de::from_str; use quick_xml::se::to_string;