From 219c7254fb6d70e8cd02223b341296fd1cfe7ab5 Mon Sep 17 00:00:00 2001 From: Michael Mikovsky <77305074+Astatin3@users.noreply.github.com> Date: Fri, 20 Feb 2026 14:13:41 -0700 Subject: [PATCH] Remove old code --- Cargo.lock | 4253 +-------------------- Cargo.toml | 7 +- core-modules/client/.cargo/config.toml | 3 - core-modules/client/Cargo.lock | 873 ----- core-modules/client/Cargo.toml | 26 - core-modules/client/build.sh | 28 - core-modules/client/src/client_runtime.rs | 126 - core-modules/client/src/lib.rs | 70 - core-modules/server/Cargo.lock | 861 ----- core-modules/server/Cargo.toml | 25 - core-modules/server/build.sh | 24 - core-modules/server/src/lib.rs | 27 - core-modules/server/src/server_runtime.rs | 108 - core-modules/server2/Cargo.toml | 16 - core-modules/server2/src/lib.rs | 5 - src/announcement.rs | 28 - src/config/config_struct.rs | 56 - src/config/config_struct_list.rs | 32 - src/config/mod.rs | 41 - src/config/tree.rs | 75 - src/lib.rs | 5 - ush-gui/Cargo.toml | 47 - ush-gui/Trunk.toml | 20 - ush-gui/assets/favicon.ico | Bin 15406 -> 0 bytes ush-gui/assets/manifest.json | 11 - ush-gui/assets/sw.js | 77 - ush-gui/index.html | 178 - ush-gui/src/app/app.rs | 94 - ush-gui/src/app/mod.rs | 135 - ush-gui/src/app/windows.rs | 91 - ush-gui/src/auth/js_poll.rs | 108 - ush-gui/src/auth/mod.rs | 222 -- ush-gui/src/auth/webreq.rs | 113 - ush-gui/src/blobs/mod.rs | 0 ush-gui/src/config/mod.rs | 190 - ush-gui/src/config/mod~.rs | 230 -- ush-gui/src/flowchart/container.rs | 93 - ush-gui/src/flowchart/flowchart.rs | 154 - ush-gui/src/flowchart/force.rs | 106 - ush-gui/src/flowchart/group.rs | 59 - ush-gui/src/flowchart/mod.rs | 31 - ush-gui/src/interface/interface.rs | 82 - ush-gui/src/interface/mod.rs | 173 - ush-gui/src/lib.rs | 90 - ush-gui/src/log_viewer/mod.rs | 207 - ush-gui/src/main~.rs | 21 - ush-gui/src/payload_config/mod.rs | 30 - ush-gui/src/payload_config/structs.rs | 126 - ush-manager/Cargo.lock | 845 ---- ush-manager/Cargo.toml | 20 - ush-manager/src/interface.rs | 39 - ush-manager/src/lib.rs | 28 - ush-manager/src/manager/announcement.rs | 16 - ush-manager/src/manager/connection.rs | 36 - ush-manager/src/manager/mod.rs | 196 - ush-manager/src/module.rs | 52 - ush-manager/src/module_interface.rs | 54 - ush-manager/src/network/mod.rs | 30 - ush-manager/src/network/tcp_stream.rs | 128 - ush-manager/src/proc_load.rs | 64 - ush-server/Cargo.lock | 1937 ---------- ush-server/Cargo.toml | 31 - ush-server/TODO.txt | 3 - ush-server/src/api.rs | 105 - ush-server/src/auth/mod.rs | 130 - ush-server/src/auth/structs.rs | 45 - ush-server/src/lib.rs | 59 - ush-server/src/logger.rs | 100 - ush-server/src/main.rs | 45 - ush-server/src/server/blobs.rs | 9 - ush-server/src/server/database.rs | 100 - ush-server/src/server/mod.rs | 81 - ush-server/src/server/tree2.rs | 53 - 73 files changed, 12 insertions(+), 13571 deletions(-) delete mode 100644 core-modules/client/.cargo/config.toml delete mode 100644 core-modules/client/Cargo.lock delete mode 100644 core-modules/client/Cargo.toml delete mode 100755 core-modules/client/build.sh delete mode 100644 core-modules/client/src/client_runtime.rs delete mode 100644 core-modules/client/src/lib.rs delete mode 100644 core-modules/server/Cargo.lock delete mode 100644 core-modules/server/Cargo.toml delete mode 100755 core-modules/server/build.sh delete mode 100644 core-modules/server/src/lib.rs delete mode 100644 core-modules/server/src/server_runtime.rs delete mode 100644 core-modules/server2/Cargo.toml delete mode 100644 core-modules/server2/src/lib.rs delete mode 100644 src/announcement.rs delete mode 100644 src/config/config_struct.rs delete mode 100644 src/config/config_struct_list.rs delete mode 100644 src/config/mod.rs delete mode 100644 src/config/tree.rs delete mode 100644 ush-gui/Cargo.toml delete mode 100644 ush-gui/Trunk.toml delete mode 100644 ush-gui/assets/favicon.ico delete mode 100644 ush-gui/assets/manifest.json delete mode 100644 ush-gui/assets/sw.js delete mode 100644 ush-gui/index.html delete mode 100644 ush-gui/src/app/app.rs delete mode 100644 ush-gui/src/app/mod.rs delete mode 100644 ush-gui/src/app/windows.rs delete mode 100644 ush-gui/src/auth/js_poll.rs delete mode 100644 ush-gui/src/auth/mod.rs delete mode 100644 ush-gui/src/auth/webreq.rs delete mode 100644 ush-gui/src/blobs/mod.rs delete mode 100644 ush-gui/src/config/mod.rs delete mode 100644 ush-gui/src/config/mod~.rs delete mode 100644 ush-gui/src/flowchart/container.rs delete mode 100644 ush-gui/src/flowchart/flowchart.rs delete mode 100644 ush-gui/src/flowchart/force.rs delete mode 100644 ush-gui/src/flowchart/group.rs delete mode 100644 ush-gui/src/flowchart/mod.rs delete mode 100644 ush-gui/src/interface/interface.rs delete mode 100644 ush-gui/src/interface/mod.rs delete mode 100644 ush-gui/src/lib.rs delete mode 100644 ush-gui/src/log_viewer/mod.rs delete mode 100644 ush-gui/src/main~.rs delete mode 100644 ush-gui/src/payload_config/mod.rs delete mode 100644 ush-gui/src/payload_config/structs.rs delete mode 100644 ush-manager/Cargo.lock delete mode 100644 ush-manager/Cargo.toml delete mode 100644 ush-manager/src/interface.rs delete mode 100644 ush-manager/src/lib.rs delete mode 100644 ush-manager/src/manager/announcement.rs delete mode 100644 ush-manager/src/manager/connection.rs delete mode 100644 ush-manager/src/manager/mod.rs delete mode 100644 ush-manager/src/module.rs delete mode 100644 ush-manager/src/module_interface.rs delete mode 100644 ush-manager/src/network/mod.rs delete mode 100644 ush-manager/src/network/tcp_stream.rs delete mode 100644 ush-manager/src/proc_load.rs delete mode 100644 ush-server/Cargo.lock delete mode 100644 ush-server/Cargo.toml delete mode 100644 ush-server/TODO.txt delete mode 100644 ush-server/src/api.rs delete mode 100644 ush-server/src/auth/mod.rs delete mode 100644 ush-server/src/auth/structs.rs delete mode 100644 ush-server/src/lib.rs delete mode 100644 ush-server/src/logger.rs delete mode 100644 ush-server/src/main.rs delete mode 100644 ush-server/src/server/blobs.rs delete mode 100644 ush-server/src/server/database.rs delete mode 100644 ush-server/src/server/mod.rs delete mode 100644 ush-server/src/server/tree2.rs diff --git a/Cargo.lock b/Cargo.lock index 332045e..621caf2 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2,38 +2,6 @@ # It is not intended for manual editing. version = 4 -[[package]] -name = "ab_glyph" -version = "0.2.32" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "01c0457472c38ea5bd1c3b5ada5e368271cb550be7a4ca4a0b4634e9913f6cc2" -dependencies = [ - "ab_glyph_rasterizer", - "owned_ttf_parser", -] - -[[package]] -name = "ab_glyph_rasterizer" -version = "0.1.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "366ffbaa4442f4684d91e2cd7c5ea7c4ed8add41959a31447066e279e432b618" - -[[package]] -name = "accesskit" -version = "0.21.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf203f9d3bd8f29f98833d1fbef628df18f759248a547e7e01cfbf63cda36a99" -dependencies = [ - "enumn", - "serde", -] - -[[package]] -name = "adler2" -version = "2.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "320119579fcad9c21884f5c4861d16174d0e06250625266f50fe6898340abefa" - [[package]] name = "aes" version = "0.8.4" @@ -45,20 +13,6 @@ dependencies = [ "cpufeatures", ] -[[package]] -name = "ahash" -version = "0.8.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a15f179cd60c4584b8a8c596927aadc462e27f2ca70c04e0071964a73ba7a75" -dependencies = [ - "cfg-if", - "getrandom 0.3.4", - "once_cell", - "serde", - "version_check", - "zerocopy", -] - [[package]] name = "aho-corasick" version = "1.1.4" @@ -68,33 +22,6 @@ dependencies = [ "memchr", ] -[[package]] -name = "android-activity" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ef6978589202a00cd7e118380c448a08b6ed394c3a8df3a430d0898e3a42d046" -dependencies = [ - "android-properties", - "bitflags 2.10.0", - "cc", - "cesu8", - "jni", - "jni-sys", - "libc", - "log", - "ndk", - "ndk-context", - "ndk-sys", - "num_enum", - "thiserror 1.0.69", -] - -[[package]] -name = "android-properties" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fc7eb209b1518d6bb87b283c20095f5228ecda460da70b44f0802523dea6da04" - [[package]] name = "android_system_properties" version = "0.1.5" @@ -104,257 +31,12 @@ dependencies = [ "libc", ] -[[package]] -name = "anstream" -version = "0.6.21" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43d5b281e737544384e969a5ccad3f1cdd24b48086a0fc1b2a5262a26b8f4f4a" -dependencies = [ - "anstyle", - "anstyle-parse", - "anstyle-query", - "anstyle-wincon", - "colorchoice", - "is_terminal_polyfill", - "utf8parse", -] - -[[package]] -name = "anstyle" -version = "1.0.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5192cca8006f1fd4f7237516f40fa183bb07f8fbdfedaa0036de5ea9b0b45e78" - -[[package]] -name = "anstyle-parse" -version = "0.2.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4e7644824f0aa2c7b9384579234ef10eb7efb6a0deb83f9630a49594dd9c15c2" -dependencies = [ - "utf8parse", -] - -[[package]] -name = "anstyle-query" -version = "1.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "40c48f72fd53cd289104fc64099abca73db4166ad86ea0b4341abe65af83dadc" -dependencies = [ - "windows-sys 0.61.2", -] - -[[package]] -name = "anstyle-wincon" -version = "3.0.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "291e6a250ff86cd4a820112fb8898808a366d8f9f58ce16d1f538353ad55747d" -dependencies = [ - "anstyle", - "once_cell_polyfill", - "windows-sys 0.61.2", -] - -[[package]] -name = "arboard" -version = "3.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0348a1c054491f4bfe6ab86a7b6ab1e44e45d899005de92f58b3df180b36ddaf" -dependencies = [ - "clipboard-win", - "image", - "log", - "objc2 0.6.3", - "objc2-app-kit 0.3.2", - "objc2-core-foundation", - "objc2-core-graphics", - "objc2-foundation 0.3.2", - "parking_lot 0.12.5", - "percent-encoding", - "windows-sys 0.60.2", - "x11rb", -] - -[[package]] -name = "arrayvec" -version = "0.7.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7c02d123df017efcdfbd739ef81735b36c5ba83ec3c59c80a9d7ecc718f92e50" - -[[package]] -name = "as-raw-xcb-connection" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "175571dd1d178ced59193a6fc02dde1b972eb0bc56c892cde9beeceac5bf0f6b" - -[[package]] -name = "atomic-waker" -version = "1.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0" - -[[package]] -name = "atomic_float" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "628d228f918ac3b82fe590352cc719d30664a0c13ca3a60266fe02c7132d480a" - [[package]] name = "autocfg" version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c08606f8c3cbf4ce6ec8e28fb0014a2c086708fe954eaa885384a6165172e7e8" -[[package]] -name = "aws-lc-rs" -version = "1.15.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b7b6141e96a8c160799cc2d5adecd5cbbe5054cb8c7c4af53da0f83bb7ad256" -dependencies = [ - "aws-lc-sys", - "untrusted 0.7.1", - "zeroize", -] - -[[package]] -name = "aws-lc-sys" -version = "0.37.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c34dda4df7017c8db52132f0f8a2e0f8161649d15723ed63fc00c82d0f2081a" -dependencies = [ - "cc", - "cmake", - "dunce", - "fs_extra", -] - -[[package]] -name = "axum" -version = "0.8.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b52af3cb4058c895d37317bb27508dccc8e5f2d39454016b297bf4a400597b8" -dependencies = [ - "axum-core", - "bytes", - "form_urlencoded", - "futures-util", - "http", - "http-body", - "http-body-util", - "hyper", - "hyper-util", - "itoa", - "matchit", - "memchr", - "mime", - "percent-encoding", - "pin-project-lite", - "serde_core", - "serde_json", - "serde_path_to_error", - "serde_urlencoded", - "sync_wrapper", - "tokio", - "tower", - "tower-layer", - "tower-service", - "tracing", -] - -[[package]] -name = "axum-core" -version = "0.5.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08c78f31d7b1291f7ee735c1c6780ccde7785daae9a9206026862dab7d8792d1" -dependencies = [ - "bytes", - "futures-core", - "http", - "http-body", - "http-body-util", - "mime", - "pin-project-lite", - "sync_wrapper", - "tower-layer", - "tower-service", - "tracing", -] - -[[package]] -name = "axum-extra" -version = "0.12.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fef252edff26ddba56bbcdf2ee3307b8129acb86f5749b68990c168a6fcc9c76" -dependencies = [ - "axum", - "axum-core", - "bytes", - "futures-core", - "futures-util", - "headers", - "http", - "http-body", - "http-body-util", - "mime", - "pin-project-lite", - "tower-layer", - "tower-service", - "tracing", -] - -[[package]] -name = "base64" -version = "0.22.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" - -[[package]] -name = "bcrypt" -version = "0.17.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "abaf6da45c74385272ddf00e1ac074c7d8a6c1a1dda376902bd6a427522a8b2c" -dependencies = [ - "base64", - "blowfish", - "getrandom 0.3.4", - "subtle", - "zeroize", -] - -[[package]] -name = "bincode" -version = "2.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "36eaf5d7b090263e8150820482d5d93cd964a81e4019913c972f4edcc6edb740" -dependencies = [ - "bincode_derive", - "serde", - "unty", -] - -[[package]] -name = "bincode_derive" -version = "2.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf95709a440f45e986983918d0e8a1f30a9b1df04918fc828670606804ac3c09" -dependencies = [ - "virtue", -] - -[[package]] -name = "bit-set" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08807e080ed7f9d5433fa9b275196cfc35414f66a0c79d864dc51a0d825231a3" -dependencies = [ - "bit-vec", -] - -[[package]] -name = "bit-vec" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e764a1d40d510daf35e07be9eb06e75770908c27d411ee6c92109c9840eaaf7" - [[package]] name = "bitflags" version = "1.3.2" @@ -366,9 +48,6 @@ name = "bitflags" version = "2.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "812e12b5285cc515a9c72a5c1d3b6d46a19dac5acfef5265968c166106e31dd3" -dependencies = [ - "serde_core", -] [[package]] name = "block-buffer" @@ -397,120 +76,12 @@ dependencies = [ "hybrid-array", ] -[[package]] -name = "block2" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2c132eebf10f5cad5289222520a4a058514204aed6d791f1cf4fe8088b82d15f" -dependencies = [ - "objc2 0.5.2", -] - -[[package]] -name = "blowfish" -version = "0.9.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e412e2cd0f2b2d93e02543ceae7917b3c70331573df19ee046bcbc35e45e87d7" -dependencies = [ - "byteorder", - "cipher", -] - [[package]] name = "bumpalo" version = "3.19.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5dd9dc738b7a8311c7ade152424974d8115f2cdad61e8dab8dac9f2362298510" -[[package]] -name = "bytemuck" -version = "1.24.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1fbdf580320f38b612e485521afda1ee26d10cc9884efaaa750d383e13e3c5f4" -dependencies = [ - "bytemuck_derive", -] - -[[package]] -name = "bytemuck_derive" -version = "1.10.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f9abbd1bc6865053c427f7198e6af43bfdedc55ab791faed4fbd361d789575ff" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.114", -] - -[[package]] -name = "byteorder" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" - -[[package]] -name = "byteorder-lite" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f1fe948ff07f4bd06c30984e69f5b4899c516a3ef74f34df92a2df2ab535495" - -[[package]] -name = "bytes" -version = "1.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b35204fbdc0b3f4446b89fc1ac2cf84a8a68971995d0bf2e925ec7cd960f9cb3" - -[[package]] -name = "calloop" -version = "0.13.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b99da2f8558ca23c71f4fd15dc57c906239752dd27ff3c00a1d56b685b7cbfec" -dependencies = [ - "bitflags 2.10.0", - "log", - "polling", - "rustix 0.38.44", - "slab", - "thiserror 1.0.69", -] - -[[package]] -name = "calloop" -version = "0.14.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb9f6e1368bd4621d2c86baa7e37de77a938adf5221e5dd3d6133340101b309e" -dependencies = [ - "bitflags 2.10.0", - "polling", - "rustix 1.1.3", - "slab", - "tracing", -] - -[[package]] -name = "calloop-wayland-source" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95a66a987056935f7efce4ab5668920b5d0dac4a7c99991a67395f13702ddd20" -dependencies = [ - "calloop 0.13.0", - "rustix 0.38.44", - "wayland-backend", - "wayland-client", -] - -[[package]] -name = "calloop-wayland-source" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "138efcf0940a02ebf0cc8d1eff41a1682a46b431630f4c52450d6265876021fa" -dependencies = [ - "calloop 0.14.3", - "rustix 1.1.3", - "wayland-backend", - "wayland-client", -] - [[package]] name = "cbc" version = "0.1.2" @@ -527,17 +98,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6354c81bbfd62d9cfa9cb3c773c2b7b2a3a482d569de977fd0e961f6e7c00583" dependencies = [ "find-msvc-tools", - "jobserver", - "libc", "shlex", ] -[[package]] -name = "cesu8" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d43a04d8753f35258c91f8ec639f792891f748a1edbd759cf1dcea3382ad83c" - [[package]] name = "cfg-if" version = "1.0.4" @@ -556,15 +119,6 @@ version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "613afe47fcd5fac7ccf1db93babcb082c5994d996f20b8b159f2ad1658eb5724" -[[package]] -name = "cgl" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ced0551234e87afee12411d535648dd89d2e7f34c78b753395567aff3d447ff" -dependencies = [ - "libc", -] - [[package]] name = "chrono" version = "0.4.43" @@ -588,148 +142,12 @@ dependencies = [ "inout", ] -[[package]] -name = "clap" -version = "4.5.54" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c6e6ff9dcd79cff5cd969a17a545d79e84ab086e444102a591e288a8aa3ce394" -dependencies = [ - "clap_builder", - "clap_derive", -] - -[[package]] -name = "clap_builder" -version = "4.5.54" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa42cf4d2b7a41bc8f663a7cab4031ebafa1bf3875705bfaf8466dc60ab52c00" -dependencies = [ - "anstream", - "anstyle", - "clap_lex", - "strsim", -] - -[[package]] -name = "clap_derive" -version = "4.5.49" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a0b5487afeab2deb2ff4e03a807ad1a03ac532ff5a2cee5d86884440c7f7671" -dependencies = [ - "heck", - "proc-macro2", - "quote", - "syn 2.0.114", -] - -[[package]] -name = "clap_lex" -version = "0.7.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3e64b0cc0439b12df2fa678eae89a1c56a529fd067a9115f7827f1fffd22b32" - -[[package]] -name = "clipboard-win" -version = "5.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bde03770d3df201d4fb868f2c9c59e66a3e4e2bd06692a0fe701e7103c7e84d4" -dependencies = [ - "error-code", -] - -[[package]] -name = "cmake" -version = "0.1.57" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75443c44cd6b379beb8c5b45d85d0773baf31cce901fe7bb252f4eff3008ef7d" -dependencies = [ - "cc", -] - -[[package]] -name = "codespan-reporting" -version = "0.12.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fe6d2e5af09e8c8ad56c969f2157a3d4238cebc7c55f0a517728c38f7b200f81" -dependencies = [ - "unicode-width", -] - -[[package]] -name = "colorchoice" -version = "1.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b05b61dc5112cbb17e4b6cd61790d9845d13888356391624cbe7e41efeac1e75" - -[[package]] -name = "combine" -version = "4.6.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba5a308b75df32fe02788e748662718f03fde005016435c444eea572398219fd" -dependencies = [ - "bytes", - "memchr", -] - -[[package]] -name = "concurrent-queue" -version = "2.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ca0197aee26d1ae37445ee532fefce43251d24cc7c166799f4d46817f1d3973" -dependencies = [ - "crossbeam-utils", -] - -[[package]] -name = "core-foundation" -version = "0.9.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91e195e091a93c46f7102ec7818a2aa394e1e1771c3ab4825963fa03e45afb8f" -dependencies = [ - "core-foundation-sys", - "libc", -] - -[[package]] -name = "core-foundation" -version = "0.10.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2a6cd9ae233e7f62ba4e9353e81a88df7fc8a5987b8d445b4d90c879bd156f6" -dependencies = [ - "core-foundation-sys", - "libc", -] - [[package]] name = "core-foundation-sys" version = "0.8.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b" -[[package]] -name = "core-graphics" -version = "0.23.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c07782be35f9e1140080c6b96f0d44b739e2278479f64e02fdab4e32dfd8b081" -dependencies = [ - "bitflags 1.3.2", - "core-foundation 0.9.4", - "core-graphics-types", - "foreign-types 0.5.0", - "libc", -] - -[[package]] -name = "core-graphics-types" -version = "0.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "45390e6114f68f718cc7a830514a96f903cccd70d02a8f6d9f643ac4ba45afaf" -dependencies = [ - "bitflags 1.3.2", - "core-foundation 0.9.4", - "libc", -] - [[package]] name = "cpufeatures" version = "0.2.17" @@ -739,15 +157,6 @@ dependencies = [ "libc", ] -[[package]] -name = "crc32fast" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9481c1c90cbf2ac953f07c8d4a58aa3945c425b7185c9154d67a65e4230da511" -dependencies = [ - "cfg-if", -] - [[package]] name = "crossbeam-channel" version = "0.5.15" @@ -757,27 +166,12 @@ dependencies = [ "crossbeam-utils", ] -[[package]] -name = "crossbeam-epoch" -version = "0.9.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b82ac4a3c2ca9c3460964f020e1402edd5753411d7737aa39c3714ad1b5420e" -dependencies = [ - "crossbeam-utils", -] - [[package]] name = "crossbeam-utils" 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-common" version = "0.1.7" @@ -788,21 +182,6 @@ dependencies = [ "typenum", ] -[[package]] -name = "cursor-icon" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f27ae1dd37df86211c42e150270f82743308803d90a6f6e6651cd730d5e1732f" - -[[package]] -name = "deranged" -version = "0.5.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ececcb659e7ba858fb4f10388c250a7252eb0a27373f1a72b8748afdd248e587" -dependencies = [ - "powerfmt", -] - [[package]] name = "digest" version = "0.10.7" @@ -813,519 +192,12 @@ dependencies = [ "crypto-common", ] -[[package]] -name = "dispatch" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd0c93bb4b0c6d9b77f4435b0ae98c24d17f1c45b2ff844c6151a07256ca923b" - -[[package]] -name = "dispatch2" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89a09f22a6c6069a18470eb92d2298acf25463f14256d24778e1230d789a2aec" -dependencies = [ - "bitflags 2.10.0", - "objc2 0.6.3", -] - -[[package]] -name = "displaydoc" -version = "0.2.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.114", -] - -[[package]] -name = "dlib" -version = "0.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "330c60081dcc4c72131f8eb70510f1ac07223e5d4163db481a04a0befcffa412" -dependencies = [ - "libloading", -] - -[[package]] -name = "document-features" -version = "0.2.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d4b8a88685455ed29a21542a33abd9cb6510b6b129abadabdcef0f4c55bc8f61" -dependencies = [ - "litrs", -] - -[[package]] -name = "downcast-rs" -version = "1.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75b325c5dbd37f80359721ad39aca5a29fb04c89279657cffdda8736d0c0b9d2" - -[[package]] -name = "dpi" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d8b14ccef22fc6f5a8f4d7d768562a182c04ce9a3b3157b91390b52ddfdf1a76" - -[[package]] -name = "dunce" -version = "1.0.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "92773504d58c093f6de2459af4af33faa518c13451eb8f2b5698ed3d36e7c813" - -[[package]] -name = "ecolor" -version = "0.33.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "71ddb8ac7643d1dba1bb02110e804406dd459a838efcb14011ced10556711a8e" -dependencies = [ - "bytemuck", - "emath", - "serde", -] - -[[package]] -name = "eframe" -version = "0.33.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "457481173e6db5ca9fa2be93a58df8f4c7be639587aeb4853b526c6cf87db4e6" -dependencies = [ - "ahash", - "bytemuck", - "document-features", - "egui", - "egui-wgpu", - "egui-winit", - "egui_glow", - "glow", - "glutin", - "glutin-winit", - "home", - "image", - "js-sys", - "log", - "objc2 0.5.2", - "objc2-app-kit 0.2.2", - "objc2-foundation 0.2.2", - "parking_lot 0.12.5", - "percent-encoding", - "profiling", - "raw-window-handle", - "ron", - "serde", - "static_assertions", - "wasm-bindgen", - "wasm-bindgen-futures", - "web-sys", - "web-time", - "windows-sys 0.61.2", - "winit", -] - -[[package]] -name = "egui" -version = "0.33.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a9b567d356674e9a5121ed3fedfb0a7c31e059fe71f6972b691bcd0bfc284e3" -dependencies = [ - "accesskit", - "ahash", - "bitflags 2.10.0", - "emath", - "epaint", - "log", - "nohash-hasher", - "profiling", - "ron", - "serde", - "smallvec", - "unicode-segmentation", -] - -[[package]] -name = "egui-async" -version = "0.2.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f611c6c4c47a6786f77129c887e947410b1d23f0f222447c42a91a5f981fd9ed" -dependencies = [ - "atomic_float", - "egui", - "tokio", - "tracing", - "wasm-bindgen-futures", -] - -[[package]] -name = "egui-wgpu" -version = "0.33.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e4d209971c84b2352a06174abdba701af1e552ce56b144d96f2bd50a3c91236" -dependencies = [ - "ahash", - "bytemuck", - "document-features", - "egui", - "epaint", - "log", - "profiling", - "thiserror 2.0.18", - "type-map", - "web-time", - "wgpu", - "winit", -] - -[[package]] -name = "egui-winit" -version = "0.33.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec6687e5bb551702f4ad10ac428bab12acf9d53047ebb1082d4a0ed8c6251a29" -dependencies = [ - "arboard", - "bytemuck", - "egui", - "log", - "objc2 0.5.2", - "objc2-foundation 0.2.2", - "objc2-ui-kit", - "profiling", - "raw-window-handle", - "serde", - "smithay-clipboard", - "web-time", - "webbrowser", - "winit", -] - -[[package]] -name = "egui_extras" -version = "0.33.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d01d34e845f01c62e3fded726961092e70417d66570c499b9817ab24674ca4ed" -dependencies = [ - "ahash", - "egui", - "enum-map", - "log", - "mime_guess2", - "profiling", -] - -[[package]] -name = "egui_glow" -version = "0.33.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6420863ea1d90e750f75075231a260030ad8a9f30a7cef82cdc966492dc4c4eb" -dependencies = [ - "bytemuck", - "egui", - "glow", - "log", - "memoffset", - "profiling", - "wasm-bindgen", - "web-sys", - "winit", -] - -[[package]] -name = "egui_tiles" -version = "0.14.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ef184e589f0a80560bd3b63017634642d1ba112a8a8d9b29341f7cafd04601f" -dependencies = [ - "ahash", - "egui", - "itertools", - "log", - "serde", -] - -[[package]] -name = "either" -version = "1.15.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "48c757948c5ede0e46177b7add2e67155f70e33c07fea8284df6576da70b3719" - -[[package]] -name = "emath" -version = "0.33.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "491bdf728bf25ddd9ad60d4cf1c48588fa82c013a2440b91aa7fc43e34a07c32" -dependencies = [ - "bytemuck", - "serde", -] - -[[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 = "enum-map" -version = "2.7.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6866f3bfdf8207509a033af1a75a7b08abda06bbaaeae6669323fd5a097df2e9" -dependencies = [ - "enum-map-derive", -] - -[[package]] -name = "enum-map-derive" -version = "0.17.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f282cfdfe92516eb26c2af8589c274c7c17681f5ecc03c18255fe741c6aa64eb" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.114", -] - -[[package]] -name = "enumn" -version = "0.1.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2f9ed6b3789237c8a0c1c505af1c7eb2c560df6186f01b098c3a1064ea532f38" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.114", -] - -[[package]] -name = "epaint" -version = "0.33.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "009d0dd3c2163823a0abdb899451ecbc78798dec545ee91b43aff1fa790bab62" -dependencies = [ - "ab_glyph", - "ahash", - "bytemuck", - "ecolor", - "emath", - "epaint_default_fonts", - "log", - "nohash-hasher", - "parking_lot 0.12.5", - "profiling", - "serde", -] - -[[package]] -name = "epaint_default_fonts" -version = "0.33.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c4fbe202b6578d3d56428fa185cdf114a05e49da05f477b3c7f0fbb221f1862" - -[[package]] -name = "equivalent" -version = "1.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "877a4ace8713b0bcf2a4e7eec82529c029f1d0619886d18145fea96c3ffe5c0f" - -[[package]] -name = "errno" -version = "0.3.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "39cab71617ae0d63f51a36d69f866391735b51691dbda63cf6f96d042b63efeb" -dependencies = [ - "libc", - "windows-sys 0.61.2", -] - -[[package]] -name = "error-code" -version = "3.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dea2df4cf52843e0452895c455a1a2cfbb842a1e7329671acf418fdc53ed4c59" - -[[package]] -name = "fastrand" -version = "2.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "37909eebbb50d72f9059c3b6d82c0463f2ff062c9e95845c43a6c9c0355411be" - -[[package]] -name = "fax" -version = "0.2.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f05de7d48f37cd6730705cbca900770cab77a89f413d23e100ad7fad7795a0ab" -dependencies = [ - "fax_derive", -] - -[[package]] -name = "fax_derive" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a0aca10fb742cb43f9e7bb8467c91aa9bcb8e3ffbc6a6f7389bb93ffc920577d" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.114", -] - -[[package]] -name = "fdeflate" -version = "0.3.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e6853b52649d4ac5c0bd02320cddc5ba956bdb407c4b75a2c6b75bf51500f8c" -dependencies = [ - "simd-adler32", -] - [[package]] name = "find-msvc-tools" version = "0.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8591b0bcc8a98a64310a2fae1bb3e9b8564dd10e381e6e28010fde8e8e8568db" -[[package]] -name = "flate2" -version = "1.1.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b375d6465b98090a5f25b1c7703f3859783755aa9a80433b36e0379a3ec2f369" -dependencies = [ - "crc32fast", - "miniz_oxide", -] - -[[package]] -name = "fnv" -version = "1.0.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" - -[[package]] -name = "foldhash" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77ce24cb58228fbb8aa041425bb1050850ac19177686ea6e0f41a70416f56fdb" - -[[package]] -name = "foreign-types" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f6f339eb8adc052cd2ca78910fda869aefa38d22d5cb648e6485e4d3fc06f3b1" -dependencies = [ - "foreign-types-shared 0.1.1", -] - -[[package]] -name = "foreign-types" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d737d9aa519fb7b749cbc3b962edcf310a8dd1f4b67c91c4f83975dbdd17d965" -dependencies = [ - "foreign-types-macros", - "foreign-types-shared 0.3.1", -] - -[[package]] -name = "foreign-types-macros" -version = "0.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a5c6c585bc94aaf2c7b51dd4c2ba22680844aba4c687be581871a6f518c5742" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.114", -] - -[[package]] -name = "foreign-types-shared" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" - -[[package]] -name = "foreign-types-shared" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aa9a19cbb55df58761df49b23516a86d432839add4af60fc256da840f66ed35b" - -[[package]] -name = "form_urlencoded" -version = "1.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb4cb245038516f5f85277875cdaa4f7d2c9a0fa0468de06ed190163b1581fcf" -dependencies = [ - "percent-encoding", -] - -[[package]] -name = "fs2" -version = "0.4.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9564fc758e15025b46aa6643b1b77d047d1a56a1aea6e01002ac0c7026876213" -dependencies = [ - "libc", - "winapi", -] - -[[package]] -name = "fs_extra" -version = "1.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "42703706b716c37f96a77aea830392ad231f44c9e9a67872fa5548707e11b11c" - -[[package]] -name = "futures-channel" -version = "0.3.31" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2dff15bf788c671c1934e366d07e30c1814a8ef514e1af724a602e8a2fbe1b10" -dependencies = [ - "futures-core", -] - -[[package]] -name = "futures-core" -version = "0.3.31" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05f29059c0c2090612e8d742178b0580d2dc940c837851ad723096f87af6663e" - -[[package]] -name = "futures-sink" -version = "0.3.31" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e575fab7d1e0dcb8d0c7bcf9a63ee213816ab51902e6d244a95819acacf1d4f7" - -[[package]] -name = "futures-task" -version = "0.3.31" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f90f7dce0722e95104fcb095585910c0977252f286e354b5e3bd38902cd99988" - -[[package]] -name = "futures-util" -version = "0.3.31" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9fa08315bb612088cc391249efdc3bc77536f16c91f6cf495e6fbe85b20a4a81" -dependencies = [ - "futures-core", - "futures-task", - "pin-project-lite", - "pin-utils", - "slab", -] - -[[package]] -name = "fxhash" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c31b6d751ae2c7f11320402d34e41349dd1016f8d5d45e48c4312bc8625af50c" -dependencies = [ - "byteorder", -] - [[package]] name = "generic-array" version = "0.14.7" @@ -1336,27 +208,6 @@ dependencies = [ "version_check", ] -[[package]] -name = "gethostname" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1bd49230192a3797a9a4d6abe9b3eed6f7fa4c8a8a4947977c6f80025f92cbd8" -dependencies = [ - "rustix 1.1.3", - "windows-link", -] - -[[package]] -name = "getrandom" -version = "0.2.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff2abc00be7fca6ebc474524697ae276ad847ad0a6b3faa4bcb027e9a4614ad0" -dependencies = [ - "cfg-if", - "libc", - "wasi", -] - [[package]] name = "getrandom" version = "0.3.4" @@ -1369,171 +220,6 @@ dependencies = [ "wasip2", ] -[[package]] -name = "gl_generator" -version = "0.14.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a95dfc23a2b4a9a2f5ab41d194f8bfda3cabec42af4e39f08c339eb2a0c124d" -dependencies = [ - "khronos_api", - "log", - "xml-rs", -] - -[[package]] -name = "glow" -version = "0.16.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c5e5ea60d70410161c8bf5da3fdfeaa1c72ed2c15f8bbb9d19fe3a4fad085f08" -dependencies = [ - "js-sys", - "slotmap", - "wasm-bindgen", - "web-sys", -] - -[[package]] -name = "glutin" -version = "0.32.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "12124de845cacfebedff80e877bb37b5b75c34c5a4c89e47e1cdd67fb6041325" -dependencies = [ - "bitflags 2.10.0", - "cfg_aliases 0.2.1", - "cgl", - "dispatch2", - "glutin_egl_sys", - "glutin_glx_sys", - "glutin_wgl_sys", - "libloading", - "objc2 0.6.3", - "objc2-app-kit 0.3.2", - "objc2-core-foundation", - "objc2-foundation 0.3.2", - "once_cell", - "raw-window-handle", - "wayland-sys", - "windows-sys 0.52.0", - "x11-dl", -] - -[[package]] -name = "glutin-winit" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85edca7075f8fc728f28cb8fbb111a96c3b89e930574369e3e9c27eb75d3788f" -dependencies = [ - "cfg_aliases 0.2.1", - "glutin", - "raw-window-handle", - "winit", -] - -[[package]] -name = "glutin_egl_sys" -version = "0.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c4680ba6195f424febdc3ba46e7a42a0e58743f2edb115297b86d7f8ecc02d2" -dependencies = [ - "gl_generator", - "windows-sys 0.52.0", -] - -[[package]] -name = "glutin_glx_sys" -version = "0.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a7bb2938045a88b612499fbcba375a77198e01306f52272e692f8c1f3751185" -dependencies = [ - "gl_generator", - "x11-dl", -] - -[[package]] -name = "glutin_wgl_sys" -version = "0.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2c4ee00b289aba7a9e5306d57c2d05499b2e5dc427f84ac708bd2c090212cf3e" -dependencies = [ - "gl_generator", -] - -[[package]] -name = "h2" -version = "0.4.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2f44da3a8150a6703ed5d34e164b875fd14c2cdab9af1252a9a1020bde2bdc54" -dependencies = [ - "atomic-waker", - "bytes", - "fnv", - "futures-core", - "futures-sink", - "http", - "indexmap", - "slab", - "tokio", - "tokio-util", - "tracing", -] - -[[package]] -name = "half" -version = "2.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ea2d84b969582b4b1864a92dc5d27cd2b77b622a8d79306834f1be5ba20d84b" -dependencies = [ - "cfg-if", - "crunchy", - "num-traits", - "zerocopy", -] - -[[package]] -name = "hashbrown" -version = "0.16.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "841d1cc9bed7f9236f321df977030373f4a4163ae1a7dbfe1a51a2c1a51d9100" -dependencies = [ - "foldhash", -] - -[[package]] -name = "headers" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b3314d5adb5d94bcdf56771f2e50dbbc80bb4bdf88967526706205ac9eff24eb" -dependencies = [ - "base64", - "bytes", - "headers-core", - "http", - "httpdate", - "mime", - "sha1", -] - -[[package]] -name = "headers-core" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "54b4a22553d4242c49fddb9ba998a99962b5cc6f22cb5a3482bec22522403ce4" -dependencies = [ - "http", -] - -[[package]] -name = "heck" -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" @@ -1546,66 +232,6 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e712f64ec3850b98572bffac52e2c6f282b29fe6c5fa6d42334b30be438d95c1" -[[package]] -name = "hexf-parse" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dfa686283ad6dd069f105e5ab091b04c62850d3e4cf5d67debad1933f55023df" - -[[package]] -name = "home" -version = "0.5.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cc627f471c528ff0c4a49e1d5e60450c8f6461dd6d10ba9dcd3a61d3dff7728d" -dependencies = [ - "windows-sys 0.61.2", -] - -[[package]] -name = "http" -version = "1.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3ba2a386d7f85a81f119ad7498ebe444d2e22c2af0b86b069416ace48b3311a" -dependencies = [ - "bytes", - "itoa", -] - -[[package]] -name = "http-body" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1efedce1fb8e6913f23e0c92de8e62cd5b772a67e7b3946df930a62566c93184" -dependencies = [ - "bytes", - "http", -] - -[[package]] -name = "http-body-util" -version = "0.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b021d93e26becf5dc7e1b75b1bed1fd93124b374ceb73f43d4d4eafec896a64a" -dependencies = [ - "bytes", - "futures-core", - "http", - "http-body", - "pin-project-lite", -] - -[[package]] -name = "httparse" -version = "1.10.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6dbf3de79e51f3d586ab4cb9d5c3e2c14aa28ed23d180cf89b4df0454a69cc87" - -[[package]] -name = "httpdate" -version = "1.0.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9" - [[package]] name = "hybrid-array" version = "0.4.7" @@ -1615,87 +241,6 @@ dependencies = [ "typenum", ] -[[package]] -name = "hyper" -version = "1.8.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2ab2d4f250c3d7b1c9fcdff1cece94ea4e2dfbec68614f7b87cb205f24ca9d11" -dependencies = [ - "atomic-waker", - "bytes", - "futures-channel", - "futures-core", - "h2", - "http", - "http-body", - "httparse", - "httpdate", - "itoa", - "pin-project-lite", - "pin-utils", - "smallvec", - "tokio", - "want", -] - -[[package]] -name = "hyper-rustls" -version = "0.27.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3c93eb611681b207e1fe55d5a71ecf91572ec8a6705cdb6857f7d8d5242cf58" -dependencies = [ - "http", - "hyper", - "hyper-util", - "rustls", - "rustls-pki-types", - "tokio", - "tokio-rustls", - "tower-service", -] - -[[package]] -name = "hyper-tls" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70206fc6890eaca9fde8a0bf71caa2ddfc9fe045ac9e5c70df101a7dbde866e0" -dependencies = [ - "bytes", - "http-body-util", - "hyper", - "hyper-util", - "native-tls", - "tokio", - "tokio-native-tls", - "tower-service", -] - -[[package]] -name = "hyper-util" -version = "0.1.19" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "727805d60e7938b76b826a6ef209eb70eaa1812794f9424d4a4e2d740662df5f" -dependencies = [ - "base64", - "bytes", - "futures-channel", - "futures-core", - "futures-util", - "http", - "http-body", - "hyper", - "ipnet", - "libc", - "percent-encoding", - "pin-project-lite", - "socket2", - "system-configuration", - "tokio", - "tower-service", - "tracing", - "windows-registry", -] - [[package]] name = "iana-time-zone" version = "0.1.64" @@ -1720,132 +265,6 @@ dependencies = [ "cc", ] -[[package]] -name = "icu_collections" -version = "2.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c6b649701667bbe825c3b7e6388cb521c23d88644678e83c0c4d0a621a34b43" -dependencies = [ - "displaydoc", - "potential_utf", - "yoke", - "zerofrom", - "zerovec", -] - -[[package]] -name = "icu_locale_core" -version = "2.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "edba7861004dd3714265b4db54a3c390e880ab658fec5f7db895fae2046b5bb6" -dependencies = [ - "displaydoc", - "litemap", - "tinystr", - "writeable", - "zerovec", -] - -[[package]] -name = "icu_normalizer" -version = "2.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f6c8828b67bf8908d82127b2054ea1b4427ff0230ee9141c54251934ab1b599" -dependencies = [ - "icu_collections", - "icu_normalizer_data", - "icu_properties", - "icu_provider", - "smallvec", - "zerovec", -] - -[[package]] -name = "icu_normalizer_data" -version = "2.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7aedcccd01fc5fe81e6b489c15b247b8b0690feb23304303a9e560f37efc560a" - -[[package]] -name = "icu_properties" -version = "2.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "020bfc02fe870ec3a66d93e677ccca0562506e5872c650f893269e08615d74ec" -dependencies = [ - "icu_collections", - "icu_locale_core", - "icu_properties_data", - "icu_provider", - "zerotrie", - "zerovec", -] - -[[package]] -name = "icu_properties_data" -version = "2.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "616c294cf8d725c6afcd8f55abc17c56464ef6211f9ed59cccffe534129c77af" - -[[package]] -name = "icu_provider" -version = "2.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85962cf0ce02e1e0a629cc34e7ca3e373ce20dda4c4d7294bbd0bf1fdb59e614" -dependencies = [ - "displaydoc", - "icu_locale_core", - "writeable", - "yoke", - "zerofrom", - "zerotrie", - "zerovec", -] - -[[package]] -name = "idna" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b0875f23caa03898994f6ddc501886a45c7d3d62d04d2d90788d47be1b1e4de" -dependencies = [ - "idna_adapter", - "smallvec", - "utf8_iter", -] - -[[package]] -name = "idna_adapter" -version = "1.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3acae9609540aa318d1bc588455225fb2085b9ed0c4f6bd0d9d5bcd86f1a0344" -dependencies = [ - "icu_normalizer", - "icu_properties", -] - -[[package]] -name = "image" -version = "0.25.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6506c6c10786659413faa717ceebcb8f70731c0a60cbae39795fdf114519c1a" -dependencies = [ - "bytemuck", - "byteorder-lite", - "moxcms", - "num-traits", - "png", - "tiff", -] - -[[package]] -name = "indexmap" -version = "2.13.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7714e70437a7dc3ac8eb7e6f8df75fd8eb422675fc7678aff7364301092b1017" -dependencies = [ - "equivalent", - "hashbrown", -] - [[package]] name = "inout" version = "0.1.4" @@ -1856,84 +275,12 @@ dependencies = [ "generic-array", ] -[[package]] -name = "instant" -version = "0.1.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e0242819d153cba4b4b05a5a8f2a7e9bbf97b6055b2a002b395c96b5ff3c0222" -dependencies = [ - "cfg-if", -] - -[[package]] -name = "ipnet" -version = "2.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "469fb0b9cefa57e3ef31275ee7cacb78f2fdca44e4765491884a2b119d4eb130" - -[[package]] -name = "iri-string" -version = "0.7.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c91338f0783edbd6195decb37bae672fd3b165faffb89bf7b9e6942f8b1a731a" -dependencies = [ - "memchr", - "serde", -] - -[[package]] -name = "is_terminal_polyfill" -version = "1.70.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a6cb138bb79a146c1bd460005623e142ef0181e3d0219cb493e02f7d08a35695" - -[[package]] -name = "itertools" -version = "0.14.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b192c782037fadd9cfa75548310488aabdbf3d2da73885b31bd0abd03351285" -dependencies = [ - "either", -] - [[package]] name = "itoa" version = "1.0.17" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "92ecc6618181def0457392ccd0ee51198e065e016d1d527a7ac1b6dc7c1f09d2" -[[package]] -name = "jni" -version = "0.21.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a87aa2bb7d2af34197c04845522473242e1aa17c12f4935d5856491a7fb8c97" -dependencies = [ - "cesu8", - "cfg-if", - "combine", - "jni-sys", - "log", - "thiserror 1.0.69", - "walkdir", - "windows-sys 0.45.0", -] - -[[package]] -name = "jni-sys" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8eaf4bc02d17cbdd7ff4c7438cafcdf7fb9a4613313ad11b4f8fefe7d3fa0130" - -[[package]] -name = "jobserver" -version = "0.1.34" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9afb3de4395d6b3e67a780b6de64b51c978ecf11cb9a462c66be7d4ca9039d33" -dependencies = [ - "getrandom 0.3.4", - "libc", -] - [[package]] name = "js-sys" version = "0.3.85" @@ -1944,86 +291,12 @@ dependencies = [ "wasm-bindgen", ] -[[package]] -name = "jsonwebtoken" -version = "10.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c76e1c7d7df3e34443b3621b459b066a7b79644f059fc8b2db7070c825fd417e" -dependencies = [ - "aws-lc-rs", - "base64", - "getrandom 0.2.17", - "js-sys", - "pem", - "serde", - "serde_json", - "signature", - "simple_asn1", -] - -[[package]] -name = "khronos_api" -version = "3.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2db585e1d738fc771bf08a151420d3ed193d9d895a36df7f6f8a9456b911ddc" - [[package]] name = "libc" version = "0.2.180" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bcc35a38544a891a5f7c865aca548a982ccb3b8650a5b06d0fd33a10283c56fc" -[[package]] -name = "libloading" -version = "0.8.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d7c4b02199fee7c5d21a5ae7d8cfa79a6ef5bb2fc834d6e9058e89c825efdc55" -dependencies = [ - "cfg-if", - "windows-link", -] - -[[package]] -name = "libm" -version = "0.2.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6d2cec3eae94f9f509c767b45932f1ada8350c4bdb85af2fcab4a3c14807981" - -[[package]] -name = "libredox" -version = "0.1.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d0b95e02c851351f877147b7deea7b1afb1df71b63aa5f8270716e0c5720616" -dependencies = [ - "bitflags 2.10.0", - "libc", - "redox_syscall 0.7.0", -] - -[[package]] -name = "linux-raw-sys" -version = "0.4.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d26c52dbd32dccf2d10cac7725f8eae5296885fb5703b261f7d0a0739ec807ab" - -[[package]] -name = "linux-raw-sys" -version = "0.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df1d3c3b53da64cf5760482273a98e575c651a67eec7f77df96b5b642de8f039" - -[[package]] -name = "litemap" -version = "0.8.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6373607a59f0be73a39b6fe456b8192fcc3585f602af20751600e974dd455e77" - -[[package]] -name = "litrs" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "11d3d7f243d5c5a8b9bb5d6dd2b1602c0cb0b9db1621bafc7ed66e35ff9fe092" - [[package]] name = "lock_api" version = "0.4.14" @@ -2039,188 +312,12 @@ version = "0.4.29" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5e5032e24019045c762d3c0f28f5b6b8bbf38563a65908389bf7978758920897" -[[package]] -name = "matchit" -version = "0.8.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "47e1ffaa40ddd1f3ed91f717a33c8c0ee23fff369e3aa8772b9605cc1d22f4c3" - [[package]] name = "memchr" version = "2.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f52b00d39961fc5b2736ea853c9cc86238e165017a493d1d5c8eac6bdc4cc273" -[[package]] -name = "memmap2" -version = "0.9.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "744133e4a0e0a658e1374cf3bf8e415c4052a15a111acd372764c55b4177d490" -dependencies = [ - "libc", -] - -[[package]] -name = "memoffset" -version = "0.9.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "488016bfae457b036d996092f6cb448677611ce4449e970ceaf42695203f218a" -dependencies = [ - "autocfg", -] - -[[package]] -name = "mime" -version = "0.3.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" - -[[package]] -name = "mime_guess2" -version = "2.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1706dc14a2e140dec0a7a07109d9a3d5890b81e85bd6c60b906b249a77adf0ca" -dependencies = [ - "mime", - "phf", - "phf_shared", - "unicase", -] - -[[package]] -name = "miniz_oxide" -version = "0.8.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1fa76a2c86f704bdb222d66965fb3d63269ce38518b83cb0575fca855ebb6316" -dependencies = [ - "adler2", - "simd-adler32", -] - -[[package]] -name = "mio" -version = "1.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a69bcab0ad47271a0234d9422b131806bf3968021e5dc9328caf2d4cd58557fc" -dependencies = [ - "libc", - "wasi", - "windows-sys 0.61.2", -] - -[[package]] -name = "moxcms" -version = "0.7.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac9557c559cd6fc9867e122e20d2cbefc9ca29d80d027a8e39310920ed2f0a97" -dependencies = [ - "num-traits", - "pxfm", -] - -[[package]] -name = "naga" -version = "27.0.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "066cf25f0e8b11ee0df221219010f213ad429855f57c494f995590c861a9a7d8" -dependencies = [ - "arrayvec", - "bit-set", - "bitflags 2.10.0", - "cfg-if", - "cfg_aliases 0.2.1", - "codespan-reporting", - "half", - "hashbrown", - "hexf-parse", - "indexmap", - "libm", - "log", - "num-traits", - "once_cell", - "rustc-hash 1.1.0", - "thiserror 2.0.18", - "unicode-ident", -] - -[[package]] -name = "native-tls" -version = "0.2.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87de3442987e9dbec73158d5c715e7ad9072fda936bb03d19d7fa10e00520f0e" -dependencies = [ - "libc", - "log", - "openssl", - "openssl-probe", - "openssl-sys", - "schannel", - "security-framework", - "security-framework-sys", - "tempfile", -] - -[[package]] -name = "ndk" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3f42e7bbe13d351b6bead8286a43aac9534b82bd3cc43e47037f012ebfd62d4" -dependencies = [ - "bitflags 2.10.0", - "jni-sys", - "log", - "ndk-sys", - "num_enum", - "raw-window-handle", - "thiserror 1.0.69", -] - -[[package]] -name = "ndk-context" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "27b02d87554356db9e9a873add8782d4ea6e3e58ea071a9adb9a2e8ddb884a8b" - -[[package]] -name = "ndk-sys" -version = "0.6.0+11769913" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee6cda3051665f1fb8d9e08fc35c96d5a244fb1be711a03b71118828afc9a873" -dependencies = [ - "jni-sys", -] - -[[package]] -name = "nohash-hasher" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2bf50223579dc7cdcfb3bfcacf7069ff68243f8c363f62ffa99cf000a6b9c451" - -[[package]] -name = "num-bigint" -version = "0.4.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a5e44f723f1133c9deac646763579fdb3ac745e418f2a7af9cd0c431da1f20b9" -dependencies = [ - "num-integer", - "num-traits", -] - -[[package]] -name = "num-conv" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf97ec579c3c42f953ef76dbf8d55ac91fb219dde70e49aa4a6b7d74e9919050" - -[[package]] -name = "num-integer" -version = "0.1.46" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7969661fd2958a5cb096e56c8e1ad0444ac2bbcd0061bd28660485a44879858f" -dependencies = [ - "num-traits", -] - [[package]] name = "num-traits" version = "0.2.19" @@ -2228,300 +325,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841" dependencies = [ "autocfg", - "libm", -] - -[[package]] -name = "num_enum" -version = "0.7.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1207a7e20ad57b847bbddc6776b968420d38292bbfe2089accff5e19e82454c" -dependencies = [ - "num_enum_derive", - "rustversion", -] - -[[package]] -name = "num_enum_derive" -version = "0.7.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff32365de1b6743cb203b710788263c44a03de03802daf96092f2da4fe6ba4d7" -dependencies = [ - "proc-macro-crate", - "proc-macro2", - "quote", - "syn 2.0.114", -] - -[[package]] -name = "objc-sys" -version = "0.3.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cdb91bdd390c7ce1a8607f35f3ca7151b65afc0ff5ff3b34fa350f7d7c7e4310" - -[[package]] -name = "objc2" -version = "0.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "46a785d4eeff09c14c487497c162e92766fbb3e4059a71840cecc03d9a50b804" -dependencies = [ - "objc-sys", - "objc2-encode", -] - -[[package]] -name = "objc2" -version = "0.6.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b7c2599ce0ec54857b29ce62166b0ed9b4f6f1a70ccc9a71165b6154caca8c05" -dependencies = [ - "objc2-encode", -] - -[[package]] -name = "objc2-app-kit" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e4e89ad9e3d7d297152b17d39ed92cd50ca8063a89a9fa569046d41568891eff" -dependencies = [ - "bitflags 2.10.0", - "block2", - "libc", - "objc2 0.5.2", - "objc2-core-data", - "objc2-core-image", - "objc2-foundation 0.2.2", - "objc2-quartz-core", -] - -[[package]] -name = "objc2-app-kit" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d49e936b501e5c5bf01fda3a9452ff86dc3ea98ad5f283e1455153142d97518c" -dependencies = [ - "bitflags 2.10.0", - "objc2 0.6.3", - "objc2-core-foundation", - "objc2-core-graphics", - "objc2-foundation 0.3.2", -] - -[[package]] -name = "objc2-cloud-kit" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "74dd3b56391c7a0596a295029734d3c1c5e7e510a4cb30245f8221ccea96b009" -dependencies = [ - "bitflags 2.10.0", - "block2", - "objc2 0.5.2", - "objc2-core-location", - "objc2-foundation 0.2.2", -] - -[[package]] -name = "objc2-contacts" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a5ff520e9c33812fd374d8deecef01d4a840e7b41862d849513de77e44aa4889" -dependencies = [ - "block2", - "objc2 0.5.2", - "objc2-foundation 0.2.2", -] - -[[package]] -name = "objc2-core-data" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "617fbf49e071c178c0b24c080767db52958f716d9eabdf0890523aeae54773ef" -dependencies = [ - "bitflags 2.10.0", - "block2", - "objc2 0.5.2", - "objc2-foundation 0.2.2", -] - -[[package]] -name = "objc2-core-foundation" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a180dd8642fa45cdb7dd721cd4c11b1cadd4929ce112ebd8b9f5803cc79d536" -dependencies = [ - "bitflags 2.10.0", - "dispatch2", - "objc2 0.6.3", -] - -[[package]] -name = "objc2-core-graphics" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e022c9d066895efa1345f8e33e584b9f958da2fd4cd116792e15e07e4720a807" -dependencies = [ - "bitflags 2.10.0", - "dispatch2", - "objc2 0.6.3", - "objc2-core-foundation", - "objc2-io-surface", -] - -[[package]] -name = "objc2-core-image" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "55260963a527c99f1819c4f8e3b47fe04f9650694ef348ffd2227e8196d34c80" -dependencies = [ - "block2", - "objc2 0.5.2", - "objc2-foundation 0.2.2", - "objc2-metal", -] - -[[package]] -name = "objc2-core-location" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "000cfee34e683244f284252ee206a27953279d370e309649dc3ee317b37e5781" -dependencies = [ - "block2", - "objc2 0.5.2", - "objc2-contacts", - "objc2-foundation 0.2.2", -] - -[[package]] -name = "objc2-encode" -version = "4.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ef25abbcd74fb2609453eb695bd2f860d389e457f67dc17cafc8b8cbc89d0c33" - -[[package]] -name = "objc2-foundation" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ee638a5da3799329310ad4cfa62fbf045d5f56e3ef5ba4149e7452dcf89d5a8" -dependencies = [ - "bitflags 2.10.0", - "block2", - "dispatch", - "libc", - "objc2 0.5.2", -] - -[[package]] -name = "objc2-foundation" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3e0adef53c21f888deb4fa59fc59f7eb17404926ee8a6f59f5df0fd7f9f3272" -dependencies = [ - "bitflags 2.10.0", - "objc2 0.6.3", - "objc2-core-foundation", -] - -[[package]] -name = "objc2-io-surface" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "180788110936d59bab6bd83b6060ffdfffb3b922ba1396b312ae795e1de9d81d" -dependencies = [ - "bitflags 2.10.0", - "objc2 0.6.3", - "objc2-core-foundation", -] - -[[package]] -name = "objc2-link-presentation" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1a1ae721c5e35be65f01a03b6d2ac13a54cb4fa70d8a5da293d7b0020261398" -dependencies = [ - "block2", - "objc2 0.5.2", - "objc2-app-kit 0.2.2", - "objc2-foundation 0.2.2", -] - -[[package]] -name = "objc2-metal" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd0cba1276f6023976a406a14ffa85e1fdd19df6b0f737b063b95f6c8c7aadd6" -dependencies = [ - "bitflags 2.10.0", - "block2", - "objc2 0.5.2", - "objc2-foundation 0.2.2", -] - -[[package]] -name = "objc2-quartz-core" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e42bee7bff906b14b167da2bac5efe6b6a07e6f7c0a21a7308d40c960242dc7a" -dependencies = [ - "bitflags 2.10.0", - "block2", - "objc2 0.5.2", - "objc2-foundation 0.2.2", - "objc2-metal", -] - -[[package]] -name = "objc2-symbols" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0a684efe3dec1b305badae1a28f6555f6ddd3bb2c2267896782858d5a78404dc" -dependencies = [ - "objc2 0.5.2", - "objc2-foundation 0.2.2", -] - -[[package]] -name = "objc2-ui-kit" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b8bb46798b20cd6b91cbd113524c490f1686f4c4e8f49502431415f3512e2b6f" -dependencies = [ - "bitflags 2.10.0", - "block2", - "objc2 0.5.2", - "objc2-cloud-kit", - "objc2-core-data", - "objc2-core-image", - "objc2-core-location", - "objc2-foundation 0.2.2", - "objc2-link-presentation", - "objc2-quartz-core", - "objc2-symbols", - "objc2-uniform-type-identifiers", - "objc2-user-notifications", -] - -[[package]] -name = "objc2-uniform-type-identifiers" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44fa5f9748dbfe1ca6c0b79ad20725a11eca7c2218bceb4b005cb1be26273bfe" -dependencies = [ - "block2", - "objc2 0.5.2", - "objc2-foundation 0.2.2", -] - -[[package]] -name = "objc2-user-notifications" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76cfcbf642358e8689af64cee815d139339f3ed8ad05103ed5eaf73db8d84cb3" -dependencies = [ - "bitflags 2.10.0", - "block2", - "objc2 0.5.2", - "objc2-core-location", - "objc2-foundation 0.2.2", ] [[package]] @@ -2530,86 +333,6 @@ version = "1.21.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "42f5e15c9953c5e4ccceeb2e7382a716482c34515315f7b03532b8b4e8393d2d" -[[package]] -name = "once_cell_polyfill" -version = "1.70.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "384b8ab6d37215f3c5301a95a4accb5d64aa607f1fcb26a11b5303878451b4fe" - -[[package]] -name = "openssl" -version = "0.10.75" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08838db121398ad17ab8531ce9de97b244589089e290a384c900cb9ff7434328" -dependencies = [ - "bitflags 2.10.0", - "cfg-if", - "foreign-types 0.3.2", - "libc", - "once_cell", - "openssl-macros", - "openssl-sys", -] - -[[package]] -name = "openssl-macros" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.114", -] - -[[package]] -name = "openssl-probe" -version = "0.1.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d05e27ee213611ffe7d6348b942e8f942b37114c00cc03cec254295a4a17852e" - -[[package]] -name = "openssl-sys" -version = "0.9.111" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "82cab2d520aa75e3c58898289429321eb788c3106963d0dc886ec7a5f4adc321" -dependencies = [ - "cc", - "libc", - "pkg-config", - "vcpkg", -] - -[[package]] -name = "orbclient" -version = "0.3.50" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "52ad2c6bae700b7aa5d1cc30c59bdd3a1c180b09dbaea51e2ae2b8e1cf211fdd" -dependencies = [ - "libc", - "libredox", -] - -[[package]] -name = "owned_ttf_parser" -version = "0.25.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "36820e9051aca1014ddc75770aab4d68bc1e9e632f0f5627c4086bc216fb583b" -dependencies = [ - "ttf-parser", -] - -[[package]] -name = "parking_lot" -version = "0.11.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d17b78036a60663b797adeaee46f5c9dfebb86948d1255007a1d6be0271ff99" -dependencies = [ - "instant", - "lock_api", - "parking_lot_core 0.8.6", -] - [[package]] name = "parking_lot" version = "0.12.5" @@ -2617,21 +340,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "93857453250e3077bd71ff98b6a65ea6621a19bb0f559a85248955ac12c45a1a" dependencies = [ "lock_api", - "parking_lot_core 0.9.12", -] - -[[package]] -name = "parking_lot_core" -version = "0.8.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "60a2cfe6f0ad2bfc16aefa463b497d5c7a5ecd44a23efa72aa342d90177356dc" -dependencies = [ - "cfg-if", - "instant", - "libc", - "redox_syscall 0.2.16", - "smallvec", - "winapi", + "parking_lot_core", ] [[package]] @@ -2642,166 +351,11 @@ checksum = "2621685985a2ebf1c516881c026032ac7deafcda1a2c9b7850dc81e3dfcb64c1" dependencies = [ "cfg-if", "libc", - "redox_syscall 0.5.18", + "redox_syscall", "smallvec", "windows-link", ] -[[package]] -name = "pem" -version = "3.0.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d30c53c26bc5b31a98cd02d20f25a7c8567146caf63ed593a9d87b2775291be" -dependencies = [ - "base64", - "serde_core", -] - -[[package]] -name = "percent-encoding" -version = "2.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b4f627cb1b25917193a259e49bdad08f671f8d9708acfd5fe0a8c1455d87220" - -[[package]] -name = "phf" -version = "0.11.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1fd6780a80ae0c52cc120a26a1a42c1ae51b247a253e4e06113d23d2c2edd078" -dependencies = [ - "phf_macros", - "phf_shared", -] - -[[package]] -name = "phf_generator" -version = "0.11.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c80231409c20246a13fddb31776fb942c38553c51e871f8cbd687a4cfb5843d" -dependencies = [ - "phf_shared", - "rand 0.8.5", -] - -[[package]] -name = "phf_macros" -version = "0.11.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f84ac04429c13a7ff43785d75ad27569f2951ce0ffd30a3321230db2fc727216" -dependencies = [ - "phf_generator", - "phf_shared", - "proc-macro2", - "quote", - "syn 2.0.114", - "unicase", -] - -[[package]] -name = "phf_shared" -version = "0.11.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67eabc2ef2a60eb7faa00097bd1ffdb5bd28e62bf39990626a582201b7a754e5" -dependencies = [ - "siphasher", - "unicase", -] - -[[package]] -name = "pin-project" -version = "1.1.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "677f1add503faace112b9f1373e43e9e054bfdd22ff1a63c1bc485eaec6a6a8a" -dependencies = [ - "pin-project-internal", -] - -[[package]] -name = "pin-project-internal" -version = "1.1.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e918e4ff8c4549eb882f14b3a4bc8c8bc93de829416eacf579f1207a8fbf861" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.114", -] - -[[package]] -name = "pin-project-lite" -version = "0.2.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b3cff922bd51709b605d9ead9aa71031d81447142d828eb4a6eba76fe619f9b" - -[[package]] -name = "pin-utils" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" - -[[package]] -name = "pkg-config" -version = "0.3.32" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7edddbd0b52d732b21ad9a5fab5c704c14cd949e5e9a1ec5929a24fded1b904c" - -[[package]] -name = "png" -version = "0.18.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97baced388464909d42d89643fe4361939af9b7ce7a31ee32a168f832a70f2a0" -dependencies = [ - "bitflags 2.10.0", - "crc32fast", - "fdeflate", - "flate2", - "miniz_oxide", -] - -[[package]] -name = "polling" -version = "3.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d0e4f59085d47d8241c88ead0f274e8a0cb551f3625263c05eb8dd897c34218" -dependencies = [ - "cfg-if", - "concurrent-queue", - "hermit-abi", - "pin-project-lite", - "rustix 1.1.3", - "windows-sys 0.61.2", -] - -[[package]] -name = "portable-atomic" -version = "1.13.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f89776e4d69bb58bc6993e99ffa1d11f228b839984854c7daeb5d37f87cbe950" - -[[package]] -name = "portable-atomic-util" -version = "0.2.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d8a2f0d8d040d7848a709caf78912debcc3f33ee4b3cac47d73d1e1069e83507" -dependencies = [ - "portable-atomic", -] - -[[package]] -name = "potential_utf" -version = "0.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b73949432f5e2a09657003c25bca5e19a0e9c84f8058ca374f49e0ebe605af77" -dependencies = [ - "zerovec", -] - -[[package]] -name = "powerfmt" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391" - [[package]] name = "ppv-lite86" version = "0.2.21" @@ -2811,15 +365,6 @@ dependencies = [ "zerocopy", ] -[[package]] -name = "proc-macro-crate" -version = "3.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "219cb19e96be00ab2e37d6e299658a0cfa83e52429179969b0f0121b4ac46983" -dependencies = [ - "toml_edit", -] - [[package]] name = "proc-macro2" version = "1.0.106" @@ -2829,36 +374,6 @@ dependencies = [ "unicode-ident", ] -[[package]] -name = "profiling" -version = "1.0.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3eb8486b569e12e2c32ad3e204dbaba5e4b5b216e9367044f25f1dba42341773" - -[[package]] -name = "pxfm" -version = "0.1.27" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7186d3822593aa4393561d186d1393b3923e9d6163d3fbfd6e825e3e6cf3e6a8" -dependencies = [ - "num-traits", -] - -[[package]] -name = "quick-error" -version = "2.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a993555f31e5a609f617c12db6250dedcac1b0a85076912c436e6fc9b2c8e6a3" - -[[package]] -name = "quick-xml" -version = "0.38.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b66c2058c55a409d601666cffe35f04333cf1013010882cec174a7467cd4e21c" -dependencies = [ - "memchr", -] - [[package]] name = "quote" version = "1.0.44" @@ -2874,15 +389,6 @@ version = "5.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "69cdb34c158ceb288df11e18b4bd39de994f6657d83847bdffdbd7f346754b0f" -[[package]] -name = "rand" -version = "0.8.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" -dependencies = [ - "rand_core 0.6.4", -] - [[package]] name = "rand" version = "0.9.2" @@ -2890,7 +396,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6db2770f06117d490610c7488547d543617b21bfa07796d7a12f6f1bd53850d1" dependencies = [ "rand_chacha", - "rand_core 0.9.5", + "rand_core", ] [[package]] @@ -2900,16 +406,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d3022b5f1df60f26e1ffddd6c66e8aa15de382ae63b3a0c1bfc0e4d3e3f325cb" dependencies = [ "ppv-lite86", - "rand_core 0.9.5", -] - -[[package]] -name = "rand_core" -version = "0.6.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" -dependencies = [ - "getrandom 0.2.17", + "rand_core", ] [[package]] @@ -2918,31 +415,7 @@ version = "0.9.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "76afc826de14238e6e8c374ddcc1fa19e374fd8dd986b0d2af0d02377261d83c" dependencies = [ - "getrandom 0.3.4", -] - -[[package]] -name = "raw-window-handle" -version = "0.6.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "20675572f6f24e9e76ef639bc5552774ed45f1c30e2951e1e99c59888861c539" - -[[package]] -name = "redox_syscall" -version = "0.2.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fb5a58c1855b4b6819d59012155603f0b22ad30cad752600aadfcb695265519a" -dependencies = [ - "bitflags 1.3.2", -] - -[[package]] -name = "redox_syscall" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4722d768eff46b75989dd134e5c353f0d6296e5aaa3132e776cbdb56be7731aa" -dependencies = [ - "bitflags 1.3.2", + "getrandom", ] [[package]] @@ -2954,15 +427,6 @@ dependencies = [ "bitflags 2.10.0", ] -[[package]] -name = "redox_syscall" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49f3fe0889e69e2ae9e41f4d6c4c0181701d00e4697b356fb1f74173a5e0ee27" -dependencies = [ - "bitflags 2.10.0", -] - [[package]] name = "regex" version = "1.12.3" @@ -2992,215 +456,18 @@ version = "0.8.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a96887878f22d7bad8a3b6dc5b7440e0ada9a245242924394987b21cf2210a4c" -[[package]] -name = "renderdoc-sys" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "19b30a45b0cd0bcca8037f3d0dc3421eaf95327a17cad11964fb8179b4fc4832" - -[[package]] -name = "reqwest" -version = "0.12.28" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eddd3ca559203180a307f12d114c268abf583f59b03cb906fd0b3ff8646c1147" -dependencies = [ - "base64", - "bytes", - "encoding_rs", - "futures-core", - "h2", - "http", - "http-body", - "http-body-util", - "hyper", - "hyper-rustls", - "hyper-tls", - "hyper-util", - "js-sys", - "log", - "mime", - "native-tls", - "percent-encoding", - "pin-project-lite", - "rustls-pki-types", - "serde", - "serde_json", - "serde_urlencoded", - "sync_wrapper", - "tokio", - "tokio-native-tls", - "tower", - "tower-http", - "tower-service", - "url", - "wasm-bindgen", - "wasm-bindgen-futures", - "web-sys", -] - -[[package]] -name = "ring" -version = "0.17.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4689e6c2294d81e88dc6261c768b63bc4fcdb852be6d1352498b114f61383b7" -dependencies = [ - "cc", - "cfg-if", - "getrandom 0.2.17", - "libc", - "untrusted 0.9.0", - "windows-sys 0.52.0", -] - -[[package]] -name = "ron" -version = "0.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db09040cc89e461f1a265139777a2bde7f8d8c67c4936f700c63ce3e2904d468" -dependencies = [ - "base64", - "bitflags 2.10.0", - "serde", - "serde_derive", - "unicode-ident", -] - -[[package]] -name = "rustc-hash" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" - -[[package]] -name = "rustc-hash" -version = "2.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "357703d41365b4b27c590e3ed91eabb1b663f07c4c084095e60cbed4362dff0d" - -[[package]] -name = "rustix" -version = "0.38.44" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fdb5bc1ae2baa591800df16c9ca78619bf65c0488b41b96ccec5d11220d8c154" -dependencies = [ - "bitflags 2.10.0", - "errno", - "libc", - "linux-raw-sys 0.4.15", - "windows-sys 0.59.0", -] - -[[package]] -name = "rustix" -version = "1.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "146c9e247ccc180c1f61615433868c99f3de3ae256a30a43b49f67c2d9171f34" -dependencies = [ - "bitflags 2.10.0", - "errno", - "libc", - "linux-raw-sys 0.11.0", - "windows-sys 0.61.2", -] - -[[package]] -name = "rustls" -version = "0.23.36" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c665f33d38cea657d9614f766881e4d510e0eda4239891eea56b4cadcf01801b" -dependencies = [ - "once_cell", - "rustls-pki-types", - "rustls-webpki", - "subtle", - "zeroize", -] - -[[package]] -name = "rustls-pki-types" -version = "1.14.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be040f8b0a225e40375822a563fa9524378b9d63112f53e19ffff34df5d33fdd" -dependencies = [ - "zeroize", -] - -[[package]] -name = "rustls-webpki" -version = "0.103.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d7df23109aa6c1567d1c575b9952556388da57401e4ace1d15f79eedad0d8f53" -dependencies = [ - "ring", - "rustls-pki-types", - "untrusted 0.9.0", -] - [[package]] name = "rustversion" version = "1.0.22" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b39cdef0fa800fc44525c84ccb54a029961a8215f9619753635a9c0d2538d46d" -[[package]] -name = "ryu" -version = "1.0.22" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a50f4cf475b65d88e057964e0e9bb1f0aa9bbb2036dc65c64596b42932536984" - -[[package]] -name = "same-file" -version = "1.0.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502" -dependencies = [ - "winapi-util", -] - -[[package]] -name = "schannel" -version = "0.1.28" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "891d81b926048e76efe18581bf793546b4c0eaf8448d72be8de2bbee5fd166e1" -dependencies = [ - "windows-sys 0.61.2", -] - -[[package]] -name = "scoped-tls" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e1cf6437eb19a8f4a6cc0f7dca544973b0b78843adbfeb3683d1a94a0024a294" - [[package]] name = "scopeguard" version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" -[[package]] -name = "security-framework" -version = "2.11.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "897b2245f0b511c87893af39b033e5ca9cce68824c4d7e7630b5a1d339658d02" -dependencies = [ - "bitflags 2.10.0", - "core-foundation 0.9.4", - "core-foundation-sys", - "libc", - "security-framework-sys", -] - -[[package]] -name = "security-framework-sys" -version = "2.15.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cc1f0cbffaac4852523ce30d8bd3c5cdc873501d96ff467ca09b6767bb8cd5c0" -dependencies = [ - "core-foundation-sys", - "libc", -] - [[package]] name = "serde" version = "1.0.228" @@ -3244,56 +511,6 @@ dependencies = [ "zmij", ] -[[package]] -name = "serde_path_to_error" -version = "0.1.20" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "10a9ff822e371bb5403e391ecd83e182e0e77ba7f6fe0160b795797109d1b457" -dependencies = [ - "itoa", - "serde", - "serde_core", -] - -[[package]] -name = "serde_spanned" -version = "1.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8bbf91e5a4d6315eee45e704372590b30e260ee83af6639d64557f51b067776" -dependencies = [ - "serde_core", -] - -[[package]] -name = "serde_urlencoded" -version = "0.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3491c14715ca2294c4d6a88f15e84739788c1d030eed8c110436aafdaa2f3fd" -dependencies = [ - "form_urlencoded", - "itoa", - "ryu", - "serde", -] - -[[package]] -name = "server2" -version = "0.0.0" -dependencies = [ - "unshell", -] - -[[package]] -name = "sha1" -version = "0.10.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3bf829a2d51ab4a5ddf1352d8470c140cadc8301b2ae1789db023f01cedd6ba" -dependencies = [ - "cfg-if", - "cpufeatures", - "digest", -] - [[package]] name = "sha2" version = "0.10.9" @@ -3311,180 +528,12 @@ version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" -[[package]] -name = "signal-hook-registry" -version = "1.4.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4db69cba1110affc0e9f7bcd48bbf87b3f4fc7c61fc9155afd4c469eb3d6c1b" -dependencies = [ - "errno", - "libc", -] - -[[package]] -name = "signature" -version = "2.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77549399552de45a898a580c1b41d445bf730df867cc44e6c0233bbc4b8329de" -dependencies = [ - "rand_core 0.6.4", -] - -[[package]] -name = "simd-adler32" -version = "0.3.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e320a6c5ad31d271ad523dcf3ad13e2767ad8b1cb8f047f75a8aeaf8da139da2" - -[[package]] -name = "simple_asn1" -version = "0.6.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "297f631f50729c8c99b84667867963997ec0b50f32b2a7dbcab828ef0541e8bb" -dependencies = [ - "num-bigint", - "num-traits", - "thiserror 2.0.18", - "time", -] - -[[package]] -name = "siphasher" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56199f7ddabf13fe5074ce809e7d3f42b42ae711800501b5b16ea82ad029c39d" - -[[package]] -name = "slab" -version = "0.4.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a2ae44ef20feb57a68b23d846850f861394c2e02dc425a50098ae8c90267589" - -[[package]] -name = "sled" -version = "0.34.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f96b4737c2ce5987354855aed3797279def4ebf734436c6aa4552cf8e169935" -dependencies = [ - "crc32fast", - "crossbeam-epoch", - "crossbeam-utils", - "fs2", - "fxhash", - "libc", - "log", - "parking_lot 0.11.2", -] - -[[package]] -name = "slotmap" -version = "1.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bdd58c3c93c3d278ca835519292445cb4b0d4dc59ccfdf7ceadaab3f8aeb4038" -dependencies = [ - "version_check", -] - [[package]] name = "smallvec" version = "1.15.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "67b1b7a3b5fe4f1376887184045fcf45c69e92af734b7aaddc05fb777b6fbd03" -[[package]] -name = "smithay-client-toolkit" -version = "0.19.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3457dea1f0eb631b4034d61d4d8c32074caa6cd1ab2d59f2327bd8461e2c0016" -dependencies = [ - "bitflags 2.10.0", - "calloop 0.13.0", - "calloop-wayland-source 0.3.0", - "cursor-icon", - "libc", - "log", - "memmap2", - "rustix 0.38.44", - "thiserror 1.0.69", - "wayland-backend", - "wayland-client", - "wayland-csd-frame", - "wayland-cursor", - "wayland-protocols", - "wayland-protocols-wlr", - "wayland-scanner", - "xkeysym", -] - -[[package]] -name = "smithay-client-toolkit" -version = "0.20.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0512da38f5e2b31201a93524adb8d3136276fa4fe4aafab4e1f727a82b534cc0" -dependencies = [ - "bitflags 2.10.0", - "calloop 0.14.3", - "calloop-wayland-source 0.4.1", - "cursor-icon", - "libc", - "log", - "memmap2", - "rustix 1.1.3", - "thiserror 2.0.18", - "wayland-backend", - "wayland-client", - "wayland-csd-frame", - "wayland-cursor", - "wayland-protocols", - "wayland-protocols-experimental", - "wayland-protocols-misc", - "wayland-protocols-wlr", - "wayland-scanner", - "xkeysym", -] - -[[package]] -name = "smithay-clipboard" -version = "0.7.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "71704c03f739f7745053bde45fa203a46c58d25bc5c4efba1d9a60e9dba81226" -dependencies = [ - "libc", - "smithay-client-toolkit 0.20.0", - "wayland-backend", -] - -[[package]] -name = "smol_str" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd538fb6910ac1099850255cf94a94df6551fbdd602454387d0adb2d1ca6dead" -dependencies = [ - "serde", -] - -[[package]] -name = "socket2" -version = "0.6.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "86f4aa3ad99f2088c990dfa82d367e19cb29268ed67c574d10d0a4bfe71f07e0" -dependencies = [ - "libc", - "windows-sys 0.60.2", -] - -[[package]] -name = "stable_deref_trait" -version = "1.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ce2be8dc25455e1f91df71bfa12ad37d7af1092ae736f3a6cd0e37bc7810596" - -[[package]] -name = "static_assertions" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" - [[package]] name = "static_init" version = "1.0.4" @@ -3494,8 +543,8 @@ dependencies = [ "bitflags 1.3.2", "cfg_aliases 0.2.1", "libc", - "parking_lot 0.12.5", - "parking_lot_core 0.9.12", + "parking_lot", + "parking_lot_core", "static_init_macro", "winapi", ] @@ -3513,18 +562,6 @@ dependencies = [ "syn 1.0.109", ] -[[package]] -name = "strsim" -version = "0.11.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f" - -[[package]] -name = "subtle" -version = "2.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292" - [[package]] name = "syn" version = "1.0.109" @@ -3547,396 +584,18 @@ dependencies = [ "unicode-ident", ] -[[package]] -name = "sync_wrapper" -version = "1.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0bf256ce5efdfa370213c1dabab5935a12e49f2c58d15e9eac2870d3b4f27263" -dependencies = [ - "futures-core", -] - -[[package]] -name = "synstructure" -version = "0.13.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "728a70f3dbaf5bab7f0c4b1ac8d7ae5ea60a4b5549c8a5914361c99147a709d2" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.114", -] - -[[package]] -name = "system-configuration" -version = "0.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c879d448e9d986b661742763247d3693ed13609438cf3d006f51f5368a5ba6b" -dependencies = [ - "bitflags 2.10.0", - "core-foundation 0.9.4", - "system-configuration-sys", -] - -[[package]] -name = "system-configuration-sys" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e1d1b10ced5ca923a1fcb8d03e96b8d3268065d724548c0211415ff6ac6bac4" -dependencies = [ - "core-foundation-sys", - "libc", -] - -[[package]] -name = "tempfile" -version = "3.24.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "655da9c7eb6305c55742045d5a8d2037996d61d8de95806335c7c86ce0f82e9c" -dependencies = [ - "fastrand", - "getrandom 0.3.4", - "once_cell", - "rustix 1.1.3", - "windows-sys 0.61.2", -] - -[[package]] -name = "thiserror" -version = "1.0.69" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6aaf5339b578ea85b50e080feb250a3e8ae8cfcdff9a461c9ec2904bc923f52" -dependencies = [ - "thiserror-impl 1.0.69", -] - -[[package]] -name = "thiserror" -version = "2.0.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4288b5bcbc7920c07a1149a35cf9590a2aa808e0bc1eafaade0b80947865fbc4" -dependencies = [ - "thiserror-impl 2.0.18", -] - -[[package]] -name = "thiserror-impl" -version = "1.0.69" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.114", -] - -[[package]] -name = "thiserror-impl" -version = "2.0.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ebc4ee7f67670e9b64d05fa4253e753e016c6c95ff35b89b7941d6b856dec1d5" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.114", -] - -[[package]] -name = "tiff" -version = "0.10.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af9605de7fee8d9551863fd692cce7637f548dbd9db9180fcc07ccc6d26c336f" -dependencies = [ - "fax", - "flate2", - "half", - "quick-error", - "weezl", - "zune-jpeg", -] - -[[package]] -name = "time" -version = "0.3.46" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9da98b7d9b7dad93488a84b8248efc35352b0b2657397d4167e7ad67e5d535e5" -dependencies = [ - "deranged", - "itoa", - "num-conv", - "powerfmt", - "serde_core", - "time-core", - "time-macros", -] - -[[package]] -name = "time-core" -version = "0.1.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7694e1cfe791f8d31026952abf09c69ca6f6fa4e1a1229e18988f06a04a12dca" - -[[package]] -name = "time-macros" -version = "0.2.26" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "78cc610bac2dcee56805c99642447d4c5dbde4d01f752ffea0199aee1f601dc4" -dependencies = [ - "num-conv", - "time-core", -] - -[[package]] -name = "tinystr" -version = "0.8.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "42d3e9c45c09de15d06dd8acf5f4e0e399e85927b7f00711024eb7ae10fa4869" -dependencies = [ - "displaydoc", - "zerovec", -] - -[[package]] -name = "tokio" -version = "1.49.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72a2903cd7736441aac9df9d7688bd0ce48edccaadf181c3b90be801e81d3d86" -dependencies = [ - "bytes", - "libc", - "mio", - "parking_lot 0.12.5", - "pin-project-lite", - "signal-hook-registry", - "socket2", - "tokio-macros", - "windows-sys 0.61.2", -] - -[[package]] -name = "tokio-macros" -version = "2.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af407857209536a95c8e56f8231ef2c2e2aff839b22e07a1ffcbc617e9db9fa5" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.114", -] - -[[package]] -name = "tokio-native-tls" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bbae76ab933c85776efabc971569dd6119c580d8f5d448769dec1764bf796ef2" -dependencies = [ - "native-tls", - "tokio", -] - -[[package]] -name = "tokio-rustls" -version = "0.26.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1729aa945f29d91ba541258c8df89027d5792d85a8841fb65e8bf0f4ede4ef61" -dependencies = [ - "rustls", - "tokio", -] - -[[package]] -name = "tokio-util" -version = "0.7.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ae9cec805b01e8fc3fd2fe289f89149a9b66dd16786abd8b19cfa7b48cb0098" -dependencies = [ - "bytes", - "futures-core", - "futures-sink", - "pin-project-lite", - "tokio", -] - -[[package]] -name = "toml" -version = "0.9.11+spec-1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f3afc9a848309fe1aaffaed6e1546a7a14de1f935dc9d89d32afd9a44bab7c46" -dependencies = [ - "indexmap", - "serde_core", - "serde_spanned", - "toml_datetime", - "toml_parser", - "toml_writer", - "winnow", -] - -[[package]] -name = "toml_datetime" -version = "0.7.5+spec-1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "92e1cfed4a3038bc5a127e35a2d360f145e1f4b971b551a2ba5fd7aedf7e1347" -dependencies = [ - "serde_core", -] - -[[package]] -name = "toml_edit" -version = "0.23.10+spec-1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "84c8b9f757e028cee9fa244aea147aab2a9ec09d5325a9b01e0a49730c2b5269" -dependencies = [ - "indexmap", - "toml_datetime", - "toml_parser", - "winnow", -] - -[[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 = "toml_writer" -version = "1.0.6+spec-1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab16f14aed21ee8bfd8ec22513f7287cd4a91aa92e44edfe2c17ddd004e92607" - -[[package]] -name = "tower" -version = "0.5.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ebe5ef63511595f1344e2d5cfa636d973292adc0eec1f0ad45fae9f0851ab1d4" -dependencies = [ - "futures-core", - "futures-util", - "pin-project-lite", - "sync_wrapper", - "tokio", - "tower-layer", - "tower-service", - "tracing", -] - -[[package]] -name = "tower-http" -version = "0.6.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d4e6559d53cc268e5031cd8429d05415bc4cb4aefc4aa5d6cc35fbf5b924a1f8" -dependencies = [ - "bitflags 2.10.0", - "bytes", - "futures-util", - "http", - "http-body", - "iri-string", - "pin-project-lite", - "tower", - "tower-layer", - "tower-service", -] - -[[package]] -name = "tower-layer" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "121c2a6cda46980bb0fcd1647ffaf6cd3fc79a013de288782836f6df9c48780e" - -[[package]] -name = "tower-service" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8df9b6e13f2d32c91b9bd719c00d1958837bc7dec474d94952798cc8e69eeec3" - -[[package]] -name = "tracing" -version = "0.1.44" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "63e71662fa4b2a2c3a26f570f037eb95bb1f85397f3cd8076caed2f026a6d100" -dependencies = [ - "log", - "pin-project-lite", - "tracing-attributes", - "tracing-core", -] - -[[package]] -name = "tracing-attributes" -version = "0.1.31" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7490cfa5ec963746568740651ac6781f701c9c5ea257c58e057f3ba8cf69e8da" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.114", -] - -[[package]] -name = "tracing-core" -version = "0.1.36" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db97caf9d906fbde555dd62fa95ddba9eecfd14cb388e4f491a66d74cd5fb79a" -dependencies = [ - "once_cell", -] - -[[package]] -name = "try-lock" -version = "0.2.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b" - -[[package]] -name = "ttf-parser" -version = "0.25.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2df906b07856748fa3f6e0ad0cbaa047052d4a7dd609e231c4f72cee8c36f31" - -[[package]] -name = "type-map" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb30dbbd9036155e74adad6812e9898d03ec374946234fbcebd5dfc7b9187b90" -dependencies = [ - "rustc-hash 2.1.1", -] - [[package]] name = "typenum" version = "1.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "562d481066bde0658276a35467c4af00bdc6ee726305698a55b86e61d7ad82bb" -[[package]] -name = "unicase" -version = "2.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dbc4bc3a9f746d862c45cb89d705aa10f187bb96c76001afab07a0d35ce60142" - [[package]] name = "unicode-ident" version = "1.0.22" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9312f7c4f6ff9069b165498234ce8be658059c6728633667c526e27dc2cf1df5" -[[package]] -name = "unicode-segmentation" -version = "1.12.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f6ccf251212114b54433ec949fd6a7841275f9ada20dddd2f29e9ceea4501493" - -[[package]] -name = "unicode-width" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4ac048d71ede7ee76d585517add45da530660ef4390e49b098733c6e897f254" - [[package]] name = "unshell" version = "0.0.0" @@ -3949,67 +608,6 @@ dependencies = [ "ush-obfuscate", ] -[[package]] -name = "untrusted" -version = "0.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a156c684c91ea7d62626509bce3cb4e1d9ed5c4d978f7b4352658f96a4c26b4a" - -[[package]] -name = "untrusted" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" - -[[package]] -name = "unty" -version = "0.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d49784317cd0d1ee7ec5c716dd598ec5b4483ea832a2dced265471cc0f690ae" - -[[package]] -name = "url" -version = "2.5.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff67a8a4397373c3ef660812acab3268222035010ab8680ec4215f38ba3d0eed" -dependencies = [ - "form_urlencoded", - "idna", - "percent-encoding", - "serde", -] - -[[package]] -name = "ush-gui" -version = "0.1.0" -dependencies = [ - "chrono", - "eframe", - "egui", - "egui-async", - "egui_extras", - "egui_tiles", - "log", - "reqwest", - "serde", - "serde_json", - "unshell", - "wasm-bindgen", - "wasm-bindgen-futures", - "web-sys", -] - -[[package]] -name = "ush-manager" -version = "0.1.0" -dependencies = [ - "bincode", - "libc", - "libloading", - "rand 0.9.2", - "unshell", -] - [[package]] name = "ush-obfuscate" version = "0.1.0" @@ -4017,12 +615,12 @@ dependencies = [ "aes", "block-padding 0.4.2", "cbc", - "getrandom 0.3.4", + "getrandom", "hex", "hex-literal", "proc-macro2", "quote", - "rand 0.9.2", + "rand", "regex", "sha2", "static_init", @@ -4037,80 +635,12 @@ dependencies = [ "unshell", ] -[[package]] -name = "ush-server" -version = "0.1.0" -dependencies = [ - "axum", - "axum-extra", - "bcrypt", - "chrono", - "clap", - "jsonwebtoken", - "serde", - "serde_json", - "sled", - "static_init", - "tokio", - "toml", - "unshell", -] - -[[package]] -name = "utf8_iter" -version = "1.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6c140620e7ffbb22c2dee59cafe6084a59b5ffc27a8859a5f0d494b5d52b6be" - -[[package]] -name = "utf8parse" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821" - -[[package]] -name = "vcpkg" -version = "0.2.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426" - [[package]] name = "version_check" version = "0.9.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a" -[[package]] -name = "virtue" -version = "0.0.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "051eb1abcf10076295e815102942cc58f9d5e3b4560e46e53c21e8ff6f3af7b1" - -[[package]] -name = "walkdir" -version = "2.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "29790946404f91d9c5d06f9874efddea1dc06c5efe94541a7d6863108e3a5e4b" -dependencies = [ - "same-file", - "winapi-util", -] - -[[package]] -name = "want" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bfa7760aed19e106de2c7c0b581b509f2f25d3dacaf737cb82ac61bc6d760b0e" -dependencies = [ - "try-lock", -] - -[[package]] -name = "wasi" -version = "0.11.1+wasi-snapshot-preview1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ccf3ec651a847eb01de73ccad15eb7d99f80485de043efb2f370cd654f4ea44b" - [[package]] name = "wasip2" version = "1.0.2+wasi-0.2.9" @@ -4133,20 +663,6 @@ dependencies = [ "wasm-bindgen-shared", ] -[[package]] -name = "wasm-bindgen-futures" -version = "0.4.58" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70a6e77fd0ae8029c9ea0063f87c46fde723e7d887703d74ad2616d792e51e6f" -dependencies = [ - "cfg-if", - "futures-util", - "js-sys", - "once_cell", - "wasm-bindgen", - "web-sys", -] - [[package]] name = "wasm-bindgen-macro" version = "0.2.108" @@ -4179,279 +695,6 @@ dependencies = [ "unicode-ident", ] -[[package]] -name = "wayland-backend" -version = "0.3.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fee64194ccd96bf648f42a65a7e589547096dfa702f7cadef84347b66ad164f9" -dependencies = [ - "cc", - "downcast-rs", - "rustix 1.1.3", - "scoped-tls", - "smallvec", - "wayland-sys", -] - -[[package]] -name = "wayland-client" -version = "0.31.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b8e6faa537fbb6c186cb9f1d41f2f811a4120d1b57ec61f50da451a0c5122bec" -dependencies = [ - "bitflags 2.10.0", - "rustix 1.1.3", - "wayland-backend", - "wayland-scanner", -] - -[[package]] -name = "wayland-csd-frame" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "625c5029dbd43d25e6aa9615e88b829a5cad13b2819c4ae129fdbb7c31ab4c7e" -dependencies = [ - "bitflags 2.10.0", - "cursor-icon", - "wayland-backend", -] - -[[package]] -name = "wayland-cursor" -version = "0.31.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5864c4b5b6064b06b1e8b74ead4a98a6c45a285fe7a0e784d24735f011fdb078" -dependencies = [ - "rustix 1.1.3", - "wayland-client", - "xcursor", -] - -[[package]] -name = "wayland-protocols" -version = "0.32.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "baeda9ffbcfc8cd6ddaade385eaf2393bd2115a69523c735f12242353c3df4f3" -dependencies = [ - "bitflags 2.10.0", - "wayland-backend", - "wayland-client", - "wayland-scanner", -] - -[[package]] -name = "wayland-protocols-experimental" -version = "20250721.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "40a1f863128dcaaec790d7b4b396cc9b9a7a079e878e18c47e6c2d2c5a8dcbb1" -dependencies = [ - "bitflags 2.10.0", - "wayland-backend", - "wayland-client", - "wayland-protocols", - "wayland-scanner", -] - -[[package]] -name = "wayland-protocols-misc" -version = "0.3.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "791c58fdeec5406aa37169dd815327d1e47f334219b523444bc26d70ceb4c34e" -dependencies = [ - "bitflags 2.10.0", - "wayland-backend", - "wayland-client", - "wayland-protocols", - "wayland-scanner", -] - -[[package]] -name = "wayland-protocols-plasma" -version = "0.3.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aa98634619300a535a9a97f338aed9a5ff1e01a461943e8346ff4ae26007306b" -dependencies = [ - "bitflags 2.10.0", - "wayland-backend", - "wayland-client", - "wayland-protocols", - "wayland-scanner", -] - -[[package]] -name = "wayland-protocols-wlr" -version = "0.3.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e9597cdf02cf0c34cd5823786dce6b5ae8598f05c2daf5621b6e178d4f7345f3" -dependencies = [ - "bitflags 2.10.0", - "wayland-backend", - "wayland-client", - "wayland-protocols", - "wayland-scanner", -] - -[[package]] -name = "wayland-scanner" -version = "0.31.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5423e94b6a63e68e439803a3e153a9252d5ead12fd853334e2ad33997e3889e3" -dependencies = [ - "proc-macro2", - "quick-xml", - "quote", -] - -[[package]] -name = "wayland-sys" -version = "0.31.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e6dbfc3ac5ef974c92a2235805cc0114033018ae1290a72e474aa8b28cbbdfd" -dependencies = [ - "dlib", - "log", - "once_cell", - "pkg-config", -] - -[[package]] -name = "web-sys" -version = "0.3.85" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "312e32e551d92129218ea9a2452120f4aabc03529ef03e4d0d82fb2780608598" -dependencies = [ - "js-sys", - "wasm-bindgen", -] - -[[package]] -name = "web-time" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a6580f308b1fad9207618087a65c04e7a10bc77e02c8e84e9b00dd4b12fa0bb" -dependencies = [ - "js-sys", - "wasm-bindgen", -] - -[[package]] -name = "webbrowser" -version = "1.0.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "00f1243ef785213e3a32fa0396093424a3a6ea566f9948497e5a2309261a4c97" -dependencies = [ - "core-foundation 0.10.1", - "jni", - "log", - "ndk-context", - "objc2 0.6.3", - "objc2-foundation 0.3.2", - "url", - "web-sys", -] - -[[package]] -name = "weezl" -version = "0.1.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a28ac98ddc8b9274cb41bb4d9d4d5c425b6020c50c46f25559911905610b4a88" - -[[package]] -name = "wgpu" -version = "27.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bfe68bac7cde125de7a731c3400723cadaaf1703795ad3f4805f187459cd7a77" -dependencies = [ - "arrayvec", - "bitflags 2.10.0", - "cfg-if", - "cfg_aliases 0.2.1", - "document-features", - "hashbrown", - "log", - "portable-atomic", - "profiling", - "raw-window-handle", - "smallvec", - "static_assertions", - "wgpu-core", - "wgpu-hal", - "wgpu-types", -] - -[[package]] -name = "wgpu-core" -version = "27.0.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "27a75de515543b1897b26119f93731b385a19aea165a1ec5f0e3acecc229cae7" -dependencies = [ - "arrayvec", - "bit-set", - "bit-vec", - "bitflags 2.10.0", - "bytemuck", - "cfg_aliases 0.2.1", - "document-features", - "hashbrown", - "indexmap", - "log", - "naga", - "once_cell", - "parking_lot 0.12.5", - "portable-atomic", - "profiling", - "raw-window-handle", - "rustc-hash 1.1.0", - "smallvec", - "thiserror 2.0.18", - "wgpu-core-deps-windows-linux-android", - "wgpu-hal", - "wgpu-types", -] - -[[package]] -name = "wgpu-core-deps-windows-linux-android" -version = "27.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "71197027d61a71748e4120f05a9242b2ad142e3c01f8c1b47707945a879a03c3" -dependencies = [ - "wgpu-hal", -] - -[[package]] -name = "wgpu-hal" -version = "27.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b21cb61c57ee198bc4aff71aeadff4cbb80b927beb912506af9c780d64313ce" -dependencies = [ - "bitflags 2.10.0", - "cfg-if", - "cfg_aliases 0.2.1", - "libloading", - "log", - "naga", - "portable-atomic", - "portable-atomic-util", - "raw-window-handle", - "renderdoc-sys", - "thiserror 2.0.18", - "wgpu-types", -] - -[[package]] -name = "wgpu-types" -version = "27.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "afdcf84c395990db737f2dd91628706cb31e86d72e53482320d368e52b5da5eb" -dependencies = [ - "bitflags 2.10.0", - "bytemuck", - "js-sys", - "log", - "thiserror 2.0.18", - "web-sys", -] - [[package]] name = "winapi" version = "0.3.9" @@ -4468,15 +711,6 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" -[[package]] -name = "winapi-util" -version = "0.1.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c2a7b1c03c876122aa43f3020e6c3c3ee5c05081c9a00739faf7503aeba10d22" -dependencies = [ - "windows-sys 0.61.2", -] - [[package]] name = "winapi-x86_64-pc-windows-gnu" version = "0.4.0" @@ -4524,17 +758,6 @@ version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f0805222e57f7521d6a62e36fa9163bc891acd422f971defe97d64e70d0a4fe5" -[[package]] -name = "windows-registry" -version = "0.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "02752bf7fbdcce7f2a27a742f798510f3e5ad88dbe84871e5168e2120c3d5720" -dependencies = [ - "windows-link", - "windows-result", - "windows-strings", -] - [[package]] name = "windows-result" version = "0.4.1" @@ -4553,395 +776,12 @@ dependencies = [ "windows-link", ] -[[package]] -name = "windows-sys" -version = "0.45.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75283be5efb2831d37ea142365f009c02ec203cd29a3ebecbc093d52315b66d0" -dependencies = [ - "windows-targets 0.42.2", -] - -[[package]] -name = "windows-sys" -version = "0.52.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" -dependencies = [ - "windows-targets 0.52.6", -] - -[[package]] -name = "windows-sys" -version = "0.59.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b" -dependencies = [ - "windows-targets 0.52.6", -] - -[[package]] -name = "windows-sys" -version = "0.60.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f2f500e4d28234f72040990ec9d39e3a6b950f9f22d3dba18416c35882612bcb" -dependencies = [ - "windows-targets 0.53.5", -] - -[[package]] -name = "windows-sys" -version = "0.61.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae137229bcbd6cdf0f7b80a31df61766145077ddf49416a728b02cb3921ff3fc" -dependencies = [ - "windows-link", -] - -[[package]] -name = "windows-targets" -version = "0.42.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e5180c00cd44c9b1c88adb3693291f1cd93605ded80c250a75d472756b4d071" -dependencies = [ - "windows_aarch64_gnullvm 0.42.2", - "windows_aarch64_msvc 0.42.2", - "windows_i686_gnu 0.42.2", - "windows_i686_msvc 0.42.2", - "windows_x86_64_gnu 0.42.2", - "windows_x86_64_gnullvm 0.42.2", - "windows_x86_64_msvc 0.42.2", -] - -[[package]] -name = "windows-targets" -version = "0.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" -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_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.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4945f9f551b88e0d65f3db0bc25c33b8acea4d9e41163edf90dcd0b19f9069f3" -dependencies = [ - "windows-link", - "windows_aarch64_gnullvm 0.53.1", - "windows_aarch64_msvc 0.53.1", - "windows_i686_gnu 0.53.1", - "windows_i686_gnullvm 0.53.1", - "windows_i686_msvc 0.53.1", - "windows_x86_64_gnu 0.53.1", - "windows_x86_64_gnullvm 0.53.1", - "windows_x86_64_msvc 0.53.1", -] - -[[package]] -name = "windows_aarch64_gnullvm" -version = "0.42.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "597a5118570b68bc08d8d59125332c54f1ba9d9adeedeef5b99b02ba2b0698f8" - -[[package]] -name = "windows_aarch64_gnullvm" -version = "0.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" - -[[package]] -name = "windows_aarch64_gnullvm" -version = "0.53.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a9d8416fa8b42f5c947f8482c43e7d89e73a173cead56d044f6a56104a6d1b53" - -[[package]] -name = "windows_aarch64_msvc" -version = "0.42.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e08e8864a60f06ef0d0ff4ba04124db8b0fb3be5776a5cd47641e942e58c4d43" - -[[package]] -name = "windows_aarch64_msvc" -version = "0.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" - -[[package]] -name = "windows_aarch64_msvc" -version = "0.53.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9d782e804c2f632e395708e99a94275910eb9100b2114651e04744e9b125006" - -[[package]] -name = "windows_i686_gnu" -version = "0.42.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c61d927d8da41da96a81f029489353e68739737d3beca43145c8afec9a31a84f" - -[[package]] -name = "windows_i686_gnu" -version = "0.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" - -[[package]] -name = "windows_i686_gnu" -version = "0.53.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "960e6da069d81e09becb0ca57a65220ddff016ff2d6af6a223cf372a506593a3" - -[[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.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa7359d10048f68ab8b09fa71c3daccfb0e9b559aed648a8f95469c27057180c" - -[[package]] -name = "windows_i686_msvc" -version = "0.42.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44d840b6ec649f480a41c8d80f9c65108b92d89345dd94027bfe06ac444d1060" - -[[package]] -name = "windows_i686_msvc" -version = "0.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" - -[[package]] -name = "windows_i686_msvc" -version = "0.53.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e7ac75179f18232fe9c285163565a57ef8d3c89254a30685b57d83a38d326c2" - -[[package]] -name = "windows_x86_64_gnu" -version = "0.42.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8de912b8b8feb55c064867cf047dda097f92d51efad5b491dfb98f6bbb70cb36" - -[[package]] -name = "windows_x86_64_gnu" -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.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c3842cdd74a865a8066ab39c8a7a473c0778a3f29370b5fd6b4b9aa7df4a499" - -[[package]] -name = "windows_x86_64_gnullvm" -version = "0.42.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26d41b46a36d453748aedef1486d5c7a85db22e56aff34643984ea85514e94a3" - -[[package]] -name = "windows_x86_64_gnullvm" -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.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ffa179e2d07eee8ad8f57493436566c7cc30ac536a3379fdf008f47f6bb7ae1" - -[[package]] -name = "windows_x86_64_msvc" -version = "0.42.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9aec5da331524158c6d1a4ac0ab1541149c0b9505fde06423b02f5ef0106b9f0" - -[[package]] -name = "windows_x86_64_msvc" -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.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d6bbff5f0aada427a1e5a6da5f1f98158182f26556f345ac9e04d36d0ebed650" - -[[package]] -name = "winit" -version = "0.30.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c66d4b9ed69c4009f6321f762d6e61ad8a2389cd431b97cb1e146812e9e6c732" -dependencies = [ - "ahash", - "android-activity", - "atomic-waker", - "bitflags 2.10.0", - "block2", - "bytemuck", - "calloop 0.13.0", - "cfg_aliases 0.2.1", - "concurrent-queue", - "core-foundation 0.9.4", - "core-graphics", - "cursor-icon", - "dpi", - "js-sys", - "libc", - "memmap2", - "ndk", - "objc2 0.5.2", - "objc2-app-kit 0.2.2", - "objc2-foundation 0.2.2", - "objc2-ui-kit", - "orbclient", - "percent-encoding", - "pin-project", - "raw-window-handle", - "redox_syscall 0.4.1", - "rustix 0.38.44", - "smithay-client-toolkit 0.19.2", - "smol_str", - "tracing", - "unicode-segmentation", - "wasm-bindgen", - "wasm-bindgen-futures", - "wayland-backend", - "wayland-client", - "wayland-protocols", - "wayland-protocols-plasma", - "web-sys", - "web-time", - "windows-sys 0.52.0", - "x11-dl", - "x11rb", - "xkbcommon-dl", -] - -[[package]] -name = "winnow" -version = "0.7.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a5364e9d77fcdeeaa6062ced926ee3381faa2ee02d3eb83a5c27a8825540829" -dependencies = [ - "memchr", -] - [[package]] name = "wit-bindgen" version = "0.51.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d7249219f66ced02969388cf2bb044a09756a083d0fab1e566056b04d9fbcaa5" -[[package]] -name = "writeable" -version = "0.6.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9edde0db4769d2dc68579893f2306b26c6ecfbe0ef499b013d731b7b9247e0b9" - -[[package]] -name = "x11-dl" -version = "2.21.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38735924fedd5314a6e548792904ed8c6de6636285cb9fec04d5b1db85c1516f" -dependencies = [ - "libc", - "once_cell", - "pkg-config", -] - -[[package]] -name = "x11rb" -version = "0.13.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9993aa5be5a26815fe2c3eacfc1fde061fc1a1f094bf1ad2a18bf9c495dd7414" -dependencies = [ - "as-raw-xcb-connection", - "gethostname", - "libc", - "libloading", - "once_cell", - "rustix 1.1.3", - "x11rb-protocol", -] - -[[package]] -name = "x11rb-protocol" -version = "0.13.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ea6fc2961e4ef194dcbfe56bb845534d0dc8098940c7e5c012a258bfec6701bd" - -[[package]] -name = "xcursor" -version = "0.3.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bec9e4a500ca8864c5b47b8b482a73d62e4237670e5b5f1d6b9e3cae50f28f2b" - -[[package]] -name = "xkbcommon-dl" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d039de8032a9a8856a6be89cea3e5d12fdd82306ab7c94d74e6deab2460651c5" -dependencies = [ - "bitflags 2.10.0", - "dlib", - "log", - "once_cell", - "xkeysym", -] - -[[package]] -name = "xkeysym" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9cc00251562a284751c9973bace760d86c0276c471b4be569fe6b068ee97a56" - -[[package]] -name = "xml-rs" -version = "0.8.28" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3ae8337f8a065cfc972643663ea4279e04e7256de865aa66fe25cec5fb912d3f" - -[[package]] -name = "yoke" -version = "0.8.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72d6e5c6afb84d73944e5cedb052c4680d5657337201555f9f2a16b7406d4954" -dependencies = [ - "stable_deref_trait", - "yoke-derive", - "zerofrom", -] - -[[package]] -name = "yoke-derive" -version = "0.8.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b659052874eb698efe5b9e8cf382204678a0086ebf46982b79d6ca3182927e5d" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.114", - "synstructure", -] - [[package]] name = "zerocopy" version = "0.8.34" @@ -4962,83 +802,8 @@ dependencies = [ "syn 2.0.114", ] -[[package]] -name = "zerofrom" -version = "0.1.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50cc42e0333e05660c3587f3bf9d0478688e15d870fab3346451ce7f8c9fbea5" -dependencies = [ - "zerofrom-derive", -] - -[[package]] -name = "zerofrom-derive" -version = "0.1.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d71e5d6e06ab090c67b5e44993ec16b72dcbaabc526db883a360057678b48502" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.114", - "synstructure", -] - -[[package]] -name = "zeroize" -version = "1.8.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b97154e67e32c85465826e8bcc1c59429aaaf107c1e4a9e53c8d8ccd5eff88d0" - -[[package]] -name = "zerotrie" -version = "0.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a59c17a5562d507e4b54960e8569ebee33bee890c70aa3fe7b97e85a9fd7851" -dependencies = [ - "displaydoc", - "yoke", - "zerofrom", -] - -[[package]] -name = "zerovec" -version = "0.11.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c28719294829477f525be0186d13efa9a3c602f7ec202ca9e353d310fb9a002" -dependencies = [ - "yoke", - "zerofrom", - "zerovec-derive", -] - -[[package]] -name = "zerovec-derive" -version = "0.11.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eadce39539ca5cb3985590102671f2567e659fca9666581ad3411d59207951f3" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.114", -] - [[package]] name = "zmij" version = "1.0.17" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "02aae0f83f69aafc94776e879363e9771d7ecbffe2c7fbb6c14c5e00dfe88439" - -[[package]] -name = "zune-core" -version = "0.4.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f423a2c17029964870cfaabb1f13dfab7d092a62a29a89264f4d36990ca414a" - -[[package]] -name = "zune-jpeg" -version = "0.4.21" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "29ce2c8a9384ad323cf564b67da86e21d3cfdff87908bc1223ed5c99bc792713" -dependencies = [ - "zune-core", -] diff --git a/Cargo.toml b/Cargo.toml index a71794c..f96a363 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -14,16 +14,15 @@ include = ["LICENSE-APACHE", "LICENSE-MIT", "**/*.rs", "Cargo.toml"] [workspace] members = [ # Binaries - "ush-gui", + # "ush-gui", # UnShell Binaries - "ush-server", + # "ush-server", "ush-payload", # Libraries - "ush-manager", "ush-obfuscate" -, "core-modules/server2"] +] [features] default = [] diff --git a/core-modules/client/.cargo/config.toml b/core-modules/client/.cargo/config.toml deleted file mode 100644 index 043187d..0000000 --- a/core-modules/client/.cargo/config.toml +++ /dev/null @@ -1,3 +0,0 @@ -[unstable] -build-std = ["core", "std"] -build-std-features = ["optimize_for_size"] diff --git a/core-modules/client/Cargo.lock b/core-modules/client/Cargo.lock deleted file mode 100644 index a21b56c..0000000 --- a/core-modules/client/Cargo.lock +++ /dev/null @@ -1,873 +0,0 @@ -# This file is automatically @generated by Cargo. -# It is not intended for manual editing. -version = 4 - -[[package]] -name = "aes" -version = "0.8.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b169f7a6d4742236a0a00c541b845991d0ac43e546831af1249753ab4c3aa3a0" -dependencies = [ - "cfg-if", - "cipher", - "cpufeatures", -] - -[[package]] -name = "aho-corasick" -version = "1.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ddd31a130427c27518df266943a5308ed92d4b226cc639f5a8f1002816174301" -dependencies = [ - "memchr", -] - -[[package]] -name = "android_system_properties" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "819e7219dbd41043ac279b19830f2efc897156490d7fd6ea916720117ee66311" -dependencies = [ - "libc", -] - -[[package]] -name = "autocfg" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c08606f8c3cbf4ce6ec8e28fb0014a2c086708fe954eaa885384a6165172e7e8" - -[[package]] -name = "bincode" -version = "2.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "36eaf5d7b090263e8150820482d5d93cd964a81e4019913c972f4edcc6edb740" -dependencies = [ - "bincode_derive", - "serde", - "unty", -] - -[[package]] -name = "bincode_derive" -version = "2.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf95709a440f45e986983918d0e8a1f30a9b1df04918fc828670606804ac3c09" -dependencies = [ - "virtue", -] - -[[package]] -name = "bitflags" -version = "1.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" - -[[package]] -name = "bitflags" -version = "2.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "812e12b5285cc515a9c72a5c1d3b6d46a19dac5acfef5265968c166106e31dd3" - -[[package]] -name = "block-buffer" -version = "0.10.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71" -dependencies = [ - "generic-array", -] - -[[package]] -name = "block-padding" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a8894febbff9f758034a5b8e12d87918f56dfc64a8e1fe757d65e29041538d93" -dependencies = [ - "generic-array", -] - -[[package]] -name = "block-padding" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "710f1dd022ef4e93f8a438b4ba958de7f64308434fa6a87104481645cc30068b" -dependencies = [ - "hybrid-array", -] - -[[package]] -name = "bumpalo" -version = "3.19.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5dd9dc738b7a8311c7ade152424974d8115f2cdad61e8dab8dac9f2362298510" - -[[package]] -name = "cbc" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26b52a9543ae338f279b96b0b9fed9c8093744685043739079ce85cd58f289a6" -dependencies = [ - "cipher", -] - -[[package]] -name = "cc" -version = "1.2.49" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90583009037521a116abf44494efecd645ba48b6622457080f080b85544e2215" -dependencies = [ - "find-msvc-tools", - "shlex", -] - -[[package]] -name = "cfg-if" -version = "1.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9330f8b2ff13f34540b44e946ef35111825727b38d33286ef986142615121801" - -[[package]] -name = "cfg_aliases" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fd16c4719339c4530435d38e511904438d07cce7950afa3718a84ac36c10e89e" - -[[package]] -name = "cfg_aliases" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "613afe47fcd5fac7ccf1db93babcb082c5994d996f20b8b159f2ad1658eb5724" - -[[package]] -name = "chrono" -version = "0.4.42" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "145052bdd345b87320e369255277e3fb5152762ad123a901ef5c262dd38fe8d2" -dependencies = [ - "iana-time-zone", - "js-sys", - "num-traits", - "wasm-bindgen", - "windows-link", -] - -[[package]] -name = "cipher" -version = "0.4.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "773f3b9af64447d2ce9850330c473515014aa235e6a783b02db81ff39e4a3dad" -dependencies = [ - "crypto-common", - "inout", -] - -[[package]] -name = "client" -version = "0.0.0" -dependencies = [ - "unshell-lib", - "unshell-manager", - "unshell-obfuscate", -] - -[[package]] -name = "core-foundation-sys" -version = "0.8.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b" - -[[package]] -name = "cpufeatures" -version = "0.2.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "59ed5838eebb26a2bb2e58f6d5b5316989ae9d08bab10e0e6d103e656d1b0280" -dependencies = [ - "libc", -] - -[[package]] -name = "crossbeam-channel" -version = "0.5.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "82b8f8f868b36967f9606790d1903570de9ceaf870a7bf9fbbd3016d636a2cb2" -dependencies = [ - "crossbeam-utils", -] - -[[package]] -name = "crossbeam-utils" -version = "0.8.21" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d0a5c400df2834b80a4c3327b3aad3a4c4cd4de0629063962b03235697506a28" - -[[package]] -name = "crypto-common" -version = "0.1.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "78c8292055d1c1df0cce5d180393dc8cce0abec0a7102adb6c7b1eef6016d60a" -dependencies = [ - "generic-array", - "typenum", -] - -[[package]] -name = "digest" -version = "0.10.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" -dependencies = [ - "block-buffer", - "crypto-common", -] - -[[package]] -name = "find-msvc-tools" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3a3076410a55c90011c298b04d0cfa770b00fa04e1e3c97d3f6c9de105a03844" - -[[package]] -name = "generic-array" -version = "0.14.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" -dependencies = [ - "typenum", - "version_check", -] - -[[package]] -name = "getrandom" -version = "0.3.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "899def5c37c4fd7b2664648c28120ecec138e4d395b459e5ca34f9cce2dd77fd" -dependencies = [ - "cfg-if", - "libc", - "r-efi", - "wasip2", -] - -[[package]] -name = "hex" -version = "0.4.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" - -[[package]] -name = "hex-literal" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e712f64ec3850b98572bffac52e2c6f282b29fe6c5fa6d42334b30be438d95c1" - -[[package]] -name = "hybrid-array" -version = "0.4.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f471e0a81b2f90ffc0cb2f951ae04da57de8baa46fa99112b062a5173a5088d0" -dependencies = [ - "typenum", -] - -[[package]] -name = "iana-time-zone" -version = "0.1.64" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "33e57f83510bb73707521ebaffa789ec8caf86f9657cad665b092b581d40e9fb" -dependencies = [ - "android_system_properties", - "core-foundation-sys", - "iana-time-zone-haiku", - "js-sys", - "log", - "wasm-bindgen", - "windows-core", -] - -[[package]] -name = "iana-time-zone-haiku" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f31827a206f56af32e590ba56d5d2d085f558508192593743f16b2306495269f" -dependencies = [ - "cc", -] - -[[package]] -name = "inout" -version = "0.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "879f10e63c20629ecabbb64a8010319738c66a5cd0c29b02d63d272b03751d01" -dependencies = [ - "block-padding 0.3.3", - "generic-array", -] - -[[package]] -name = "itoa" -version = "1.0.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4a5f13b858c8d314ee3e8f639011f7ccefe71f97f96e50151fb991f267928e2c" - -[[package]] -name = "js-sys" -version = "0.3.83" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "464a3709c7f55f1f721e5389aa6ea4e3bc6aba669353300af094b29ffbdde1d8" -dependencies = [ - "once_cell", - "wasm-bindgen", -] - -[[package]] -name = "libc" -version = "0.2.178" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "37c93d8daa9d8a012fd8ab92f088405fb202ea0b6ab73ee2482ae66af4f42091" - -[[package]] -name = "libloading" -version = "0.8.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d7c4b02199fee7c5d21a5ae7d8cfa79a6ef5bb2fc834d6e9058e89c825efdc55" -dependencies = [ - "cfg-if", - "windows-link", -] - -[[package]] -name = "lock_api" -version = "0.4.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "224399e74b87b5f3557511d98dff8b14089b3dadafcab6bb93eab67d3aace965" -dependencies = [ - "scopeguard", -] - -[[package]] -name = "log" -version = "0.4.29" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e5032e24019045c762d3c0f28f5b6b8bbf38563a65908389bf7978758920897" - -[[package]] -name = "memchr" -version = "2.7.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f52b00d39961fc5b2736ea853c9cc86238e165017a493d1d5c8eac6bdc4cc273" - -[[package]] -name = "num-traits" -version = "0.2.19" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841" -dependencies = [ - "autocfg", -] - -[[package]] -name = "once_cell" -version = "1.21.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "42f5e15c9953c5e4ccceeb2e7382a716482c34515315f7b03532b8b4e8393d2d" - -[[package]] -name = "parking_lot" -version = "0.12.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "93857453250e3077bd71ff98b6a65ea6621a19bb0f559a85248955ac12c45a1a" -dependencies = [ - "lock_api", - "parking_lot_core", -] - -[[package]] -name = "parking_lot_core" -version = "0.9.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2621685985a2ebf1c516881c026032ac7deafcda1a2c9b7850dc81e3dfcb64c1" -dependencies = [ - "cfg-if", - "libc", - "redox_syscall", - "smallvec", - "windows-link", -] - -[[package]] -name = "ppv-lite86" -version = "0.2.21" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85eae3c4ed2f50dcfe72643da4befc30deadb458a9b590d720cde2f2b1e97da9" -dependencies = [ - "zerocopy", -] - -[[package]] -name = "proc-macro2" -version = "1.0.103" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ee95bc4ef87b8d5ba32e8b7714ccc834865276eab0aed5c9958d00ec45f49e8" -dependencies = [ - "unicode-ident", -] - -[[package]] -name = "quote" -version = "1.0.42" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a338cc41d27e6cc6dce6cefc13a0729dfbb81c262b1f519331575dd80ef3067f" -dependencies = [ - "proc-macro2", -] - -[[package]] -name = "r-efi" -version = "5.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "69cdb34c158ceb288df11e18b4bd39de994f6657d83847bdffdbd7f346754b0f" - -[[package]] -name = "rand" -version = "0.9.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6db2770f06117d490610c7488547d543617b21bfa07796d7a12f6f1bd53850d1" -dependencies = [ - "rand_chacha", - "rand_core", -] - -[[package]] -name = "rand_chacha" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3022b5f1df60f26e1ffddd6c66e8aa15de382ae63b3a0c1bfc0e4d3e3f325cb" -dependencies = [ - "ppv-lite86", - "rand_core", -] - -[[package]] -name = "rand_core" -version = "0.9.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "99d9a13982dcf210057a8a78572b2217b667c3beacbf3a0d8b454f6f82837d38" -dependencies = [ - "getrandom", -] - -[[package]] -name = "redox_syscall" -version = "0.5.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed2bf2547551a7053d6fdfafda3f938979645c44812fbfcda098faae3f1a362d" -dependencies = [ - "bitflags 2.10.0", -] - -[[package]] -name = "regex" -version = "1.12.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "843bc0191f75f3e22651ae5f1e72939ab2f72a4bc30fa80a066bd66edefc24d4" -dependencies = [ - "aho-corasick", - "memchr", - "regex-automata", - "regex-syntax", -] - -[[package]] -name = "regex-automata" -version = "0.4.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5276caf25ac86c8d810222b3dbb938e512c55c6831a10f3e6ed1c93b84041f1c" -dependencies = [ - "aho-corasick", - "memchr", - "regex-syntax", -] - -[[package]] -name = "regex-syntax" -version = "0.8.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a2d987857b319362043e95f5353c0535c1f58eec5336fdfcf626430af7def58" - -[[package]] -name = "rustversion" -version = "1.0.22" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b39cdef0fa800fc44525c84ccb54a029961a8215f9619753635a9c0d2538d46d" - -[[package]] -name = "ryu" -version = "1.0.20" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "28d3b2b1366ec20994f1fd18c3c594f05c5dd4bc44d8bb0c1c632c8d6829481f" - -[[package]] -name = "scopeguard" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" - -[[package]] -name = "serde" -version = "1.0.228" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a8e94ea7f378bd32cbbd37198a4a91436180c5bb472411e48b5ec2e2124ae9e" -dependencies = [ - "serde_core", - "serde_derive", -] - -[[package]] -name = "serde_core" -version = "1.0.228" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41d385c7d4ca58e59fc732af25c3983b67ac852c1a25000afe1175de458b67ad" -dependencies = [ - "serde_derive", -] - -[[package]] -name = "serde_derive" -version = "1.0.228" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d540f220d3187173da220f885ab66608367b6574e925011a9353e4badda91d79" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.111", -] - -[[package]] -name = "serde_json" -version = "1.0.145" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "402a6f66d8c709116cf22f558eab210f5a50187f702eb4d7e5ef38d9a7f1c79c" -dependencies = [ - "itoa", - "memchr", - "ryu", - "serde", - "serde_core", -] - -[[package]] -name = "sha2" -version = "0.10.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a7507d819769d01a365ab707794a4084392c824f54a7a6a7862f8c3d0892b283" -dependencies = [ - "cfg-if", - "cpufeatures", - "digest", -] - -[[package]] -name = "shlex" -version = "1.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" - -[[package]] -name = "smallvec" -version = "1.15.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67b1b7a3b5fe4f1376887184045fcf45c69e92af734b7aaddc05fb777b6fbd03" - -[[package]] -name = "static_init" -version = "1.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8bae1df58c5fea7502e8e352ec26b5579f6178e1fdb311e088580c980dee25ed" -dependencies = [ - "bitflags 1.3.2", - "cfg_aliases 0.2.1", - "libc", - "parking_lot", - "parking_lot_core", - "static_init_macro", - "winapi", -] - -[[package]] -name = "static_init_macro" -version = "1.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1389c88ddd739ec6d3f8f83343764a0e944cd23cfbf126a9796a714b0b6edd6f" -dependencies = [ - "cfg_aliases 0.1.1", - "memchr", - "proc-macro2", - "quote", - "syn 1.0.109", -] - -[[package]] -name = "syn" -version = "1.0.109" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" -dependencies = [ - "proc-macro2", - "quote", - "unicode-ident", -] - -[[package]] -name = "syn" -version = "2.0.111" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "390cc9a294ab71bdb1aa2e99d13be9c753cd2d7bd6560c77118597410c4d2e87" -dependencies = [ - "proc-macro2", - "quote", - "unicode-ident", -] - -[[package]] -name = "typenum" -version = "1.19.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "562d481066bde0658276a35467c4af00bdc6ee726305698a55b86e61d7ad82bb" - -[[package]] -name = "unicode-ident" -version = "1.0.22" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9312f7c4f6ff9069b165498234ce8be658059c6728633667c526e27dc2cf1df5" - -[[package]] -name = "unshell-crypt" -version = "0.1.0" -dependencies = [ - "aes", - "block-padding 0.4.2", - "cbc", - "getrandom", - "hex", - "hex-literal", - "regex", - "sha2", -] - -[[package]] -name = "unshell-lib" -version = "0.0.0" -dependencies = [ - "bincode", - "chrono", - "crossbeam-channel", - "libc", - "rand", - "serde", - "serde_json", - "unshell-obfuscate", -] - -[[package]] -name = "unshell-manager" -version = "0.0.0" -dependencies = [ - "bincode", - "libc", - "libloading", - "rand", - "unshell-lib", - "unshell-obfuscate", -] - -[[package]] -name = "unshell-obfuscate" -version = "0.0.0" -dependencies = [ - "proc-macro2", - "quote", - "rand", - "static_init", - "syn 2.0.111", - "unshell-crypt", -] - -[[package]] -name = "unty" -version = "0.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d49784317cd0d1ee7ec5c716dd598ec5b4483ea832a2dced265471cc0f690ae" - -[[package]] -name = "version_check" -version = "0.9.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a" - -[[package]] -name = "virtue" -version = "0.0.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "051eb1abcf10076295e815102942cc58f9d5e3b4560e46e53c21e8ff6f3af7b1" - -[[package]] -name = "wasip2" -version = "1.0.1+wasi-0.2.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0562428422c63773dad2c345a1882263bbf4d65cf3f42e90921f787ef5ad58e7" -dependencies = [ - "wit-bindgen", -] - -[[package]] -name = "wasm-bindgen" -version = "0.2.106" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d759f433fa64a2d763d1340820e46e111a7a5ab75f993d1852d70b03dbb80fd" -dependencies = [ - "cfg-if", - "once_cell", - "rustversion", - "wasm-bindgen-macro", - "wasm-bindgen-shared", -] - -[[package]] -name = "wasm-bindgen-macro" -version = "0.2.106" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "48cb0d2638f8baedbc542ed444afc0644a29166f1595371af4fecf8ce1e7eeb3" -dependencies = [ - "quote", - "wasm-bindgen-macro-support", -] - -[[package]] -name = "wasm-bindgen-macro-support" -version = "0.2.106" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cefb59d5cd5f92d9dcf80e4683949f15ca4b511f4ac0a6e14d4e1ac60c6ecd40" -dependencies = [ - "bumpalo", - "proc-macro2", - "quote", - "syn 2.0.111", - "wasm-bindgen-shared", -] - -[[package]] -name = "wasm-bindgen-shared" -version = "0.2.106" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cbc538057e648b67f72a982e708d485b2efa771e1ac05fec311f9f63e5800db4" -dependencies = [ - "unicode-ident", -] - -[[package]] -name = "winapi" -version = "0.3.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" -dependencies = [ - "winapi-i686-pc-windows-gnu", - "winapi-x86_64-pc-windows-gnu", -] - -[[package]] -name = "winapi-i686-pc-windows-gnu" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" - -[[package]] -name = "winapi-x86_64-pc-windows-gnu" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" - -[[package]] -name = "windows-core" -version = "0.62.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b8e83a14d34d0623b51dce9581199302a221863196a1dde71a7663a4c2be9deb" -dependencies = [ - "windows-implement", - "windows-interface", - "windows-link", - "windows-result", - "windows-strings", -] - -[[package]] -name = "windows-implement" -version = "0.60.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "053e2e040ab57b9dc951b72c264860db7eb3b0200ba345b4e4c3b14f67855ddf" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.111", -] - -[[package]] -name = "windows-interface" -version = "0.59.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f316c4a2570ba26bbec722032c4099d8c8bc095efccdc15688708623367e358" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.111", -] - -[[package]] -name = "windows-link" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0805222e57f7521d6a62e36fa9163bc891acd422f971defe97d64e70d0a4fe5" - -[[package]] -name = "windows-result" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7781fa89eaf60850ac3d2da7af8e5242a5ea78d1a11c49bf2910bb5a73853eb5" -dependencies = [ - "windows-link", -] - -[[package]] -name = "windows-strings" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7837d08f69c77cf6b07689544538e017c1bfcf57e34b4c0ff58e6c2cd3b37091" -dependencies = [ - "windows-link", -] - -[[package]] -name = "wit-bindgen" -version = "0.46.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f17a85883d4e6d00e8a97c586de764dabcc06133f7f1d55dce5cdc070ad7fe59" - -[[package]] -name = "zerocopy" -version = "0.8.31" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fd74ec98b9250adb3ca554bdde269adf631549f51d8a8f8f0a10b50f1cb298c3" -dependencies = [ - "zerocopy-derive", -] - -[[package]] -name = "zerocopy-derive" -version = "0.8.31" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d8a8d209fdf45cf5138cbb5a506f6b52522a25afccc534d1475dad8e31105c6a" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.111", -] diff --git a/core-modules/client/Cargo.toml b/core-modules/client/Cargo.toml deleted file mode 100644 index ab9cfa1..0000000 --- a/core-modules/client/Cargo.toml +++ /dev/null @@ -1,26 +0,0 @@ -cargo-features = ["trim-paths", "panic-immediate-abort"] - -[package] -name = "client" -edition = "2024" - -[lib] -crate-type = ["cdylib"] - -[features] -log_debug = ["unshell-lib/log_debug", "unshell-manager/obfuscate"] -obfuscate = ["unshell-lib/obfuscate", "unshell-obfuscate/obfuscate", "unshell-manager/obfuscate"] - -[dependencies] -unshell-lib = {path = "../../unshell-lib", default-featues = false} -unshell-obfuscate = {path = "../../unshell-obfuscate", default-featues = false} -unshell-manager = {path = "../../unshell-manager", default-featues = false} - -[profile.release] -strip = true # Strip symbols from the binary -opt-level = "s" # Optimize for size -lto = true -codegen-units = 1 -panic = "immediate-abort" -debug = false -trim-paths = "all" diff --git a/core-modules/client/build.sh b/core-modules/client/build.sh deleted file mode 100755 index 2eac10c..0000000 --- a/core-modules/client/build.sh +++ /dev/null @@ -1,28 +0,0 @@ -# cargo clean - -OBFUSCATION_KEY=abc123abc \ -cargo build --release - -export BINARY=./target/release/libclient.so - - -declare -a headers=( - ".gnu_debuglink" # - Debug information link - ".comment" #- Compiler version info - ".shstrtab" #- Section header string table (only needed by tools like readelf) - ".note.gnu.bu" ".note.gnu.build-id" # - Build ID note - ".eh_frame" ".eh_frame_hdr" # Exception handling info (can break C++ exceptions if removed) - ".gnu.version" - #".gnu.version_r" - # Symbol versioning (may be needed for some shared libraries) - #".gnu.hash" # Hash table for symbol lookup optimization -) - -# TODO: Implement FAKE section header comments and information -# Shuffle order of headers?? - -for section in "${headers[@]}" -do - strip --remove-section="$section" $BINARY - echo "Removed section header $section" -done diff --git a/core-modules/client/src/client_runtime.rs b/core-modules/client/src/client_runtime.rs deleted file mode 100644 index 82c6081..0000000 --- a/core-modules/client/src/client_runtime.rs +++ /dev/null @@ -1,126 +0,0 @@ -use std::{ - net, - sync::{ - Arc, Mutex, - atomic::{AtomicBool, Ordering}, - }, - thread::{self, JoinHandle}, - time::Duration, -}; - -use unshell_lib::{ModuleError, Result, config::RuntimeConfig, debug, error, info}; -// use unshell_modules::{Manager, ModuleRuntime}; - -use unshell_manager::{ - Manager, ModuleRuntime, - network::{Stream, TcpStream}, -}; - -pub struct ClientRuntime { - config: &'static RuntimeConfig, - thread_handle: Option>, - join_signal: Arc, -} - -impl ClientRuntime { - pub fn new(config: &'static RuntimeConfig) -> Result { - let join_signal = Arc::new(AtomicBool::new(false)); - - Ok(Self { - config, - thread_handle: None, - join_signal, - }) - } - - // pub fn send(&mut self, announcement: &Announcement) -> Result<(), ModuleError> { - // let bytes = announcement.encode(); - - // let mut streams = self.stream.lock().unwrap(); - - // for stream in streams.iter_mut() { - // stream.write_all(&u32::to_be_bytes(bytes.len() as u32))?; - // stream.write_all(&bytes)?; - // stream.flush()?; - // } - - // println!("Announcement {:?} sent", announcement); - - // Ok(()) - // } -} - -impl ModuleRuntime for ClientRuntime { - fn is_running(&self) -> bool { - self.thread_handle.as_ref().is_none_or(|h| h.is_finished()) - } - - fn kill(self: Box) { - if !self.is_running() { - self.join_signal.store(true, Ordering::Relaxed); - if let Some(handle) = self.thread_handle { - let _ = handle.join(); - } - } - } - - fn init(&mut self, manager: Arc>) -> Result<()> { - let host = match self.config.config.get("host") { - Some(host) => host, - None => { - return Err(ModuleError::Error( - "Could not find HOST in Client Runtime".into(), - )); - } - }; - - let retry = match self.config.config.get("retry") { - Some(retry) => Duration::from_millis(retry.parse::().unwrap()), - None => { - return Err(ModuleError::Error( - "Could not find RETRY in Client Runtime".into(), - )); - } - }; - - // let join_clone = self.join_signal.clone(); - - thread::spawn(move || { - debug!("Connecting to server..."); - - loop { - let stream = match net::TcpStream::connect(host) { - Ok(stream) => stream, - Err(e) => { - error!("Failed to connect to server: {}", e); - thread::sleep(retry); - continue; - } - }; - info!("Connected to {}", host); - - thread::sleep(Duration::from_millis(100)); - // Duration::from_millis(100); - - let stream = TcpStream::new(stream); - let stream_clone = stream.try_clone().unwrap(); - - manager.lock().unwrap().add_connection(stream_clone); - - // while !join_clone.load(Ordering::Relaxed) { - - // } - - while stream.is_alive() { - thread::sleep(Duration::from_millis(100)); - } - - debug!("Disconnected from 1234 {}", host); - - thread::sleep(retry); - } - }); - - Ok(()) - } -} diff --git a/core-modules/client/src/lib.rs b/core-modules/client/src/lib.rs deleted file mode 100644 index 62140af..0000000 --- a/core-modules/client/src/lib.rs +++ /dev/null @@ -1,70 +0,0 @@ -mod client_runtime; - -pub const MODULE_NAME: &'static str = "client"; - -use std::any::TypeId; - -use unshell_lib::{ - ModuleError, - // client::client_runtime::ClientRuntime, - config::RuntimeConfig, - warn, // module_interface -}; - -use unshell_manager::{InterfaceWrapper, ModuleRuntime, NamedComponent, module_interface}; - -use crate::client_runtime::ClientRuntime; - -pub use unshell_lib::logger::setup_logger; - -pub extern "C" fn test1() { - warn!("Test1 called xxxxxxxxxxx"); -} -pub extern "C" fn test2() { - warn!("Test2 called"); -} -pub extern "C" fn test3() { - warn!("Test3 called"); -} - -module_interface! { - ClientInterface { - fn test1(); - fn test2(); - fn test3(); - } -} - -pub struct ClientInterfaceWrapper; - -impl InterfaceWrapper for ClientInterfaceWrapper { - fn get_interface(&self) -> Option - where - Self: Sized, - { - if TypeId::of::() == TypeId::of::() { - let my_struct = ClientInterface::from_raw(test1, test2, test3); - - unsafe { Some(std::mem::transmute_copy(&my_struct)) } - } else { - None - } - } -} - -fn get_interface() -> Option<&'static (dyn InterfaceWrapper + Sync)> { - Some(&ClientInterfaceWrapper) -} - -fn start_runtime(config: &'static RuntimeConfig) -> Result, ModuleError> { - Ok(Box::new(ClientRuntime::new(config)?)) -} - -#[unsafe(no_mangle)] -pub fn get_components() -> Vec { - vec![NamedComponent { - name: MODULE_NAME, - get_interface: &get_interface, - start_runtime: &start_runtime, - }] -} diff --git a/core-modules/server/Cargo.lock b/core-modules/server/Cargo.lock deleted file mode 100644 index 39dc19e..0000000 --- a/core-modules/server/Cargo.lock +++ /dev/null @@ -1,861 +0,0 @@ -# This file is automatically @generated by Cargo. -# It is not intended for manual editing. -version = 4 - -[[package]] -name = "aes" -version = "0.8.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b169f7a6d4742236a0a00c541b845991d0ac43e546831af1249753ab4c3aa3a0" -dependencies = [ - "cfg-if", - "cipher", - "cpufeatures", -] - -[[package]] -name = "aho-corasick" -version = "1.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ddd31a130427c27518df266943a5308ed92d4b226cc639f5a8f1002816174301" -dependencies = [ - "memchr", -] - -[[package]] -name = "android_system_properties" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "819e7219dbd41043ac279b19830f2efc897156490d7fd6ea916720117ee66311" -dependencies = [ - "libc", -] - -[[package]] -name = "autocfg" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c08606f8c3cbf4ce6ec8e28fb0014a2c086708fe954eaa885384a6165172e7e8" - -[[package]] -name = "bincode" -version = "2.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "36eaf5d7b090263e8150820482d5d93cd964a81e4019913c972f4edcc6edb740" -dependencies = [ - "bincode_derive", - "serde", - "unty", -] - -[[package]] -name = "bincode_derive" -version = "2.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf95709a440f45e986983918d0e8a1f30a9b1df04918fc828670606804ac3c09" -dependencies = [ - "virtue", -] - -[[package]] -name = "bitflags" -version = "1.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" - -[[package]] -name = "bitflags" -version = "2.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "812e12b5285cc515a9c72a5c1d3b6d46a19dac5acfef5265968c166106e31dd3" - -[[package]] -name = "block-buffer" -version = "0.10.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71" -dependencies = [ - "generic-array", -] - -[[package]] -name = "block-padding" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a8894febbff9f758034a5b8e12d87918f56dfc64a8e1fe757d65e29041538d93" -dependencies = [ - "generic-array", -] - -[[package]] -name = "block-padding" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "710f1dd022ef4e93f8a438b4ba958de7f64308434fa6a87104481645cc30068b" -dependencies = [ - "hybrid-array", -] - -[[package]] -name = "bumpalo" -version = "3.19.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5dd9dc738b7a8311c7ade152424974d8115f2cdad61e8dab8dac9f2362298510" - -[[package]] -name = "cbc" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26b52a9543ae338f279b96b0b9fed9c8093744685043739079ce85cd58f289a6" -dependencies = [ - "cipher", -] - -[[package]] -name = "cc" -version = "1.2.50" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f50d563227a1c37cc0a263f64eca3334388c01c5e4c4861a9def205c614383c" -dependencies = [ - "find-msvc-tools", - "shlex", -] - -[[package]] -name = "cfg-if" -version = "1.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9330f8b2ff13f34540b44e946ef35111825727b38d33286ef986142615121801" - -[[package]] -name = "cfg_aliases" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fd16c4719339c4530435d38e511904438d07cce7950afa3718a84ac36c10e89e" - -[[package]] -name = "cfg_aliases" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "613afe47fcd5fac7ccf1db93babcb082c5994d996f20b8b159f2ad1658eb5724" - -[[package]] -name = "chrono" -version = "0.4.42" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "145052bdd345b87320e369255277e3fb5152762ad123a901ef5c262dd38fe8d2" -dependencies = [ - "iana-time-zone", - "js-sys", - "num-traits", - "wasm-bindgen", - "windows-link", -] - -[[package]] -name = "cipher" -version = "0.4.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "773f3b9af64447d2ce9850330c473515014aa235e6a783b02db81ff39e4a3dad" -dependencies = [ - "crypto-common", - "inout", -] - -[[package]] -name = "core-foundation-sys" -version = "0.8.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b" - -[[package]] -name = "cpufeatures" -version = "0.2.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "59ed5838eebb26a2bb2e58f6d5b5316989ae9d08bab10e0e6d103e656d1b0280" -dependencies = [ - "libc", -] - -[[package]] -name = "crossbeam-channel" -version = "0.5.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "82b8f8f868b36967f9606790d1903570de9ceaf870a7bf9fbbd3016d636a2cb2" -dependencies = [ - "crossbeam-utils", -] - -[[package]] -name = "crossbeam-utils" -version = "0.8.21" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d0a5c400df2834b80a4c3327b3aad3a4c4cd4de0629063962b03235697506a28" - -[[package]] -name = "crypto-common" -version = "0.1.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "78c8292055d1c1df0cce5d180393dc8cce0abec0a7102adb6c7b1eef6016d60a" -dependencies = [ - "generic-array", - "typenum", -] - -[[package]] -name = "digest" -version = "0.10.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" -dependencies = [ - "block-buffer", - "crypto-common", -] - -[[package]] -name = "find-msvc-tools" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3a3076410a55c90011c298b04d0cfa770b00fa04e1e3c97d3f6c9de105a03844" - -[[package]] -name = "generic-array" -version = "0.14.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" -dependencies = [ - "typenum", - "version_check", -] - -[[package]] -name = "getrandom" -version = "0.3.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "899def5c37c4fd7b2664648c28120ecec138e4d395b459e5ca34f9cce2dd77fd" -dependencies = [ - "cfg-if", - "libc", - "r-efi", - "wasip2", -] - -[[package]] -name = "hex" -version = "0.4.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" - -[[package]] -name = "hex-literal" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e712f64ec3850b98572bffac52e2c6f282b29fe6c5fa6d42334b30be438d95c1" - -[[package]] -name = "hybrid-array" -version = "0.4.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f471e0a81b2f90ffc0cb2f951ae04da57de8baa46fa99112b062a5173a5088d0" -dependencies = [ - "typenum", -] - -[[package]] -name = "iana-time-zone" -version = "0.1.64" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "33e57f83510bb73707521ebaffa789ec8caf86f9657cad665b092b581d40e9fb" -dependencies = [ - "android_system_properties", - "core-foundation-sys", - "iana-time-zone-haiku", - "js-sys", - "log", - "wasm-bindgen", - "windows-core", -] - -[[package]] -name = "iana-time-zone-haiku" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f31827a206f56af32e590ba56d5d2d085f558508192593743f16b2306495269f" -dependencies = [ - "cc", -] - -[[package]] -name = "inout" -version = "0.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "879f10e63c20629ecabbb64a8010319738c66a5cd0c29b02d63d272b03751d01" -dependencies = [ - "block-padding 0.3.3", - "generic-array", -] - -[[package]] -name = "itoa" -version = "1.0.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4a5f13b858c8d314ee3e8f639011f7ccefe71f97f96e50151fb991f267928e2c" - -[[package]] -name = "js-sys" -version = "0.3.83" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "464a3709c7f55f1f721e5389aa6ea4e3bc6aba669353300af094b29ffbdde1d8" -dependencies = [ - "once_cell", - "wasm-bindgen", -] - -[[package]] -name = "libc" -version = "0.2.178" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "37c93d8daa9d8a012fd8ab92f088405fb202ea0b6ab73ee2482ae66af4f42091" - -[[package]] -name = "libloading" -version = "0.8.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d7c4b02199fee7c5d21a5ae7d8cfa79a6ef5bb2fc834d6e9058e89c825efdc55" -dependencies = [ - "cfg-if", - "windows-link", -] - -[[package]] -name = "lock_api" -version = "0.4.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "224399e74b87b5f3557511d98dff8b14089b3dadafcab6bb93eab67d3aace965" -dependencies = [ - "scopeguard", -] - -[[package]] -name = "log" -version = "0.4.29" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e5032e24019045c762d3c0f28f5b6b8bbf38563a65908389bf7978758920897" - -[[package]] -name = "memchr" -version = "2.7.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f52b00d39961fc5b2736ea853c9cc86238e165017a493d1d5c8eac6bdc4cc273" - -[[package]] -name = "num-traits" -version = "0.2.19" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841" -dependencies = [ - "autocfg", -] - -[[package]] -name = "once_cell" -version = "1.21.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "42f5e15c9953c5e4ccceeb2e7382a716482c34515315f7b03532b8b4e8393d2d" - -[[package]] -name = "parking_lot" -version = "0.12.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "93857453250e3077bd71ff98b6a65ea6621a19bb0f559a85248955ac12c45a1a" -dependencies = [ - "lock_api", - "parking_lot_core", -] - -[[package]] -name = "parking_lot_core" -version = "0.9.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2621685985a2ebf1c516881c026032ac7deafcda1a2c9b7850dc81e3dfcb64c1" -dependencies = [ - "cfg-if", - "libc", - "redox_syscall", - "smallvec", - "windows-link", -] - -[[package]] -name = "ppv-lite86" -version = "0.2.21" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85eae3c4ed2f50dcfe72643da4befc30deadb458a9b590d720cde2f2b1e97da9" -dependencies = [ - "zerocopy", -] - -[[package]] -name = "proc-macro2" -version = "1.0.103" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ee95bc4ef87b8d5ba32e8b7714ccc834865276eab0aed5c9958d00ec45f49e8" -dependencies = [ - "unicode-ident", -] - -[[package]] -name = "quote" -version = "1.0.42" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a338cc41d27e6cc6dce6cefc13a0729dfbb81c262b1f519331575dd80ef3067f" -dependencies = [ - "proc-macro2", -] - -[[package]] -name = "r-efi" -version = "5.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "69cdb34c158ceb288df11e18b4bd39de994f6657d83847bdffdbd7f346754b0f" - -[[package]] -name = "rand" -version = "0.9.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6db2770f06117d490610c7488547d543617b21bfa07796d7a12f6f1bd53850d1" -dependencies = [ - "rand_chacha", - "rand_core", -] - -[[package]] -name = "rand_chacha" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3022b5f1df60f26e1ffddd6c66e8aa15de382ae63b3a0c1bfc0e4d3e3f325cb" -dependencies = [ - "ppv-lite86", - "rand_core", -] - -[[package]] -name = "rand_core" -version = "0.9.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "99d9a13982dcf210057a8a78572b2217b667c3beacbf3a0d8b454f6f82837d38" -dependencies = [ - "getrandom", -] - -[[package]] -name = "redox_syscall" -version = "0.5.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed2bf2547551a7053d6fdfafda3f938979645c44812fbfcda098faae3f1a362d" -dependencies = [ - "bitflags 2.10.0", -] - -[[package]] -name = "regex" -version = "1.12.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "843bc0191f75f3e22651ae5f1e72939ab2f72a4bc30fa80a066bd66edefc24d4" -dependencies = [ - "aho-corasick", - "memchr", - "regex-automata", - "regex-syntax", -] - -[[package]] -name = "regex-automata" -version = "0.4.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5276caf25ac86c8d810222b3dbb938e512c55c6831a10f3e6ed1c93b84041f1c" -dependencies = [ - "aho-corasick", - "memchr", - "regex-syntax", -] - -[[package]] -name = "regex-syntax" -version = "0.8.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a2d987857b319362043e95f5353c0535c1f58eec5336fdfcf626430af7def58" - -[[package]] -name = "rustversion" -version = "1.0.22" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b39cdef0fa800fc44525c84ccb54a029961a8215f9619753635a9c0d2538d46d" - -[[package]] -name = "ryu" -version = "1.0.21" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62049b2877bf12821e8f9ad256ee38fdc31db7387ec2d3b3f403024de2034aea" - -[[package]] -name = "scopeguard" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" - -[[package]] -name = "serde" -version = "1.0.228" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a8e94ea7f378bd32cbbd37198a4a91436180c5bb472411e48b5ec2e2124ae9e" -dependencies = [ - "serde_core", - "serde_derive", -] - -[[package]] -name = "serde_core" -version = "1.0.228" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41d385c7d4ca58e59fc732af25c3983b67ac852c1a25000afe1175de458b67ad" -dependencies = [ - "serde_derive", -] - -[[package]] -name = "serde_derive" -version = "1.0.228" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d540f220d3187173da220f885ab66608367b6574e925011a9353e4badda91d79" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.111", -] - -[[package]] -name = "serde_json" -version = "1.0.145" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "402a6f66d8c709116cf22f558eab210f5a50187f702eb4d7e5ef38d9a7f1c79c" -dependencies = [ - "itoa", - "memchr", - "ryu", - "serde", - "serde_core", -] - -[[package]] -name = "server" -version = "0.1.0" -dependencies = [ - "unshell-lib", - "unshell-obfuscate", -] - -[[package]] -name = "sha2" -version = "0.10.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a7507d819769d01a365ab707794a4084392c824f54a7a6a7862f8c3d0892b283" -dependencies = [ - "cfg-if", - "cpufeatures", - "digest", -] - -[[package]] -name = "shlex" -version = "1.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" - -[[package]] -name = "smallvec" -version = "1.15.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67b1b7a3b5fe4f1376887184045fcf45c69e92af734b7aaddc05fb777b6fbd03" - -[[package]] -name = "static_init" -version = "1.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8bae1df58c5fea7502e8e352ec26b5579f6178e1fdb311e088580c980dee25ed" -dependencies = [ - "bitflags 1.3.2", - "cfg_aliases 0.2.1", - "libc", - "parking_lot", - "parking_lot_core", - "static_init_macro", - "winapi", -] - -[[package]] -name = "static_init_macro" -version = "1.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1389c88ddd739ec6d3f8f83343764a0e944cd23cfbf126a9796a714b0b6edd6f" -dependencies = [ - "cfg_aliases 0.1.1", - "memchr", - "proc-macro2", - "quote", - "syn 1.0.109", -] - -[[package]] -name = "syn" -version = "1.0.109" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" -dependencies = [ - "proc-macro2", - "quote", - "unicode-ident", -] - -[[package]] -name = "syn" -version = "2.0.111" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "390cc9a294ab71bdb1aa2e99d13be9c753cd2d7bd6560c77118597410c4d2e87" -dependencies = [ - "proc-macro2", - "quote", - "unicode-ident", -] - -[[package]] -name = "typenum" -version = "1.19.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "562d481066bde0658276a35467c4af00bdc6ee726305698a55b86e61d7ad82bb" - -[[package]] -name = "unicode-ident" -version = "1.0.22" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9312f7c4f6ff9069b165498234ce8be658059c6728633667c526e27dc2cf1df5" - -[[package]] -name = "unshell-crypt" -version = "0.1.0" -dependencies = [ - "aes", - "block-padding 0.4.2", - "cbc", - "getrandom", - "hex", - "hex-literal", - "regex", - "sha2", -] - -[[package]] -name = "unshell-lib" -version = "0.0.0" -dependencies = [ - "bincode", - "chrono", - "crossbeam-channel", - "libc", - "libloading", - "rand", - "serde", - "serde_json", - "unshell-obfuscate", -] - -[[package]] -name = "unshell-obfuscate" -version = "0.0.0" -dependencies = [ - "proc-macro2", - "quote", - "rand", - "static_init", - "syn 2.0.111", - "unshell-crypt", -] - -[[package]] -name = "unty" -version = "0.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d49784317cd0d1ee7ec5c716dd598ec5b4483ea832a2dced265471cc0f690ae" - -[[package]] -name = "version_check" -version = "0.9.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a" - -[[package]] -name = "virtue" -version = "0.0.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "051eb1abcf10076295e815102942cc58f9d5e3b4560e46e53c21e8ff6f3af7b1" - -[[package]] -name = "wasip2" -version = "1.0.1+wasi-0.2.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0562428422c63773dad2c345a1882263bbf4d65cf3f42e90921f787ef5ad58e7" -dependencies = [ - "wit-bindgen", -] - -[[package]] -name = "wasm-bindgen" -version = "0.2.106" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d759f433fa64a2d763d1340820e46e111a7a5ab75f993d1852d70b03dbb80fd" -dependencies = [ - "cfg-if", - "once_cell", - "rustversion", - "wasm-bindgen-macro", - "wasm-bindgen-shared", -] - -[[package]] -name = "wasm-bindgen-macro" -version = "0.2.106" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "48cb0d2638f8baedbc542ed444afc0644a29166f1595371af4fecf8ce1e7eeb3" -dependencies = [ - "quote", - "wasm-bindgen-macro-support", -] - -[[package]] -name = "wasm-bindgen-macro-support" -version = "0.2.106" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cefb59d5cd5f92d9dcf80e4683949f15ca4b511f4ac0a6e14d4e1ac60c6ecd40" -dependencies = [ - "bumpalo", - "proc-macro2", - "quote", - "syn 2.0.111", - "wasm-bindgen-shared", -] - -[[package]] -name = "wasm-bindgen-shared" -version = "0.2.106" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cbc538057e648b67f72a982e708d485b2efa771e1ac05fec311f9f63e5800db4" -dependencies = [ - "unicode-ident", -] - -[[package]] -name = "winapi" -version = "0.3.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" -dependencies = [ - "winapi-i686-pc-windows-gnu", - "winapi-x86_64-pc-windows-gnu", -] - -[[package]] -name = "winapi-i686-pc-windows-gnu" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" - -[[package]] -name = "winapi-x86_64-pc-windows-gnu" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" - -[[package]] -name = "windows-core" -version = "0.62.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b8e83a14d34d0623b51dce9581199302a221863196a1dde71a7663a4c2be9deb" -dependencies = [ - "windows-implement", - "windows-interface", - "windows-link", - "windows-result", - "windows-strings", -] - -[[package]] -name = "windows-implement" -version = "0.60.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "053e2e040ab57b9dc951b72c264860db7eb3b0200ba345b4e4c3b14f67855ddf" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.111", -] - -[[package]] -name = "windows-interface" -version = "0.59.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f316c4a2570ba26bbec722032c4099d8c8bc095efccdc15688708623367e358" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.111", -] - -[[package]] -name = "windows-link" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0805222e57f7521d6a62e36fa9163bc891acd422f971defe97d64e70d0a4fe5" - -[[package]] -name = "windows-result" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7781fa89eaf60850ac3d2da7af8e5242a5ea78d1a11c49bf2910bb5a73853eb5" -dependencies = [ - "windows-link", -] - -[[package]] -name = "windows-strings" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7837d08f69c77cf6b07689544538e017c1bfcf57e34b4c0ff58e6c2cd3b37091" -dependencies = [ - "windows-link", -] - -[[package]] -name = "wit-bindgen" -version = "0.46.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f17a85883d4e6d00e8a97c586de764dabcc06133f7f1d55dce5cdc070ad7fe59" - -[[package]] -name = "zerocopy" -version = "0.8.31" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fd74ec98b9250adb3ca554bdde269adf631549f51d8a8f8f0a10b50f1cb298c3" -dependencies = [ - "zerocopy-derive", -] - -[[package]] -name = "zerocopy-derive" -version = "0.8.31" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d8a8d209fdf45cf5138cbb5a506f6b52522a25afccc534d1475dad8e31105c6a" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.111", -] diff --git a/core-modules/server/Cargo.toml b/core-modules/server/Cargo.toml deleted file mode 100644 index 41cf995..0000000 --- a/core-modules/server/Cargo.toml +++ /dev/null @@ -1,25 +0,0 @@ -cargo-features = ["trim-paths", "panic-immediate-abort"] - -[package] -name = "server" -version = "0.1.0" -edition = "2024" - -[lib] -crate-type = ["cdylib"] - -[features] -log_debug=["unshell-lib/log_debug"] - -[dependencies] -unshell-lib = {path = "../../unshell-lib", default-featues = false} -unshell-obfuscate = {path = "../../unshell-obfuscate", default-featues = false} - -[profile.release] -strip = true # Strip symbols from the binary -opt-level = "s" # Optimize for size -lto = true -codegen-units = 1 -panic = "immediate-abort" -debug = false -trim-paths = "all" diff --git a/core-modules/server/build.sh b/core-modules/server/build.sh deleted file mode 100755 index b9d1572..0000000 --- a/core-modules/server/build.sh +++ /dev/null @@ -1,24 +0,0 @@ -OBFUSCATION_KEY=abc123abc \ -cargo build --release - -export BINARY=./target/release/libserver.so - - -declare -a headers=( - ".gnu_debuglink" # - Debug information link - ".comment" #- Compiler version info - ".shstrtab" #- Section header string table (only needed by tools like readelf) - ".note.gnu.bu" ".note.gnu.build-id" # - Build ID note - ".eh_frame" ".eh_frame_hdr" # Exception handling info (can break C++ exceptions if removed) - ".gnu.version" ".gnu.version_r" # Symbol versioning (may be needed for some shared libraries) - ".gnu.hash" # Hash table for symbol lookup optimization -) - -// TODO: Implement FAKE section header comments and information -// Shuffle order of headers?? - -for section in "${headers[@]}" -do - strip --remove-section="$section" $BINARY - echo "Removed section header $section" -done diff --git a/core-modules/server/src/lib.rs b/core-modules/server/src/lib.rs deleted file mode 100644 index 18a4764..0000000 --- a/core-modules/server/src/lib.rs +++ /dev/null @@ -1,27 +0,0 @@ -mod server_runtime; - -pub use server_runtime::ListenerRuntime; - -use unshell_lib::{ - ModuleError, ModuleRuntime, - config::{InterfaceWrapper, NamedComponent, RuntimeConfig}, -}; - -pub const COMPONENT_NAME: &'static str = "server"; - -fn get_interface() -> Option<&'static (dyn InterfaceWrapper + Sync)> { - None -} - -fn start_runtime(config: &'static RuntimeConfig) -> Result, ModuleError> { - Ok(Box::new(ListenerRuntime::new(config)?)) -} - -#[unsafe(no_mangle)] -pub const fn get_named_component() -> NamedComponent { - NamedComponent { - name: COMPONENT_NAME, - get_interface: &get_interface, - start_runtime: &start_runtime, - } -} diff --git a/core-modules/server/src/server_runtime.rs b/core-modules/server/src/server_runtime.rs deleted file mode 100644 index 7988685..0000000 --- a/core-modules/server/src/server_runtime.rs +++ /dev/null @@ -1,108 +0,0 @@ -use std::{ - net::TcpListener, - sync::{Arc, Mutex}, - thread::{self, JoinHandle}, -}; - -use unshell_lib::{config::RuntimeConfig, module::Manager, *}; - -pub struct ListenerRuntime { - config: &'static RuntimeConfig, - thread_handle: Option>, - // streams: Arc>>, - // manager: Option>>, -} - -impl ListenerRuntime { - pub fn new(config: &'static RuntimeConfig) -> Result { - Ok(Self { - config, - thread_handle: None, - // streams: Arc::new(Mutex::new(Vec::new())), - // manager: None, - }) - } - - // pub fn send(&mut self, announcement: &Announcement) -> Result<(), std::io::Error> { - // let bytes = announcement.encode(); - - // let mut streams = self.streams.lock().unwrap(); - - // for stream in streams.iter_mut() { - // stream.write_all(&u32::to_be_bytes(bytes.len() as u32))?; - // stream.write_all(&bytes)?; - // stream.flush()?; - // } - - // debug!("Announcement {:?} sent", announcement); - - // Ok(()) - // } - - // pub fn recv(&mut self) -> Result { - // let stream = &mut self.streams.lock().unwrap()[0]; - - // let mut size_buf = [0u8; 4]; - // stream.read_exact(&mut size_buf).unwrap(); - // let size = u32::from_be_bytes(size_buf); - - // let mut buf = vec![0u8; size as usize]; - - // stream.read_exact(&mut buf).unwrap(); - - // if let Some(announcement) = Announcement::decode(&buf) { - // Ok(announcement) - // } else { - // Err(ModuleError::Error("Failed to decode announcement".into())) - // } - // } -} - -impl ModuleRuntime for ListenerRuntime { - fn init(&mut self, manager: Arc>) -> Result<(), ModuleError> { - let host = match self.config.config.get("host") { - Some(host) => host, - None => { - return Err(ModuleError::Error( - "Could not find HOST in Server Runtime".into(), - )); - } - }; - - let listener = TcpListener::bind(host).unwrap(); - // let streams = Arc::new(Mutex::new(Vec::new())); - - // let streams_clone = streams.clone(); - - let thread_handle = thread::spawn(move || { - // let streams = streams_clone.clone(); - for stream in listener.incoming() { - let stream = stream.unwrap(); - debug!("New connection from {}", stream.peer_addr().unwrap()); - - let stream = network::TcpStream::new(stream); - - manager.lock().unwrap().add_connection(Box::new(stream)); - - // streams.lock().unwrap().push(stream); - } - }); - - self.thread_handle = Some(thread_handle); - - Ok(()) - } - - fn is_running(&self) -> bool { - true - } - - fn kill(self: Box) { - // if let Some(thread) - // if !self.thread_handle.is_finished() { - // // self.join_signal.store(true, Ordering::Relaxed); - // let _ = self.thread_handle.join(); - // } - // // drop(self); - } -} diff --git a/core-modules/server2/Cargo.toml b/core-modules/server2/Cargo.toml deleted file mode 100644 index c48685d..0000000 --- a/core-modules/server2/Cargo.toml +++ /dev/null @@ -1,16 +0,0 @@ -[package] -name = "server2" -edition = "2024" - -[features] -log = ["unshell/log"] -log_debug = ["unshell/log_debug"] - -# [lib] -# crate-type = ["cdylib"] - -[dependencies] -unshell.path = "../../" - -[lints] -workspace = true diff --git a/core-modules/server2/src/lib.rs b/core-modules/server2/src/lib.rs deleted file mode 100644 index 12d8692..0000000 --- a/core-modules/server2/src/lib.rs +++ /dev/null @@ -1,5 +0,0 @@ -use unshell::info; - -pub fn log_test_fn() { - info!("Testttttttt"); -} diff --git a/src/announcement.rs b/src/announcement.rs deleted file mode 100644 index dea6210..0000000 --- a/src/announcement.rs +++ /dev/null @@ -1,28 +0,0 @@ -// use bincode::{Decode, Encode}; - -/// Mostly temporary server message type -// #[derive(Clone, Debug, Encode, Decode)] -pub enum Announcement { - TestAnnouncement(String), - // GetRuntimes, - // GetRuntimesAck(usize), - - // StartRuntime(RuntimeConfig), - // StartRuntimeAck(bool), -} - -// const BINCODE_CONFIG: bincode::config::Configuration = bincode::config::standard(); - -// impl Announcement { -// pub fn encode(&self) -> Vec { -// bincode::encode_to_vec(self, BINCODE_CONFIG).unwrap() -// } - -// pub fn decode(bytes: &[u8]) -> Option { -// if let Ok((decoded, _)) = bincode::decode_from_slice(&bytes[..], BINCODE_CONFIG) { -// Some(decoded) -// } else { -// None -// } -// } -// } diff --git a/src/config/config_struct.rs b/src/config/config_struct.rs deleted file mode 100644 index 5194620..0000000 --- a/src/config/config_struct.rs +++ /dev/null @@ -1,56 +0,0 @@ -use serde_json::{Value, json}; - -use crate::{ - ModuleError, Result, - config::{ConfigStructField, InterfaceData, InterfaceStruct, TreeMessage}, - warn, -}; - -pub type ConfigStructKeys = Vec; -pub type ConfigStructValues = Vec; - -pub struct Config { - keys: ConfigStructKeys, - values: ConfigStructValues, -} - -impl Config { - pub fn new(keys: ConfigStructKeys) -> Self { - let values = keys - .iter() - .map(|key| match key { - ConfigStructField::Header(_) => Value::Null, - ConfigStructField::Text(_) => Value::Null, - ConfigStructField::String { default, .. } => json!(default), - ConfigStructField::Integer { default, .. } => json!(default), - }) - .collect(); - - Self { keys, values } - } - - pub fn get(&mut self, message: TreeMessage) -> Result { - match message { - TreeMessage::State(InterfaceData::ConfigStruct(values)) => { - self.values = values; - Ok(TreeMessage::Success) - } - - // TreeMessage::RequestStruct => Ok(TreeMessage::Interface( - // InterfaceStruct::ConfigStruct(self.keys.clone()), - // )), - TreeMessage::RequestState => Ok(TreeMessage::State(InterfaceData::ConfigStruct( - self.values.clone(), - ))), - TreeMessage::RequestStructAndValue => Ok(TreeMessage::InterfaceAndValue( - InterfaceStruct::ConfigStruct(self.keys.clone()), - InterfaceData::ConfigStruct(self.values.clone()), - )), - - _ => { - warn!("Tree got invalid message"); - Err(ModuleError::Error("Invalid Request".into())) - } - } - } -} diff --git a/src/config/config_struct_list.rs b/src/config/config_struct_list.rs deleted file mode 100644 index af30830..0000000 --- a/src/config/config_struct_list.rs +++ /dev/null @@ -1,32 +0,0 @@ -use serde_json::Value; - -use crate::config::ConfigStructField; - -pub type ConfigStructListKeys = Vec; -pub type ConfigStructListValues = Vec>; - -pub struct ConfigStructList { - keys: ConfigStructListKeys, - values: ConfigStructListValues, -} - -impl ConfigStructList { - pub fn new(keys: ConfigStructListKeys) -> Self { - // let values = keys - // .iter() - // .map(|key| match key { - // ConfigStructField::Header(_) => Value::Null, - // ConfigStructField::Text(_) => Value::Null, - // ConfigStructField::String { default, .. } => json!(default), - // ConfigStructField::Integer { default, .. } => json!(default), - // }) - // .collect(); - - Self { - keys, - values: Vec::new(), - } - } -} - -// impl Tree for ConfigStructList {} diff --git a/src/config/mod.rs b/src/config/mod.rs deleted file mode 100644 index 9b49419..0000000 --- a/src/config/mod.rs +++ /dev/null @@ -1,41 +0,0 @@ -pub mod config_struct; -// pub mod config_struct_list; -mod tree; - -pub use tree::{InterfaceData, InterfaceStruct, Tree, TreeMessage}; - -use std::collections::HashMap; - -#[derive(Debug, Clone)] -pub struct RuntimeConfig { - pub parent_component: String, - pub name: String, - pub config: HashMap, -} - -#[derive(Debug, Clone, serde::Deserialize, serde::Serialize)] -pub enum ConfigStructField { - Header(String), - Text(String), - String { - // Default value of string edit in struct - #[serde(default)] - default: String, - max_length: Option, - // Display string edit as password - #[serde(default)] - protected: bool, - }, - Integer { - // Default value of integer in struct - #[serde(default)] - default: i32, - min: Option, - max: Option, - }, - // Checkbox - // Dropdown - // Collapsing header - // Slider - // ... -} diff --git a/src/config/tree.rs b/src/config/tree.rs deleted file mode 100644 index a6902a3..0000000 --- a/src/config/tree.rs +++ /dev/null @@ -1,75 +0,0 @@ -use serde::{Deserialize, Serialize}; - -use crate::{ModuleError, Result, config::config_struct}; - -pub trait Tree { - fn is_folder() -> bool { - false - } - - fn get_children_string(&self) -> Vec { - unimplemented!(); - } - - fn select_child(&mut self, child: &str, _message: TreeMessage) -> Result; - - fn get_value(&self, _message: TreeMessage) -> TreeMessage { - unimplemented!() - } - - fn get_path(&mut self, elements: &mut Vec<&str>, message: TreeMessage) -> Result { - if elements.is_empty() { - return if Self::is_folder() { - Ok(TreeMessage::Folder(self.get_children_string())) - } else { - Ok(self.get_value(message)) - }; - } - - let child = elements.remove(0); - - if Self::is_folder() { - self.select_child(child, message) - } else { - Err(ModuleError::TreeMessageError( - "This is a folder, not a file".into(), - )) - } - } - - fn get(&mut self, path: &str, message: TreeMessage) -> Result { - let mut path = if path.is_empty() { - Vec::new() - } else { - path.split("/").collect::>() - }; - - self.get_path(&mut path, message) - } -} - -#[derive(Clone, Debug, Serialize, Deserialize)] -pub enum TreeMessage { - RequestState, - RequestStruct, - RequestStructAndValue, - - State(InterfaceData), - // Interface(InterfaceStruct), - InterfaceAndValue(InterfaceStruct, InterfaceData), - - Success, - Failure, - - Folder(Vec), -} - -#[derive(Clone, Debug, Serialize, Deserialize)] -pub enum InterfaceStruct { - ConfigStruct(config_struct::ConfigStructKeys), -} - -#[derive(Clone, Debug, Serialize, Deserialize)] -pub enum InterfaceData { - ConfigStruct(config_struct::ConfigStructValues), -} diff --git a/src/lib.rs b/src/lib.rs index 27bdae7..6382e2d 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1,16 +1,11 @@ #![no_main] -pub mod config; mod error; pub mod logger; pub mod tree; -mod announcement; - pub use error::{ModuleError, Result}; -pub use announcement::Announcement; - // Re-exports pub use serde_json::{Value, json}; pub use ush_obfuscate as obfuscate; diff --git a/ush-gui/Cargo.toml b/ush-gui/Cargo.toml deleted file mode 100644 index 62344a6..0000000 --- a/ush-gui/Cargo.toml +++ /dev/null @@ -1,47 +0,0 @@ -[package] -name = "ush-gui" -version.workspace = true -edition.workspace = true -authors.workspace = true -include.workspace = true - -[lib] -crate-type = ["cdylib"] - -[package.metadata.docs.rs] -all-features = true -targets = [ - # "x86_64-unknown-linux-gnu", - "wasm32-unknown-unknown" -] - -[dependencies] -unshell = { path="../" } - -# log = "0.4.27" -chrono = { workspace = true } -serde = { workspace = true } -serde_json = { workspace = true } - -reqwest = {version = "0.12.26", features=["json"]} -log = "0.4.29" - -# Stuff for app functionality -egui = "0.33.0" -eframe = { version = "0.33.0", default-features = false, features = [ - # "accesskit", # Make egui compatible with screen readers. NOTE: adds a lot of dependencies. - "default_fonts", # Embed the default egui fonts. - "glow", # Use the glow rendering backend. Alternative: "wgpu". - "persistence", # Enable restoring app state when restarting the app. - "wayland", # To support Linux (and CI) - "x11", # To support older Linux distributions (restores one of the default features) -] } -egui_extras = "0.33.2" -egui_tiles = "0.14.0" -egui-async = "0.2.6" - - -# Web Stuff -wasm-bindgen-futures = "0.4.50" -wasm-bindgen = "0.2.108" -web-sys = { version = "0.3.85", features = ["Headers", "Request", "RequestInit", "RequestMode", "Response", "Window"] } diff --git a/ush-gui/Trunk.toml b/ush-gui/Trunk.toml deleted file mode 100644 index ed8064e..0000000 --- a/ush-gui/Trunk.toml +++ /dev/null @@ -1,20 +0,0 @@ -[build] -filehash = false - -# # Proxy /api/* to backend -# [[proxy]] -# backend = "http://localhost:8081" -# rewrite = "/api/" - -# # Proxy /auth/* to backend -# [[proxy]] -# backend = "http://localhost:8081" -# rewrite = "/auth/" - -[[proxy]] -backend = "http://localhost:3000/api" # Address to proxy requests to -# ws = false # Use WebSocket for this proxy -# insecure = true # Disable certificate validation -# no_system_proxy = false # Disable system proxy -# rewrite = "" # Strip the given prefix off paths -# no_redirect = false # Disable following redirects of proxy responses diff --git a/ush-gui/assets/favicon.ico b/ush-gui/assets/favicon.ico deleted file mode 100644 index 61ad031aa5b8aadf968a2b864649c3bb84b91735..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 15406 zcmeHOTS%2z6#ku=ri~V2rUhCUy zul?_}*Iq}Ge57xsMT;aZO;YxElJv7ANhZ^$``{lX=}&$Z8anqrNRqmKlB8g+!%euw zr{`RJ@nCr{}7`SYslo9iGvJe)p!_&^sfT%aRIj?AMq zYu4E185R~M+PAj0((T)~1wjYkxnaWwyX}ExaBz^$oH?V^J$(2uO-xKsU|^u~%p9}j zb#`_(O-@cyd3iYhqMwiQ$ zE&J%GjJY|up!xg7kAjAW_|BM^Vwily6<>V$_YLFyjr%*v^q-@BR@)9T=42Hz93RM5 z+g9&-jN@0PDZTls`}gms?(S}}?qTh-B&=tfHf=Hl!_lKh>D{|`ip*E9UQv5{JGHd52uzUu z{{4Fj4Gq;@er#+kO;1k?+2iBml#`S5*}9FjG$|=bciFJ9YuBy`+324ZpGyz>39vPGDmw)&*y-Oimm75SF) z&Dy=5b{H8MsmO0=Xb`p!`?sX4SFbAdfLTi)?bUt${JG$L@7_JDe9xXeE9zj5z+bn= zQ_K6x%1Xg|c6OGwZQJ%4?-eUnP)|>fr~@0(!dp#UjKS;IuLXbXBerbWqR7Dhp{lA% zyn{WImX<2-)bLhY=g^@;V*dsi(8K-v_o=?VUhG3;JH*InNhwf%9l9=?Zr_Uxh4r%zK^Ss4`+6i`e|jNx(}#p`Y789tq}#|irn-v7-w zTdpjRnnS5-=NhE)N z|3yoeE=_0Mb+HcrVKRKYwAuqOF}}aK>}I?NeSLiqZkGJ~{C?o)mB6i)r>p8S){l(& zcl2S&k|hUl?g$^~YO1NWoTQ68>t$9?E#@)*0Z)EBTbx!qi~#A)r`ld)UtllQsT zC-mCD*KGqh_r%#HVw;F3AZCR!E-sFuqoc)M+8xga*RNkM_T1O6U#G6FE*c#jrJ0!- z5tG3A^2?VmskgV6nwpvj@xs*9R9d-mrCaRJ_wLeVj84t*eIhj|I?u!n(x0ouHIvr92)8K)aJZYXwx^QVf63b)Ohu_R*Hy-aQe6* z=g1sC>>p==ju5`Hdg@jUFRWSS_!n|rTwLsQ{P11OG2=Vh-`}r_%;!CLAV)xr&h)Ia zapT5$_(w)Y2+!87TW6Q<+_^Kat(IItz50MP)ZA}?&#+_14!e59cekyrO~H?KPtP-9 zE&W5jrEEj+lW}fk&!5286Mq;$bJ3c;M1RlnU8z={$+8unb4^I9u!Z~d=3Hs>9G@A!LdKpz{x`5mACYW^>myXc>>|HXaq z*z;?~-@*73nLO?c8<;uge%6kDFuC2CJTL(pW9&rE T$>PO}zeoOz_vh8XLNxF{TPS{( diff --git a/ush-gui/assets/manifest.json b/ush-gui/assets/manifest.json deleted file mode 100644 index ee43ad5..0000000 --- a/ush-gui/assets/manifest.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "name": "egui Template PWA", - "short_name": "egui-template-pwa", - "icons": [], - "lang": "en-US", - "id": "/index.html", - "start_url": "./index.html", - "display": "standalone", - "background_color": "white", - "theme_color": "white" -} diff --git a/ush-gui/assets/sw.js b/ush-gui/assets/sw.js deleted file mode 100644 index 09b39e7..0000000 --- a/ush-gui/assets/sw.js +++ /dev/null @@ -1,77 +0,0 @@ -var cacheName = "egui-template-pwa"; -var filesToCache = [ - "./", - "./index.html", - "./eframe_template.js", - "./eframe_template_bg.wasm", -]; - -/* Start the service worker and cache all of the app's content */ -self.addEventListener("install", function (e) { - e.waitUntil( - caches.open(cacheName).then(function (cache) { - return cache.addAll(filesToCache); - }), - ); -}); - -/* Serve cached content when offline */ -self.addEventListener("fetch", function (e) { - e.respondWith( - caches.match(e.request).then(function (response) { - return response || fetch(e.request); - }), - ); -}); - -// export function httpGet(theUrl) { -// var xmlHttp = new XMLHttpRequest(); -// xmlHttp.open("GET", theUrl, false); // false for synchronous request -// xmlHttp.send(null); -// return xmlHttp.responseText; -// } - -function startHttpRequest(callback) { - var xmlHttp = new XMLHttpRequest(); - xmlHttp.onreadystatechange = function () { - if (xmlHttp.readyState !== 4) return; - - if (xmlHttp.status == 200) callback(true, xmlHttp.responseText); - else if (xmlHttp.status == 401) callback(false, "Unauthorized"); - else if (xmlHttp.status == 500) callback(false, "Internal Server Error"); - else callback(false, xmlHttp.responseText); - }; - return xmlHttp; -} - -export function httpGet(theUrl, callback) { - var xmlHttp = startHttpRequest(callback); - xmlHttp.open("GET", theUrl, true); // true for asynchronous - xmlHttp.setRequestHeader("Content-Type", "application/json"); - xmlHttp.send(null); -} - -export function httpPost(url, body, callback) { - var xmlHttp = startHttpRequest(callback); - xmlHttp.open("POST", url, true); - xmlHttp.setRequestHeader("Content-Type", "application/json"); - // var data = JSON.stringify({ email: "[email protected]", password: "101010" }); - xmlHttp.send(body); -} - -export function httpGetAuth(theUrl, auth, callback) { - var xmlHttp = startHttpRequest(callback); - xmlHttp.open("GET", theUrl, true); // true for asynchronous - xmlHttp.setRequestHeader("Content-Type", "application/json"); - xmlHttp.setRequestHeader("authorization", auth); - xmlHttp.send(null); -} - -export function httpPostAuth(url, auth, body, callback) { - var xmlHttp = startHttpRequest(callback); - xmlHttp.open("POST", url, true); - xmlHttp.setRequestHeader("Content-Type", "application/json"); - xmlHttp.setRequestHeader("authorization", auth); - // var data = JSON.stringify({ email: "[email protected]", password: "101010" }); - xmlHttp.send(body); -} diff --git a/ush-gui/index.html b/ush-gui/index.html deleted file mode 100644 index 5a96fca..0000000 --- a/ush-gui/index.html +++ /dev/null @@ -1,178 +0,0 @@ - - - - - - - - - - eframe template - - - - - - - - - - - - - - - - - - - - - - - - - - -
- -

Loading…

-
-
- - - - - - - - diff --git a/ush-gui/src/app/app.rs b/ush-gui/src/app/app.rs deleted file mode 100644 index 341e2fb..0000000 --- a/ush-gui/src/app/app.rs +++ /dev/null @@ -1,94 +0,0 @@ -use egui::Frame; -use egui_tiles::Tree; - -use crate::{ - FORCE_REDRAW_DELAY, - app::{AppState, windows::WindowWrapper}, -}; - -/// We derive Deserialize/Serialize so we can persist app state on shutdown. -#[derive(serde::Deserialize, serde::Serialize)] -#[serde(default)] // if we add new fields, give them default values when deserializing old state -pub struct TemplateApp { - // tab: Tab, - state: AppState, - tree: Tree, -} - -impl Default for TemplateApp { - fn default() -> Self { - Self { - state: AppState::default(), - tree: egui_tiles::Tree::new_horizontal("tree_root", Vec::new()), - } - } -} - -impl TemplateApp { - /// Called once before the first frame. - pub fn new(cc: &eframe::CreationContext<'_>) -> Self { - // This is also where you can customize the look and feel of egui using - // `cc.egui_ctx.set_visuals` and `cc.egui_ctx.set_fonts`. - - // Load previous app state (if any). - // Note that you must enable the `persistence` feature for this to work. - if let Some(storage) = cc.storage { - eframe::get_value(storage, eframe::APP_KEY).unwrap_or_default() - } else { - Default::default() - } - } -} - -impl eframe::App for TemplateApp { - /// Called by the framework to save state before shutdown. - fn save(&mut self, storage: &mut dyn eframe::Storage) { - eframe::set_value(storage, eframe::APP_KEY, self); - } - - /// Called each time the UI needs repainting, which may be many times per second. - fn update(&mut self, ctx: &egui::Context, _frame: &mut eframe::Frame) { - ctx.plugin_or_default::(); - - if !self.state.auth.logged_in() { - egui::CentralPanel::default() - .frame(Frame::central_panel(&ctx.style()).inner_margin(0)) - .show(ctx, |ui| self.state.auth.update(ui)); - } else { - egui::TopBottomPanel::top("tab_panel").show(ctx, |ui| { - // The top panel is often a good place for a menu bar: - - egui::MenuBar::new().ui(ui, |ui| { - ui.menu_button("File", |ui| { - ui.label("File"); - }); - - ui.menu_button("View", |ui| { - ui.label("View"); - - self.state.labels(&mut self.tree, ui); - }); - - ui.with_layout(egui::Layout::right_to_left(egui::Align::Center), |ui| { - egui::widgets::global_theme_preference_switch(ui); - }); - - // ui.style - }); - }); - - egui::TopBottomPanel::bottom("tab_panel").show(ctx, |ui| { - ui.with_layout(egui::Layout::right_to_left(egui::Align::Center), |ui| { - ui.label(format!("UnShell UI {}", env!("CARGO_PKG_VERSION"))); - egui::warn_if_debug_build(ui); - }); - }); - - egui::CentralPanel::default() - .frame(Frame::central_panel(&ctx.style()).inner_margin(0)) - .show(ctx, |ui| self.tree.ui(&mut self.state, ui)); - } - - ctx.request_repaint_after(FORCE_REDRAW_DELAY); - } -} diff --git a/ush-gui/src/app/mod.rs b/ush-gui/src/app/mod.rs deleted file mode 100644 index 98db3b7..0000000 --- a/ush-gui/src/app/mod.rs +++ /dev/null @@ -1,135 +0,0 @@ -mod app; -mod windows; - -use std::collections::HashSet; - -use crate::{ - app::windows::WindowWrapper, auth::Auth, config::Config, flowchart::FlowChart, - interface::InterfaceWindow, log_viewer::LogViewer, payload_config::PayloadConfig, -}; -pub use app::TemplateApp; -use egui_tiles::{TileId, Tree}; - -#[derive(Default, serde::Deserialize, serde::Serialize)] -pub struct AppState { - pub auth: Auth, - - pub open_windows: HashSet, - - pub flowchart: FlowChart, - pub config: Config, - pub payload_config: PayloadConfig, - pub log_viewer: LogViewer, - pub interface: InterfaceWindow, -} - -impl AppState { - pub fn labels(&mut self, tree: &mut Tree, ui: &mut egui::Ui) { - for (_, (key, name)) in (vec![ - (AppWindow::Flowchart, "Flowchart"), - (AppWindow::PayloadConfig, "Payload Config"), - (AppWindow::Config, "Config"), - (AppWindow::LogViewer, "Log Viewer"), - (AppWindow::InterfaceWindow, "Tree Test"), - ]) - .iter() - .enumerate() - { - let enabled = self.open_windows.contains(&key); - - if ui.selectable_label(enabled, *name).clicked() { - if enabled { - self.close_window(tree, key); - } else { - self.open_window(tree, key, name); - } - } - } - } - - pub fn close_window(&mut self, tree: &mut Tree, key: &AppWindow) { - match Self::find_pane_id(*key, tree) { - Some(tid) => { - let tid = tid.clone(); - tree.remove_recursively(tid); - tree.tiles.remove(tid); - self.open_windows.remove(&key); - } - None => unreachable!(), - } - } - - pub fn open_window(&mut self, tree: &mut Tree, key: &AppWindow, name: &str) { - let tid = tree.tiles.insert_pane(WindowWrapper { - name: name.to_string(), - window: *key, - }); - - match self.open_windows.len() { - 0 => { - tree.root = Some(tid); - } - 1 => { - let old_root = tree.root.unwrap(); - let tab_id = tree.tiles.insert_tab_tile(vec![old_root, tid]); - tree.root = Some(tab_id); - tree.make_active(|t, _| t == tid); - } - _ => { - let root = tree.root().unwrap(); - let n = tree.tiles.get_container(root).unwrap().num_children(); - tree.move_tile_to_container(tid, tree.root.unwrap().clone(), n, true); - } - } - self.open_windows.insert(key.clone()); - } - - fn find_pane_id(window_type: AppWindow, tree: &Tree) -> Option<&TileId> { - for (tid, window) in tree.tiles.iter() { - match window { - egui_tiles::Tile::Pane(pane) => { - if pane.window == window_type { - return Some(tid); - } - } - egui_tiles::Tile::Container(_) => {} - } - } - None - } -} - -#[derive(Clone, Copy, serde::Deserialize, serde::Serialize, PartialEq, Eq, Hash)] -pub enum AppWindow { - Flowchart, - Config, - PayloadConfig, - LogViewer, - InterfaceWindow, -} - -impl AppWindow { - fn update(&self, state: &mut AppState, ui: &mut egui::Ui) { - match self { - AppWindow::Flowchart => state.flowchart.paint(ui), - AppWindow::Config => state.config.update(&mut state.auth, ui), - AppWindow::PayloadConfig => state.payload_config.update(ui), - AppWindow::LogViewer => state.log_viewer.update(&mut state.auth, ui), - AppWindow::InterfaceWindow => state.interface.update(&mut state.auth, ui), - } - } - - fn render_title_buttons(&self, state: &mut AppState, ui: &mut egui::Ui) { - match self { - AppWindow::Flowchart => { - state.flowchart.titlebar_buttons(ui); - } - AppWindow::Config => { - state.config.titlebar_buttons(ui); - } - _ => { - ui.label(""); - } - } - } -} diff --git a/ush-gui/src/app/windows.rs b/ush-gui/src/app/windows.rs deleted file mode 100644 index 7f9a8da..0000000 --- a/ush-gui/src/app/windows.rs +++ /dev/null @@ -1,91 +0,0 @@ -use egui::Rect; - -use crate::app::{AppState, AppWindow}; - -#[derive(serde::Deserialize, serde::Serialize)] -pub struct WindowWrapper { - pub name: String, - pub window: AppWindow, -} - -impl egui_tiles::Behavior for AppState { - fn tab_title_for_pane(&mut self, pane: &WindowWrapper) -> egui::WidgetText { - format!("{}", pane.name).into() - } - - fn pane_ui( - &mut self, - ui: &mut egui::Ui, - _tile_id: egui_tiles::TileId, - pane: &mut WindowWrapper, - ) -> egui_tiles::UiResponse { - let mut ret = egui_tiles::UiResponse::None; - - let mut rect = Rect::NOTHING; - - ui.horizontal(|ui| { - rect = ui.max_rect(); - - let bg_color = ui.style().visuals.extreme_bg_color; - - ui.painter().rect_filled(rect, 0.0, bg_color); - - ui.vertical_centered(|ui| { - ui.label(&pane.name); - }); - }); - - let mut open_space = Rect::NOTHING; - - #[allow(deprecated)] - ui.allocate_ui_at_rect(rect, |ui| { - ui.horizontal(|ui| { - pane.window.render_title_buttons(self, ui); - open_space = ui.available_rect_before_wrap(); - }) - }); - - let drag_sense = ui.interact( - open_space, - ui.id().with(&format!("Pane_{}_sense", pane.name)), - egui::Sense::drag(), - ); - - if drag_sense.drag_started() { - ret = egui_tiles::UiResponse::DragStarted; - } - if drag_sense.hovered() { - ui.ctx().set_cursor_icon(egui::CursorIcon::Grab); - } - - pane.window.update(self, ui); - - ret - } - - fn is_tab_closable( - &self, - tiles: &egui_tiles::Tiles, - tile_id: egui_tiles::TileId, - ) -> bool { - match tiles.get(tile_id).unwrap() { - egui_tiles::Tile::Pane(_) => true, - egui_tiles::Tile::Container(_) => false, - } - } - - fn on_tab_close( - &mut self, - tiles: &mut egui_tiles::Tiles, - tile_id: egui_tiles::TileId, - ) -> bool { - match tiles.get(tile_id).unwrap() { - egui_tiles::Tile::Pane(pane) => self.open_windows.remove(&pane.window), - egui_tiles::Tile::Container(_) => false, - } - } - - fn tab_bar_color(&self, visuals: &egui::Visuals) -> egui::Color32 { - visuals.panel_fill // same as the tab contents - } -} diff --git a/ush-gui/src/auth/js_poll.rs b/ush-gui/src/auth/js_poll.rs deleted file mode 100644 index f86999a..0000000 --- a/ush-gui/src/auth/js_poll.rs +++ /dev/null @@ -1,108 +0,0 @@ -use serde::de::DeserializeOwned; -use std::cell::RefCell; -use std::rc::Rc; -use wasm_bindgen::JsCast; -use wasm_bindgen::prelude::*; -use web_sys::js_sys::Promise; - -pub struct PromiseWrapper { - state: Rc>>, -} - -enum PromiseState { - Pending, - Resolved(T), - Rejected(String), -} - -impl PromiseWrapper -where - T: DeserializeOwned, -{ - /// Create a new PromiseWrapper from a JavaScript Promise - /// The promise should resolve to a Response object (from fetch) - pub fn new(promise: Promise) -> Self { - let state = Rc::new(RefCell::new(PromiseState::Pending)); - let state_clone = state.clone(); - let state_clone2 = state.clone(); - - // Success callback - let success = Closure::once(move |value: JsValue| { - if let Ok(response) = value.dyn_into::() { - if let Ok(json_promise) = response.json() { - let state_inner = state_clone.clone(); - - let json_success = Closure::once(move |json_value: JsValue| { - *state_inner.borrow_mut() = if let Some(body) = json_value.as_string() { - match serde_json::from_str(&body) { - Ok(data) => PromiseState::Resolved(data), - Err(e) => PromiseState::Rejected(format!("{:?}", e)), - } - } else { - PromiseState::Rejected(format!("Response was not a string")) - }; - - match serde_wasm_bindgen::from_value::(json_value) { - Ok(data) => *state_inner.borrow_mut() = PromiseState::Resolved(data), - Err(e) => { - *state_inner.borrow_mut() = - PromiseState::Rejected(format!("{:?}", e)) - } - } - }); - - let _ = json_promise.then(&json_success); - json_success.forget(); - } - } - }); - - // Error callback - let error = Closure::once(move |err: JsValue| { - *state_clone2.borrow_mut() = PromiseState::Rejected( - err.as_string() - .unwrap_or_else(|| "Unknown error".to_string()), - ); - }); - - let _ = promise.then2(&success, &error); - success.forget(); - error.forget(); - - Self { state } - } - - /// Poll the promise to check if it has completed - /// Returns Some(T) if resolved successfully, None if still pending or rejected - /// This is a lightweight check that's safe to call every frame - #[inline] - pub fn poll(&self) -> Option - where - T: Clone, - { - match &*self.state.borrow() { - PromiseState::Resolved(value) => Some(value.clone()), - _ => None, - } - } - - /// Check if the promise is still pending (lightweight) - #[inline] - pub fn is_pending(&self) -> bool { - matches!(&*self.state.borrow(), PromiseState::Pending) - } - - /// Check if the promise was rejected (lightweight) - #[inline] - pub fn is_rejected(&self) -> bool { - matches!(&*self.state.borrow(), PromiseState::Rejected(_)) - } - - /// Get the error message if rejected - pub fn error(&self) -> Option { - match &*self.state.borrow() { - PromiseState::Rejected(err) => Some(err.clone()), - _ => None, - } - } -} diff --git a/ush-gui/src/auth/mod.rs b/ush-gui/src/auth/mod.rs deleted file mode 100644 index 49375a1..0000000 --- a/ush-gui/src/auth/mod.rs +++ /dev/null @@ -1,222 +0,0 @@ -use egui::{Align2, Area, Color32, Frame, Order, Sense, UiKind, Vec2, mutex::Mutex}; -use serde::{Serialize, de::DeserializeOwned}; -use serde_json::json; -use std::sync::Arc; -use wasm_bindgen::prelude::Closure; - -use unshell::Result; - -#[derive(serde::Deserialize, serde::Serialize)] -pub struct Auth { - // Auth Stuff - token: Option, - #[serde(skip)] - auth_state: Arc>, - - // UI Stuff - username: String, - #[serde(skip)] - password: String, - show_password: bool, -} - -#[derive(Clone, Debug, serde::Deserialize, serde::Serialize, PartialEq, Eq)] -struct Token { - expiration: u128, - token: String, -} - -#[derive(Debug, PartialEq, Eq)] -enum AuthState { - Unset, - NotLoggedIn, - RequestSent, - Authorised(Token), - Error(String), -} - -impl Default for AuthState { - fn default() -> Self { - Self::Unset - } -} - -impl Auth { - /// Refresh the authentication state - pub fn logged_in(&mut self) -> bool { - match (self.token.is_some(), &*self.auth_state.lock()) { - // The client is actually authorized - (true, AuthState::Authorised(_)) => true, - - // If the user has just reloaded the session, - // the AuthState is not automatically set by any other process - (true, AuthState::Unset) => true, - - // If the authentication state has been updated to unauthorized, delete the token - (true, _) => { - self.token = None; - false - } - - // If the authentication state has been updated to authorized, set the token - (false, AuthState::Authorised(token)) => { - self.token = Some(token.clone()); - - // Also clear the password because it is bad to store it - self.password.clear(); - - true - } - - // The client is actually unauthorized - (false, _) => false, - } - } - - pub fn update(&mut self, ui: &mut egui::Ui) { - Area::new("Auth".into()) - .kind(UiKind::Modal) - .sense(Sense::hover()) - .anchor(Align2::CENTER_CENTER, Vec2::ZERO) - .order(Order::Foreground) - .interactable(true) - .show(ui.ctx(), |ui| { - Frame::popup(ui.style()).show(ui, |ui| { - ui.heading("UnShell Login"); - - ui.horizontal(|ui| { - ui.label("Username"); - ui.text_edit_singleline(&mut self.username); - }); - - ui.horizontal(|ui| { - ui.label("Password"); - let _ = ui.add( - // [ui.available_width(), 24.], - egui::TextEdit::singleline(&mut self.password) - .password(!self.show_password), - ); - - self.show_password = ui.button("Show").is_pointer_button_down_on(); - - // ui.toggle_value(&mut self.show_password, "Show"); - }); - - ui.horizontal(|ui| { - let (show_spinner, err_text) = match *self.auth_state.lock() { - AuthState::Error(ref e) => { - // self.login_button(ui); - (false, e.clone()) - } - AuthState::RequestSent => (true, "".into()), - _ => (false, "".into()), - }; - - if !show_spinner { - if ui.button("Login").clicked() { - let state = self.auth_state.clone(); - - crate::httpPost( - "/api/auth", - &json!({ - "username": self.username.clone(), - "password": self.password.clone() - }) - .to_string(), - Closure::once_into_js(move |ok: bool, response: String| { - *(state.lock()) = if ok { - if let Ok(token) = - serde_json::from_str::(&response) - { - AuthState::Authorised(token) - } else { - AuthState::Error("Malformed Response".into()) - } - } else { - AuthState::Error(response) - } - }), - ); - - *(self.auth_state.lock()) = AuthState::RequestSent; - } - } else { - ui.spinner(); - } - - ui.colored_label(Color32::RED, err_text); - }); - }); - }); - // }); - // }); - } - - pub fn get(&self, path: &str, ret: F) -> Result<()> - where - F: FnOnce(R) + 'static, - R: DeserializeOwned, - { - if let Some(ref token) = self.token { - let state = self.auth_state.clone(); - crate::httpGetAuth( - path, - format!("Bearer {}", token.token), - Closure::once_into_js(move |ok: bool, response: String| { - if ok { - if let Ok(value) = serde_json::from_str::(&response) { - ret(value) - } else { - *(state.lock()) = AuthState::Error("Malformed Response".into()); - } - } else { - *(state.lock()) = AuthState::Error(response); - } - }), - ); - } - - Ok(()) - } - - pub fn post(&self, path: &str, data: &T, ret: F) -> Result<()> - where - R: DeserializeOwned, - T: Serialize, - F: FnOnce(R) + 'static, - { - if let Some(ref token) = self.token { - let state = self.auth_state.clone(); - crate::httpPostAuth( - path, - format!("Bearer {}", token.token), - &serde_json::to_string(data)?, - Closure::once_into_js(move |ok: bool, response: String| { - if ok { - if let Ok(value) = serde_json::from_str::(&response) { - ret(value) - } else { - *(state.lock()) = AuthState::Error("Malformed Response".into()); - } - } else { - *(state.lock()) = AuthState::Error(response); - } - }), - ); - } - - Ok(()) - } -} - -impl Default for Auth { - fn default() -> Self { - Self { - token: Default::default(), - auth_state: Arc::new(Mutex::new(AuthState::NotLoggedIn)), - username: Default::default(), - password: Default::default(), - show_password: Default::default(), - } - } -} diff --git a/ush-gui/src/auth/webreq.rs b/ush-gui/src/auth/webreq.rs deleted file mode 100644 index 96a8c1f..0000000 --- a/ush-gui/src/auth/webreq.rs +++ /dev/null @@ -1,113 +0,0 @@ -impl Auth { - // pub fn get_test(url: String) -> Promise { - // let fut = Self::get_async(&url); - - // // wasm_bindgen_futures::(fut) - // } - - // pub fn get_async(&self, url: &str) -> PromiseWrapper - // where - // // F: FnOnce(R) + 'static, - // R: DeserializeOwned + 'static, - // { - // let token = self.token.as_ref().unwrap(); - - // let opts = RequestInit::new(); - // opts.set_method("GET"); - - // let request = Request::new_with_str_and_init(url, &opts).unwrap(); - - // let headers = request.headers(); - - // headers.set("content-type", "application/json").unwrap(); - - // headers - // .set("Authorization", &format!("Bearer {}", token.token)) - // .unwrap(); - - // let window = web_sys::window().unwrap(); - // let promise = window.fetch_with_request(&request); - - // // wasm_bindgen_futures::spawn_local(async move { - // // let resp_value = JsFuture::from(window.fetch_with_request(&request)) - // // .await - // // .unwrap(); - - // // // `resp_value` is a `Response` object. - // // assert!(resp_value.is_instance_of::()); - // // let resp: Response = resp_value.dyn_into().unwrap(); - - // // // Convert this other `Promise` into a rust `Future`. - // // if let Ok(json) = resp.json() { - // // if let Ok(json) = JsFuture::from(json).await { - // // crate::log(&format!("{json:?}")); - // // // let json = ; - // // } - // // } - - // // // crate::log(text); - // // // Any follow-up work here - // // }); - - // PromiseWrapper::new(promise) - - // // Ok(()) - // } - - // pub fn get_async_callback(&self, url: &str, callback: F) -> Result<()> - // where - // F: FnOnce(R) + 'static, - // R: DeserializeOwned + 'static, - // { - // if self.token.is_none() { - // return Err(ModuleError::Error("Not authenticated".into())); - // } - - // let token = self.token.clone().unwrap(); - - // let url = url.to_string(); - - // let state_clone = self.auth_state.clone(); - - // wasm_bindgen_futures::future_to_promise(async move { - // let result = Self::get_async(&url, &token).await; - - // match result { - // Ok(result) => callback(result), - // Err(err) => (*state_clone.lock()) = AuthState::Error(err.into()), - // } - - // Ok(JsValue::NULL) - // }); - - // Ok(()) - // } - - // async fn get_async(url: &str, token: &Token) -> Result - // where - // R: DeserializeOwned + 'static, - // { - // let res = reqwest::Client::new() - // .get(format!("http://localhost:8080{url}")) - // .bearer_auth(&token.token) - // .send() - // .await - // .map_err(|e| ModuleError::Error(e.to_string()))?; - - // match res.error_for_status() { - // Ok(res) => res - // .json() - // .await - // .map_err(|e| ModuleError::Error(e.to_string())), - // Err(err) => Err(ModuleError::Error(format!( - // "Server returned error: {err:?}" - // ))), - // } - - // // .json::() - // // .await - // // .map_err(|e| ModuleError::Error(e.to_string()))?; - - // // serde_json::from_str(&res).map_err(|e| ModuleError::SerdeJsonError(e.to_string())) - // } -} diff --git a/ush-gui/src/blobs/mod.rs b/ush-gui/src/blobs/mod.rs deleted file mode 100644 index e69de29..0000000 diff --git a/ush-gui/src/config/mod.rs b/ush-gui/src/config/mod.rs deleted file mode 100644 index 68fce14..0000000 --- a/ush-gui/src/config/mod.rs +++ /dev/null @@ -1,190 +0,0 @@ -use std::{ - collections::HashMap, - sync::{Arc, Mutex}, -}; - -use egui_extras::{Column, TableBuilder}; - -use crate::auth::Auth; - -#[derive(serde::Deserialize, serde::Serialize)] -pub struct Config { - tree_option: String, - #[serde(skip)] - state: Arc>, - // trees: Arc>>>, - // #[serde(skip)] - // is_requesting: Arc, -} - -#[derive(Default)] -struct ConfigState { - trees: Option>, - tree_keys: Option>, - is_requesting: bool, -} - -impl Default for Config { - fn default() -> Self { - Self { - tree_option: "".into(), - state: Arc::new(Mutex::new(ConfigState { - trees: None, - tree_keys: None, - is_requesting: false, - })), // trees: Arc::new(Mutex::new(None)), - // is_requesting: Arc::new(AtomicBool::new(false)), - } - } -} - -impl Config { - pub fn update(&mut self, auth: &mut Auth, ui: &mut egui::Ui) { - let state_lock = self.state.lock().unwrap(); - let tree_list_none = state_lock.trees.is_none(); - let key_list_none = state_lock.tree_keys.is_none(); - let is_requesting = state_lock.is_requesting; - - if !tree_list_none - && !state_lock - .trees - .as_ref() - .unwrap() - .contains(&self.tree_option) - { - self.tree_option.clear(); - } - - drop(state_lock); - - ui.horizontal(|ui| { - if tree_list_none && !is_requesting { - self.state.lock().unwrap().is_requesting = true; - let state_clone = self.state.clone(); - - auth.get("/api/trees", move |response: Vec| { - let mut state_lock = state_clone.lock().unwrap(); - state_lock.trees = Some(response); - state_lock.is_requesting = false; - drop(state_lock); - }) - .unwrap(); - } else if tree_list_none && is_requesting { - ui.spinner(); - } - - // let state_lock = self.state.lock().unwrap(); - // // This might have changed since the above api call - // tree_list_none = state_lock.trees.is_none(); - - if !self.tree_option.is_empty() && !tree_list_none { - // ui.horizontal(|ui| { - // ui.label(&format!("Tree: {}", self.tree_option)); - // }); - - if key_list_none && !is_requesting { - self.state.lock().unwrap().is_requesting = true; - let state_clone = self.state.clone(); - - auth.get( - &format!("/api/values/{}", self.tree_option), - move |response: Result, String>| { - let mut state_lock = state_clone.lock().unwrap(); - state_lock.tree_keys = Some(response.unwrap()); - state_lock.is_requesting = false; - }, - ) - .unwrap(); - } else if key_list_none && is_requesting { - ui.spinner(); - } - } - }); - - if !key_list_none { - // let body_text_size = TextStyle::Body.resolve(ui.style()).size; - // use egui_extras::{Size, StripBuilder}; - // StripBuilder::new(ui) - // .size(Size::remainder().at_least(100.0)) // for the table - // .size(Size::exact(body_text_size)) - // .vertical(|mut strip| { - // strip.cell(|ui| { - - egui::ScrollArea::both().show(ui, |ui| { - let table = TableBuilder::new(ui) - .striped(true) - .resizable(true) - .cell_layout(egui::Layout::left_to_right(egui::Align::Center)) - .column(Column::auto()) - .column(Column::auto()) - .min_scrolled_height(0.0) - .sense(egui::Sense::click()); - - table - .header(20., |mut header| { - header.col(|ui| { - ui.strong("key"); - }); - header.col(|ui| { - ui.strong("value"); - }); - }) - .body(|mut body| { - let state_lock = self.state.lock().unwrap(); - let map = state_lock.tree_keys.as_ref().unwrap(); - - for (key, value) in (map).iter() { - // // let runtime = self.current_runtimes - - body.row(18., |mut row| { - row.col(|ui| { - ui.label(key); - }); - row.col(|ui| { - ui.label(value); - }); - }); - } - }); - }); - // }); - // }); - } - } - - pub fn titlebar_buttons(&mut self, ui: &mut egui::Ui) { - let state_lock = self.state.lock().unwrap(); - let mut tree_list_none = state_lock.trees.is_none(); - - drop(state_lock); - - if ui.button("Refresh").clicked() { - let mut state_lock = self.state.lock().unwrap(); - - (*state_lock).trees = None; - (*state_lock).tree_keys = None; - drop(state_lock); - - tree_list_none = true; - } - - if !tree_list_none { - let state_lock = self.state.lock().unwrap(); - let trees = state_lock.trees.as_ref().unwrap().clone(); - drop(state_lock); - - let before = &self.tree_option.clone(); - egui::ComboBox::from_id_salt("Select Tree") - .selected_text(&self.tree_option) - .show_ui(ui, |ui| { - for tree in trees { - ui.selectable_value(&mut self.tree_option, tree.clone(), tree); - } - }); - - if before.ne(&self.tree_option) { - (*self.state.lock().unwrap()).tree_keys = None; - } - } - } -} diff --git a/ush-gui/src/config/mod~.rs b/ush-gui/src/config/mod~.rs deleted file mode 100644 index 096d5c5..0000000 --- a/ush-gui/src/config/mod~.rs +++ /dev/null @@ -1,230 +0,0 @@ -use egui::{TextStyle, Ui}; -use egui_extras::{Column, TableBuilder}; - -#[derive(serde::Deserialize, serde::Serialize)] -pub struct Config { - state: ConfigState, - current_payloads: Vec, -} - -#[derive(serde::Deserialize, serde::Serialize)] -enum ConfigState { - Base, - NewConfig(PayloadConfig), - EditConfig(usize, PayloadConfig), -} - -impl Default for Config { - fn default() -> Self { - Self { - state: ConfigState::Base, - current_payloads: vec![PayloadConfig { - name: "Test".to_string(), - components: vec!["server".to_string()], - // runtimes: Vec::new(), - }], - } - } -} - -impl Config { - // pub fn title(&self) -> &str { - // match self.state { - // ConfigState::Base => "Config", - // ConfigState::NewConfig(..) => "Config/New", - // ConfigState::EditConfig(..) => "Config/Edit", - // } - // } - - pub fn update(&mut self, ui: &mut Ui) { - match &mut self.state { - ConfigState::Base => self.table_ui(ui), - ConfigState::EditConfig(_, config) => { - ui.heading("Edit Payload"); - match Self::edit_ui(ui, config) { - Some(true) => { - if let ConfigState::EditConfig(n, config) = - std::mem::replace(&mut self.state, ConfigState::Base) - { - self.current_payloads[n] = config; - } - } - Some(false) => { - self.state = ConfigState::Base; - } - _ => {} - } - } - ConfigState::NewConfig(config) => { - ui.heading("Edit Payload"); - match Self::edit_ui(ui, config) { - Some(true) => { - if let ConfigState::NewConfig(config) = - std::mem::replace(&mut self.state, ConfigState::Base) - { - self.current_payloads.push(config); - } - } - Some(false) => { - self.state = ConfigState::Base; - } - _ => {} - } - } - } - } - - fn table_ui(&mut self, ui: &mut Ui) { - ui.horizontal(|ui| { - ui.heading("Payloads"); - - ui.with_layout(egui::Layout::right_to_left(egui::Align::Center), |ui| { - if ui.button("New").clicked() { - self.state = ConfigState::NewConfig(PayloadConfig::new()); - } - }); - }); - - let body_text_size = TextStyle::Body.resolve(ui.style()).size; - use egui_extras::{Size, StripBuilder}; - StripBuilder::new(ui) - .size(Size::remainder().at_least(100.0)) // for the table - .size(Size::exact(body_text_size)) // for the source code link - .vertical(|mut strip| { - strip.cell(|ui| { - egui::ScrollArea::horizontal().show(ui, |ui| { - let table = TableBuilder::new(ui) - .striped(true) - .resizable(true) - .cell_layout(egui::Layout::left_to_right(egui::Align::Center)) - .column(Column::auto().resizable(false)) - .column(Column::remainder()) - .column(Column::remainder()) - .column(Column::remainder()) - .column(Column::auto().resizable(false)) - .min_scrolled_height(0.0) - .sense(egui::Sense::click()); - - table - .header(20., |mut header| { - header.col(|ui| { - ui.strong("#"); - }); - header.col(|ui| { - ui.strong("Name"); - }); - header.col(|ui| { - ui.strong("Components"); - }); - header.col(|ui| { - ui.strong("Runtimes"); - }); - header.col(|_| {}); - }) - .body(|mut body| { - for i in 0..self.current_payloads.len() { - // let runtime = self.current_runtimes - - body.row(18., |mut row| { - row.col(|ui| { - ui.label(i.to_string()); - }); - row.col(|ui| { - ui.label(self.current_payloads[i].name.clone()); - }); - row.col(|ui| { - ui.label(format!( - "{:?}", - self.current_payloads[i].components.clone() - )); - }); - row.col(|ui| { - ui.label("A"); - }); - row.col(|ui| { - if ui.button("Edit").clicked() { - self.state = ConfigState::EditConfig( - i, - self.current_payloads[i].clone(), - ); - } - // if ui.button("Delete").clicked() { - // self.state = ConfigState::EditConfig( - // i, - // self.current_payloads[i].clone(), - // ); - // } - }); - - if row.response().clicked() { - self.state = ConfigState::EditConfig( - i, - self.current_payloads[i].clone(), - ); - } - }); - } - }); - }); - }); - }); - } - - fn edit_ui(ui: &mut Ui, config: &mut PayloadConfig) -> Option { - ui.horizontal(|ui| { - ui.label("Name"); - ui.text_edit_singleline(&mut config.name); - }); - - ui.horizontal(|ui| { - ui.label("Components: "); - - for component in vec!["client", "server"] { - let enabled = config - .components - .iter() - .enumerate() - .find(|s| s.1.eq(component)); - if ui.selectable_label(enabled.is_some(), component).clicked() { - if let Some((i, _)) = enabled { - let _ = config.components.remove(i); - } else { - config.components.push(component.to_string()); - } - } - } - }); - - let mut ret = None; - ui.horizontal(|ui| { - ret = if ui.button("Back").clicked() { - Some(false) - } else if ui.button("Save").clicked() { - Some(true) - } else { - None - }; - }); - - ret - - // return None; - } -} - -#[derive(Clone, serde::Deserialize, serde::Serialize)] -struct PayloadConfig { - name: String, - components: Vec, - // runtimes: Vec, -} - -impl PayloadConfig { - pub fn new() -> Self { - Self { - name: "New Payload".to_string(), - components: Vec::new(), - // runtimes: Vec::new(), - } - } -} diff --git a/ush-gui/src/flowchart/container.rs b/ush-gui/src/flowchart/container.rs deleted file mode 100644 index 58283a1..0000000 --- a/ush-gui/src/flowchart/container.rs +++ /dev/null @@ -1,93 +0,0 @@ -use egui::{Pos2, Rect, UiBuilder, Vec2}; - -#[derive(serde::Deserialize, serde::Serialize)] -pub struct DraggableContainer { - pub pos: egui::Vec2, // Offset from center of clip_rect - pub size: egui::Vec2, - - is_dragging: bool, - drag_offset: egui::Vec2, - drag_id: String, - - pub vel: egui::Vec2, -} - -impl DraggableContainer { - // pub fn new(center_offset: egui::Vec2, size: egui::Vec2, id: usize) -> Self { - // Self { - // pos: center_offset, - // size, - // is_dragging: false, - // drag_offset: egui::Vec2::ZERO, - // drag_id: format!("flowchart_drag_area{}", id), - // vel: Vec2::ZERO, - // } - // } - - pub fn new_zero(id: usize) -> Self { - Self { - pos: Vec2::ZERO, - size: Vec2 { x: 100., y: 100. }, - is_dragging: false, - drag_offset: egui::Vec2::ZERO, - drag_id: format!("flowchart_drag_area{}", id), - vel: Vec2::ZERO, - } - } - - pub fn show( - &mut self, - ui: &mut egui::Ui, - add_contents: impl FnOnce(&mut egui::Ui, &Rect) -> R, - ) -> R { - // Calculate center of the clip rect - let clip_center = Pos2::ZERO; - - // Calculate actual position from center offset - let center_pos = clip_center + self.pos; - let pos = center_pos - self.size / 2.0; // Top-left corner from center - let rect = egui::Rect::from_min_size(pos, self.size); - - // Handle dragging logic - let response = ui.interact(rect, ui.id().with(&self.drag_id), egui::Sense::drag()); - - // if response.secondary_clicked() { - - // } - - if response.drag_started() { - self.is_dragging = true; - if let Some(pointer_pos) = ui.input(|i| i.pointer.latest_pos()) { - let pointer_pos = ui - .ctx() - .layer_transform_from_global(ui.painter().layer_id()) - .unwrap_or_default() - * pointer_pos; - self.drag_offset = center_pos - pointer_pos; - } - } - - if response.dragged() && self.is_dragging { - // Pointer code from https://github.com/emilk/egui/pull/7149 - if let Some(pointer_pos) = ui.input(|i| i.pointer.latest_pos()) { - let pointer_pos = ui - .ctx() - .layer_transform_from_global(ui.painter().layer_id()) - .unwrap_or_default() - * pointer_pos; - let new_center = pointer_pos + self.drag_offset; - self.pos = new_center - clip_center; - } - } - - if response.drag_stopped() { - self.is_dragging = false; - } - - // Create a child UI at the specified position - let mut child_ui = ui.new_child(UiBuilder::new().max_rect(rect)); - - // Add contents - add_contents(&mut child_ui, &rect) - } -} diff --git a/ush-gui/src/flowchart/flowchart.rs b/ush-gui/src/flowchart/flowchart.rs deleted file mode 100644 index 33e273e..0000000 --- a/ush-gui/src/flowchart/flowchart.rs +++ /dev/null @@ -1,154 +0,0 @@ -use egui::{Color32, Painter, Pos2, Rect, Scene, Shape, Ui}; - -use crate::flowchart::CONNECTION_STROKE; -use crate::flowchart::GROUP_BORDER_MARGIN; -use crate::flowchart::ITERATIONS; -use crate::flowchart::RESOLUTION; -use crate::flowchart::container::DraggableContainer; -use crate::flowchart::group::convex_hull; -use crate::flowchart::{BG_STROKE, TARGET_LINE_GAP}; - -#[derive(serde::Deserialize, serde::Serialize)] - -pub struct FlowChart { - scene_rect: Rect, - pub containers: Vec, - pub connections: Vec<(usize, usize)>, - pub groups: Vec>, -} - -impl Default for FlowChart { - fn default() -> Self { - let mut this = Self { - scene_rect: Rect::ZERO, - containers: vec![ - DraggableContainer::new_zero(0), - DraggableContainer::new_zero(1), - DraggableContainer::new_zero(2), - DraggableContainer::new_zero(3), - DraggableContainer::new_zero(4), - DraggableContainer::new_zero(5), - DraggableContainer::new_zero(6), - DraggableContainer::new_zero(7), - ], - connections: vec![(0, 1), (1, 2), (1, 3), (1, 4), (3, 5), (3, 6), (3, 7)], - groups: vec![vec![1, 3, 5, 7]], - }; - - this.arrange_circle(); - this.arrange(); - - this - } -} - -impl FlowChart { - pub fn arrange(&mut self) { - for _ in 0..ITERATIONS { - self.force(RESOLUTION); - } - } - - fn paint_bg(rect: &Rect, painter: &Painter) { - let h_start = (rect.min.x / TARGET_LINE_GAP).round() as i32; - let h_end = ((rect.min.x + rect.width()) / TARGET_LINE_GAP).round() as i32 + 1; - for n in h_start..h_end { - painter.vline(n as f32 * TARGET_LINE_GAP, rect.y_range(), BG_STROKE); - } - - let v_start = (rect.min.y / TARGET_LINE_GAP).round() as i32; - let v_end = ((rect.min.y + rect.height()) / TARGET_LINE_GAP).round() as i32 + 1; - for n in v_start..v_end { - painter.hline(rect.x_range(), n as f32 * TARGET_LINE_GAP, BG_STROKE); - } - } - - fn paint_groups(groups: &Vec>, containers: &Vec, ui: &mut Ui) { - for group in groups { - let mut points = Vec::new(); - - for n in group { - let container = &containers[*n]; - let pos = container.pos.to_pos2(); - let size = container.size; - points.append(&mut vec![ - Pos2 { - x: pos.x - size.x / 2. - GROUP_BORDER_MARGIN, - y: pos.y - size.x / 2. - GROUP_BORDER_MARGIN, - }, - Pos2 { - x: pos.x + size.x / 2. + GROUP_BORDER_MARGIN, - y: pos.y - size.y / 2. - GROUP_BORDER_MARGIN, - }, - Pos2 { - x: pos.x - size.x / 2. - GROUP_BORDER_MARGIN, - y: pos.y + size.y / 2. + GROUP_BORDER_MARGIN, - }, - Pos2 { - x: pos.x + size.x / 2. + GROUP_BORDER_MARGIN, - y: pos.y + size.y / 2. + GROUP_BORDER_MARGIN, - }, - ]); - } - - let points = convex_hull(&points); - - ui.painter().add(Shape::convex_polygon( - points, - Color32::DEBUG_COLOR, - BG_STROKE, - )); - } - } - - pub fn paint(&mut self, ui: &mut Ui) { - let scene = Scene::new() - // .max_inner_size([350.0, 1000.0]) - .zoom_range(0.1..=2.0); - - let containers = &mut self.containers; - let groups = &self.groups; - - let mut inner_rect = Rect::NAN; - let rect = &self.scene_rect.clone(); - - let response = scene - .show(ui, &mut self.scene_rect, |mut ui| { - Self::paint_bg(rect, ui.painter()); - Self::paint_groups(groups, containers, &mut ui); - - for (a, b) in &self.connections { - ui.painter().line_segment( - [containers[*a].pos.to_pos2(), containers[*b].pos.to_pos2()], - CONNECTION_STROKE, - ); - } - - for container in containers { - container.show(&mut ui, |ui, rect| { - ui.painter().rect( - // ui.top - *rect, - 0., - Color32::PURPLE, - BG_STROKE, - egui::StrokeKind::Outside, - ); - }); - } - - inner_rect = ui.min_rect(); - }) - .response; - - if response.double_clicked() { - self.scene_rect = inner_rect; - } - } - - pub fn titlebar_buttons(&mut self, ui: &mut egui::Ui) { - if ui.button("Arrange").clicked() { - self.arrange(); - } - } -} diff --git a/ush-gui/src/flowchart/force.rs b/ush-gui/src/flowchart/force.rs deleted file mode 100644 index 6ecf70c..0000000 --- a/ush-gui/src/flowchart/force.rs +++ /dev/null @@ -1,106 +0,0 @@ -use std::f32::consts::TAU; - -use egui::Vec2; - -use crate::flowchart::{ - ATTRACTION_STRENGTH, CENTER_ATTRACTION_STRENGTH, DAMPING, FlowChart, GROUP_ATTRACTION_STRENGTH, - REPULSION_STRENGTH, REST_LENGTH, -}; - -pub fn normalize(v: &Vec2) -> Vec2 { - let len = v.length(); - if len > 0.0 { - Vec2 { - x: v.x / len, - y: v.y / len, - } - } else { - Vec2 { x: 0.0, y: 0.0 } - } -} - -impl FlowChart { - pub fn force(&mut self, delta_time: f32) { - let num_nodes = self.containers.len(); - let mut forces = vec![Vec2::new(0.0, 0.0); num_nodes]; - - // Calculate repulsive forces between all nodes - for i in 0..num_nodes { - for j in (i + 1)..num_nodes { - let diff = self.containers[i].pos - self.containers[j].pos; - let dist = diff.length().max(0.1); // Prevent division by zero - let force = normalize(&diff) * (REPULSION_STRENGTH / (dist * dist)); - - forces[i] = forces[i] + force; - forces[j] = forces[j] + (force * -1.0); - } - } - - // Calculate attractive forces along connections - for &(i, j) in &self.connections { - let diff = self.containers[j].pos - self.containers[i].pos; - let dist = diff.length(); - let displacement = dist - REST_LENGTH; - let force = normalize(&diff) * (displacement * ATTRACTION_STRENGTH); - - forces[i] = forces[i] + force; - forces[j] = forces[j] + (force * -1.0); - } - - // Apply force to center - for i in 0..num_nodes { - let diff = self.containers[i].pos; - let dist = diff.length(); - let displacement = dist - REST_LENGTH; - let force = normalize(&diff) * (displacement * CENTER_ATTRACTION_STRENGTH); - - forces[i] = forces[i] + force * -1.; - } - - let group_avg = &self - .groups - .iter() - .map(|group| { - let mut sum = Vec2::ZERO; - for n in group { - sum += self.containers[*n].pos; - } - sum / group.len() as f32 - }) - .collect::>(); - - for (group, group_avg) in self.groups.iter().zip(group_avg) { - for i in 0..num_nodes { - let diff = self.containers[i].pos - *group_avg; - let dist = diff.length(); - let displacement = dist - REST_LENGTH; - let force = normalize(&diff) * (displacement * GROUP_ATTRACTION_STRENGTH); - - if group.contains(&i) { - forces[i] = forces[i] + force * -1.; - } else { - forces[i] = forces[i] + force; - } - } - } - - // Update velocities and positions - for i in 0..num_nodes { - let c = &mut self.containers[i]; - c.vel = (c.vel + forces[i] * delta_time) * DAMPING; - c.pos += c.vel * delta_time; - } - } - - pub fn arrange_circle(&mut self) { - let node_count = self.containers.len() as f32; - for (i, m) in self.containers.iter_mut().enumerate() { - let ang = -(i as f32 / node_count) * TAU; - m.pos = Vec2 { - x: 300. * ang.sin(), - y: 300. * ang.cos(), - }; - m.vel = Vec2::ZERO; - } - } -} diff --git a/ush-gui/src/flowchart/group.rs b/ush-gui/src/flowchart/group.rs deleted file mode 100644 index 5fd21dd..0000000 --- a/ush-gui/src/flowchart/group.rs +++ /dev/null @@ -1,59 +0,0 @@ -use egui::Pos2; - -/// Calculate the convex hull of a set of points using Graham scan -pub fn convex_hull(points: &[Pos2]) -> Vec { - if points.len() < 3 { - return points.to_vec(); - } - - let mut pts = points.to_vec(); - - // Find the point with lowest y-coordinate (and leftmost if tie) - let start_idx = pts - .iter() - .enumerate() - .min_by(|(_, a), (_, b)| { - a.y.partial_cmp(&b.y) - .unwrap() - .then(a.x.partial_cmp(&b.x).unwrap()) - }) - .unwrap() - .0; - - pts.swap(0, start_idx); - let start = pts[0]; - - // Sort points by polar angle with respect to start point - pts[1..].sort_by(|a, b| { - let angle_a = polar_angle_to(&start, a); - let angle_b = polar_angle_to(&start, b); - angle_a.partial_cmp(&angle_b).unwrap() - }); - - // Build convex hull - let mut hull = Vec::new(); - hull.push(pts[0]); - hull.push(pts[1]); - - for i in 2..pts.len() { - while hull.len() > 1 - && cross_product(&hull[hull.len() - 2], &hull[hull.len() - 1], &pts[i]) <= 0.0 - { - hull.pop(); - } - hull.push(pts[i]); - } - - hull -} - -/// Calculate cross product of vectors (self->p2) and (self->p3) -/// Positive if counter-clockwise, negative if clockwise, zero if collinear -fn cross_product(p1: &Pos2, p2: &Pos2, p3: &Pos2) -> f32 { - (p2.x - p1.x) * (p3.y - p1.y) - (p2.y - p1.y) * (p3.x - p1.x) -} - -/// Calculate polar angle from self to other point -fn polar_angle_to(a: &Pos2, b: &Pos2) -> f32 { - (b.y - a.y).atan2(b.x - a.x) -} diff --git a/ush-gui/src/flowchart/mod.rs b/ush-gui/src/flowchart/mod.rs deleted file mode 100644 index 3881bbf..0000000 --- a/ush-gui/src/flowchart/mod.rs +++ /dev/null @@ -1,31 +0,0 @@ -mod container; -mod flowchart; -mod force; -mod group; - -use egui::{Color32, Stroke}; -pub use flowchart::FlowChart; - -const ITERATIONS: usize = 1_000; -const RESOLUTION: f32 = 0.6; - -const TARGET_LINE_GAP: f32 = 80.; - -const BG_STROKE: Stroke = Stroke { - width: 0.3, - color: Color32::GRAY, -}; - -const CONNECTION_STROKE: Stroke = Stroke { - width: 3., - color: Color32::WHITE, -}; - -const GROUP_BORDER_MARGIN: f32 = 20.; - -static REPULSION_STRENGTH: f32 = 100000.0; // repulsion_strength -static ATTRACTION_STRENGTH: f32 = 0.01; // attraction_strength -static CENTER_ATTRACTION_STRENGTH: f32 = 0.01; // attraction_strength -static GROUP_ATTRACTION_STRENGTH: f32 = 0.01; // attraction_strength -static REST_LENGTH: f32 = 50.0; // rest_length -static DAMPING: f32 = 0.9; // damping diff --git a/ush-gui/src/interface/interface.rs b/ush-gui/src/interface/interface.rs deleted file mode 100644 index a30a9a7..0000000 --- a/ush-gui/src/interface/interface.rs +++ /dev/null @@ -1,82 +0,0 @@ -use egui::{Color32, TextEdit}; -use unshell::config::{ConfigStructField, InterfaceData, InterfaceStruct, config_struct}; - -use crate::config::Config; - -struct ConfigInterface(Config); - -pub fn render( - ui: &mut egui::Ui, - interface_struct: &InterfaceStruct, - interface_data: &mut InterfaceData, -) { - match (interface_struct, interface_data) { - (InterfaceStruct::ConfigStruct(interface), InterfaceData::ConfigStruct(data)) => { - render_config_struct(ui, interface, data); - } - } -} - -fn render_config_struct( - ui: &mut egui::Ui, - interface: &config_struct::ConfigStructKeys, - data: &mut config_struct::ConfigStructValues, -) { - for (interface, data) in interface.iter().zip(data) { - match (interface, data) { - (ConfigStructField::Header(text), serde_json::Value::Null) => { - ui.heading(text); - } - - (ConfigStructField::Text(text), serde_json::Value::Null) => { - ui.label(text); - } - - ( - ConfigStructField::String { - default: _, - max_length, - protected, - }, - serde_json::Value::String(value), - ) => { - ui.horizontal(|ui| { - let mut widget = TextEdit::singleline(value); - - if let Some(limit) = &max_length { - widget = widget.char_limit(*limit); - } - - let password = *protected && !ui.button("👁").is_pointer_button_down_on(); - - widget = widget.password(password); - - // if protected - // ui.selectable_label(show_plaintext, "👁") - // .on_hover_text("Show/hide password") - // .clicked(); - // { - // widget = widget.password(true); - // } - - ui.add(widget); - - if let Some(limit) = max_length { - ui.label(format!("{}/{}", value.len(), limit)); - } - }); - } - ( - ConfigStructField::Integer { default, min, max }, - serde_json::Value::Number(number), - ) => todo!(), - - (interface, data) => { - ui.colored_label( - Color32::RED, - &format!("Incorrect type and value! {interface:?} and {data:?}"), - ); - } - } - } -} diff --git a/ush-gui/src/interface/mod.rs b/ush-gui/src/interface/mod.rs deleted file mode 100644 index 4fed4e4..0000000 --- a/ush-gui/src/interface/mod.rs +++ /dev/null @@ -1,173 +0,0 @@ -mod interface; - -use std::{ - path::PathBuf, - sync::{Arc, Mutex}, -}; - -use unshell::{Result, config::TreeMessage}; - -use crate::auth::Auth; - -#[derive(serde::Deserialize, serde::Serialize)] -pub struct InterfaceWindow { - path: PathBuf, - // #[serde(skip)] - // data_bind: Bind, - #[serde(skip)] - state: Arc>, - // #[serde(skip)] - // promise: Option>>, -} - -pub struct InterfaceWindowState { - is_request: bool, - is_error: bool, - branch: Option, -} - -impl InterfaceWindow { - pub fn update(&mut self, auth: &mut Auth, ui: &mut egui::Ui) { - // let data_bind = Bind::::new(false); - - ui.heading("Interface"); - ui.label(self.path.to_string_lossy()); - - { - if !self.path.eq("/") && ui.button("Go up").clicked() { - self.go_up(); - self.state.lock().unwrap().branch = None; - } - - let state_lock = self.state.lock().unwrap(); - - let (is_request, is_error, is_some) = ( - state_lock.is_request, - state_lock.is_error, - state_lock.branch.is_some(), - ); - - drop(state_lock); - - if is_request { - ui.spinner(); - } else if is_error { - self.reset_path(); - let mut state_lock = self.state.lock().unwrap(); - - state_lock.is_error = false; - state_lock.is_request = false; - state_lock.branch = None; - - drop(state_lock) - } else if !is_some { - { - let mut state_lock = self.state.lock().unwrap(); - - state_lock.is_request = true; - } - - let state_clone = self.state.clone(); - auth.get( - &format!("/api/interface{}", self.path.display()), - move |response: Result| { - let mut state_lock = state_clone.lock().unwrap(); - - match response { - Ok(item) => { - state_lock.branch = Some(item); - } - Err(err) => { - crate::log(&format!("Got error {err:?}")); - state_lock.is_error = true; - } - } - - state_lock.is_request = false; - - drop(state_lock); - }, - ) - .unwrap(); - } else { - let state_clone = self.state.clone(); - - let mut state_lock = state_clone.lock().unwrap(); - - let branch = (state_lock.branch).as_mut().unwrap(); - - let clear = match branch { - TreeMessage::InterfaceAndValue(interface_struct, interface_data) => { - interface::render(ui, interface_struct, interface_data); - - if ui.button("Save").clicked() { - auth.post( - &format!("/api/interface{}", self.path.display()), - &TreeMessage::State(interface_data.clone()), - move |response: Result| { - // debug!("{response:?}"); - }, - ) - .unwrap(); - } - - false - } - TreeMessage::Folder(items) => { - let mut clear = false; - for item in items { - if ui.button(&format!("Item {}", item)).clicked() { - self.go_down(item.clone()); - clear = true; - break; - } - } - clear - } - _ => false, - }; - - if clear { - state_lock.branch = None; - } - - drop(state_lock) - } - } - } - - fn reset_path(&mut self) { - self.path = PathBuf::from("/"); - } - - fn go_up(&mut self) { - if let Some(parent) = self.path.parent() { - self.path = PathBuf::from(parent); - } - } - - fn go_down(&mut self, path: String) { - self.path = self.path.join(path); - } -} - -impl Default for InterfaceWindow { - fn default() -> Self { - Self { - path: "/".into(), - // promise: None, - state: Arc::new(Mutex::new(InterfaceWindowState::default())), - // data_bind: Bind::new(false), - } - } -} - -impl Default for InterfaceWindowState { - fn default() -> Self { - Self { - is_request: false, - branch: None, - is_error: false, - } - } -} diff --git a/ush-gui/src/lib.rs b/ush-gui/src/lib.rs deleted file mode 100644 index 48e3ac3..0000000 --- a/ush-gui/src/lib.rs +++ /dev/null @@ -1,90 +0,0 @@ -#![warn(clippy::all, rust_2018_idioms)] -#![macro_use] -// #[allow(unused_extern_crates)] -// extern crate log; - -pub mod app; -mod auth; -mod blobs; -mod config; -mod flowchart; -mod interface; -mod log_viewer; -mod payload_config; - -use std::time::Duration; -const FORCE_REDRAW_DELAY: Duration = Duration::from_millis(300); - -// mod JsFunc { -// use wasm_bindgen::JsValue; -use wasm_bindgen::prelude::*; - -#[wasm_bindgen] -extern "C" { - #[wasm_bindgen(js_namespace = console)] - pub fn log(text: &str); - -} - -#[wasm_bindgen(module = "/assets/sw.js")] -extern "C" { - pub fn httpGet(url: &str, ok_callback: JsValue); - pub fn httpPost(url: &str, data: &str, ok_callback: JsValue); - pub fn httpGetAuth(url: &str, auth: String, ok_callback: JsValue); - pub fn httpPostAuth(url: &str, auth: String, data: &str, ok_callback: JsValue); -} - -// When compiling to web using trunk: -#[cfg(target_arch = "wasm32")] -#[wasm_bindgen(start)] -pub async fn run() { - use wasm_bindgen::JsCast as _; - - use app::TemplateApp; - - // Redirect `log` message to `console.log` and friends: - eframe::WebLogger::init(log::LevelFilter::Debug).ok(); - - let web_options = eframe::WebOptions::default(); - - let document = web_sys::window() - .expect("No window") - .document() - .expect("No document"); - - let canvas = document - .get_element_by_id("the_canvas_id") - .expect("Failed to find the_canvas_id") - .dyn_into::() - .expect("the_canvas_id was not a HtmlCanvasElement"); - - let start_result = eframe::WebRunner::new() - .start( - canvas, - web_options, - Box::new(|cc| Ok(Box::new(TemplateApp::new(cc)))), - ) - .await; - - // Remove the loading text and spinner: - if let Some(loading_text) = document.get_element_by_id("loading_text") { - match start_result { - Ok(_) => { - loading_text.remove(); - } - Err(e) => { - loading_text.set_inner_html( - "

The app has crashed. See the developer console for details.

", - ); - panic!("Failed to start eframe: {e:?}"); - } - } - } -} - -// } -// #[cfg(not(target_arch = "wasm32"))] -// mod JsFunc { - -// pub fn httpGet(url: &str, callback: fn() -> {}) {} -// } diff --git a/ush-gui/src/log_viewer/mod.rs b/ush-gui/src/log_viewer/mod.rs deleted file mode 100644 index 7c2fd2a..0000000 --- a/ush-gui/src/log_viewer/mod.rs +++ /dev/null @@ -1,207 +0,0 @@ -use chrono::DateTime; -use chrono::Utc; -use egui::Color32; -use egui::TextStyle; -use egui_extras::Column; -use egui_extras::TableBuilder; - -use crate::auth::Auth; - -use std::sync::Arc; -use std::sync::Mutex; -use std::time::SystemTime; - -#[derive(serde::Deserialize, serde::Serialize)] -pub struct LogViewer { - enable_location: bool, - #[serde(skip)] - state: Arc>, -} - -#[derive(Default)] -struct LogState { - logs: Vec, - // trees: Option>, - // tree_keys: Option>, - is_requesting: bool, - requested_data: bool, -} - -#[derive(Debug, serde::Serialize, serde::Deserialize)] -pub enum LogLevel { - Debug, - Info, - Warn, - Error, -} - -#[derive(Debug, serde::Serialize, serde::Deserialize)] -pub struct Record { - log_level: LogLevel, - location: Option, - time: SystemTime, - message: String, -} - -impl Record { - pub fn display_level(&self, ui: &mut egui::Ui) { - match self.log_level { - LogLevel::Debug => ui.colored_label(Color32::LIGHT_BLUE, "DBUG"), - LogLevel::Info => ui.colored_label(Color32::DARK_GREEN, "INFO"), - LogLevel::Warn => ui.colored_label(Color32::YELLOW, "WARN"), - LogLevel::Error => ui.colored_label(Color32::RED, "ERR!"), - }; - } - pub fn display_location(&self, ui: &mut egui::Ui) { - if let Some(ref location) = self.location { - ui.label(location); - } - } - pub fn display_time(&self, ui: &mut egui::Ui) { - let date: DateTime = self.time.into(); - let date = date.to_rfc2822().to_string(); - ui.label(date); - } - pub fn display_message(&self, ui: &mut egui::Ui) { - ui.strong(&self.message); - } -} - -impl LogViewer { - pub fn update(&mut self, auth: &mut Auth, ui: &mut egui::Ui) { - ui.heading("Log Viewer"); - - ui.horizontal(|ui| { - if ui.button("Refresh").clicked() { - self.refresh_logs(auth); - } - - ui.checkbox(&mut self.enable_location, "Enable Location"); - }); - - // let logs = ; - - let body_text_size = TextStyle::Body.resolve(ui.style()).size; - use egui_extras::{Size, StripBuilder}; - StripBuilder::new(ui) - .size(Size::remainder().at_least(100.0)) // for the table - .size(Size::exact(body_text_size)) - .vertical(|mut strip| { - strip.cell(|ui| { - egui::ScrollArea::both() - .stick_to_bottom(true) - .show(ui, |ui| { - let table = TableBuilder::new(ui) - .striped(true) - .resizable(true) - .stick_to_bottom(true) - .cell_layout(egui::Layout::left_to_right(egui::Align::Center)) - .column(Column::auto()) - .column(Column::auto()) - .column(Column::auto()) - .min_scrolled_height(0.0) - .sense(egui::Sense::click()); - - let table = if self.enable_location { - table.column(Column::auto()) - } else { - table - }; - - table - .header(20., |mut header| { - header.col(|ui| { - ui.strong("Time"); - }); - header.col(|ui| { - ui.strong("Level"); - }); - header.col(|ui| { - ui.strong("Message"); - }); - if self.enable_location { - header.col(|ui| { - ui.strong("Location"); - }); - } - }) - .body(|mut body| { - let state_lock = self.state.lock().unwrap(); - // let logs = state_lock.logs.as_ref(); - - for log in state_lock.logs.iter() { - // // let runtime = self.current_runtimes - - body.row(18., |mut row| { - row.col(|ui| log.display_time(ui)); - row.col(|ui| log.display_level(ui)); - row.col(|ui| log.display_message(ui)); - if self.enable_location { - row.col(|ui| log.display_location(ui)); - } - }); - } - }); - }); - }); - }); - - { - let state_lock = self.state.lock().unwrap(); - - match ( - state_lock.is_requesting, - state_lock.logs.len() == 0, - state_lock.requested_data, - ) { - (true, _, _) => { - drop(state_lock); - ui.spinner(); - } - (false, true, true) => { - drop(state_lock); - ui.label("There are no logs"); - } - (false, true, false) => { - drop(state_lock); - self.refresh_logs(auth); - } - _ => { - drop(state_lock); - } - } - } - } - - fn refresh_logs(&self, auth: &mut Auth) { - let state_clone = self.state.clone(); - { - let mut state_lock = self.state.lock().unwrap(); - state_lock.logs.clear(); - state_lock.is_requesting = true; - } - auth.get(&format!("/api/log/{}", 0), move |e: Vec| { - let mut state_lock = state_clone.lock().unwrap(); - state_lock.logs.append( - &mut e - .iter() - .map(|log| serde_json::from_str(log).unwrap()) - .collect(), - ); - state_lock.is_requesting = false; - state_lock.requested_data = true; - - // crate::log(&format!("{e:?}")); - }) - .unwrap(); - } -} - -impl Default for LogViewer { - fn default() -> Self { - Self { - enable_location: false, - state: Arc::new(Mutex::new(LogState::default())), - } - } -} diff --git a/ush-gui/src/main~.rs b/ush-gui/src/main~.rs deleted file mode 100644 index a67a1c1..0000000 --- a/ush-gui/src/main~.rs +++ /dev/null @@ -1,21 +0,0 @@ -#![warn(clippy::all, rust_2018_idioms)] -#![cfg_attr(not(debug_assertions), windows_subsystem = "windows")] // hide console window on Windows in release - -// When compiling natively: -#[cfg(not(target_arch = "wasm32"))] -fn main() -> eframe::Result { - // pretty_env_logger::init(); // Log to stderr (if you run with `RUST_LOG=debug`). - - // let native_options = eframe::NativeOptions { - // viewport: egui::ViewportBuilder::default() - // .with_inner_size([400.0, 300.0]) - // .with_min_inner_size([300.0, 220.0]), - // ..Default::default() - // }; - // eframe::run_native( - // "eframe template", - // native_options, - // Box::new(|cc| Ok(Box::new(TemplateApp::new(cc)))), - // ) - todo!() -} diff --git a/ush-gui/src/payload_config/mod.rs b/ush-gui/src/payload_config/mod.rs deleted file mode 100644 index 96282ee..0000000 --- a/ush-gui/src/payload_config/mod.rs +++ /dev/null @@ -1,30 +0,0 @@ -// use crate::payload_config::structs::ConfigStructField; - -mod structs; - -#[derive(serde::Deserialize, serde::Serialize)] -pub struct PayloadConfig { - config_struct: structs::Config, -} - -// struct ServerConfigState { -// // config: Vec -// } - -impl PayloadConfig { - pub fn update(&mut self, ui: &mut egui::Ui) { - if ui.button("export").clicked() { - crate::log(&self.config_struct.export()); - } - // ui.heading("Test"); - self.config_struct.update(ui); - } -} - -impl Default for PayloadConfig { - fn default() -> Self { - Self { - config_struct: structs::default_configurable(), - } - } -} diff --git a/ush-gui/src/payload_config/structs.rs b/ush-gui/src/payload_config/structs.rs deleted file mode 100644 index f20663d..0000000 --- a/ush-gui/src/payload_config/structs.rs +++ /dev/null @@ -1,126 +0,0 @@ -use std::collections::HashMap; - -use egui::TextEdit; -use serde_json::Value; - -#[derive(serde::Deserialize, serde::Serialize)] -enum ConfigStructField { - Header(String), - Text(String), - String { - default: Option, - max_length: Option, - protected: bool, - }, - Integer { - default: i32, - min: Option, - max: Option, - }, - // Checkbox - // Dropdown - // Collapsing header - // Slider - // ... -} - -#[derive(serde::Deserialize, serde::Serialize)] -pub struct Config { - config: Vec<(String, ConfigStructField)>, - state: HashMap, -} - -impl Config { - fn new(config: Vec<(String, ConfigStructField)>) -> Self { - Self { - config, - state: HashMap::default(), - } - } - - pub fn update(&mut self, ui: &mut egui::Ui) { - for (id, field) in &self.config { - match field { - ConfigStructField::Header(text) => { - ui.heading(text); - } - ConfigStructField::Text(text) => { - ui.label(text); - } - ConfigStructField::String { - default, - max_length, - protected, - } => { - let value = if let Some(Value::String(value)) = self.state.get_mut(id) { - value - } else { - self.state.insert( - id.clone(), - Value::String(default.clone().unwrap_or(String::new())), - ); - if let Some(Value::String(value)) = self.state.get_mut(id) { - value - } else { - unreachable!() - } - }; - - let mut widget = TextEdit::singleline(value).password(*protected); - - if let Some(limit) = &max_length { - widget = widget.char_limit(*limit); - } - - ui.add(widget); - } - _ => {} // ConfigStructField::Integer { default, min, max } => todo!(), - } - } - - // match &self.field { - // ConfigStructField::Header(text) => { - // ui.heading(text); - // } - // ConfigStructField::Text(text) => { - // ui.label(text); - // } - // ConfigStructField::String { - // default, - // max_length, - // protected, - // } => ui.text_edit_singleline(), - // ConfigStructField::Integer { default, min, max } => todo!(), - // } - } - - pub fn export(&self) -> String { - serde_json::to_string(&self.config).unwrap() - } -} - -pub fn default_configurable() -> Config { - Config::new(vec![ - ( - "Header".into(), - ConfigStructField::Header("Test Header!".into()), - ), - ("text".into(), ConfigStructField::Text("Test Text!".into())), - ( - "Config".into(), - ConfigStructField::String { - default: Some("Test String".into()), - max_length: Some(30), - protected: false, - }, - ), - ( - "Protected".into(), - ConfigStructField::String { - default: Some("Protected String".into()), - max_length: None, - protected: true, - }, - ), - ]) -} diff --git a/ush-manager/Cargo.lock b/ush-manager/Cargo.lock deleted file mode 100644 index 1475566..0000000 --- a/ush-manager/Cargo.lock +++ /dev/null @@ -1,845 +0,0 @@ -# This file is automatically @generated by Cargo. -# It is not intended for manual editing. -version = 4 - -[[package]] -name = "aes" -version = "0.8.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b169f7a6d4742236a0a00c541b845991d0ac43e546831af1249753ab4c3aa3a0" -dependencies = [ - "cfg-if", - "cipher", - "cpufeatures", -] - -[[package]] -name = "aho-corasick" -version = "1.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ddd31a130427c27518df266943a5308ed92d4b226cc639f5a8f1002816174301" -dependencies = [ - "memchr", -] - -[[package]] -name = "android_system_properties" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "819e7219dbd41043ac279b19830f2efc897156490d7fd6ea916720117ee66311" -dependencies = [ - "libc", -] - -[[package]] -name = "autocfg" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c08606f8c3cbf4ce6ec8e28fb0014a2c086708fe954eaa885384a6165172e7e8" - -[[package]] -name = "bincode" -version = "2.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "36eaf5d7b090263e8150820482d5d93cd964a81e4019913c972f4edcc6edb740" -dependencies = [ - "bincode_derive", - "serde", - "unty", -] - -[[package]] -name = "bincode_derive" -version = "2.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf95709a440f45e986983918d0e8a1f30a9b1df04918fc828670606804ac3c09" -dependencies = [ - "virtue", -] - -[[package]] -name = "bitflags" -version = "1.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" - -[[package]] -name = "bitflags" -version = "2.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "812e12b5285cc515a9c72a5c1d3b6d46a19dac5acfef5265968c166106e31dd3" - -[[package]] -name = "block-buffer" -version = "0.10.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71" -dependencies = [ - "generic-array", -] - -[[package]] -name = "block-padding" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a8894febbff9f758034a5b8e12d87918f56dfc64a8e1fe757d65e29041538d93" -dependencies = [ - "generic-array", -] - -[[package]] -name = "block-padding" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "710f1dd022ef4e93f8a438b4ba958de7f64308434fa6a87104481645cc30068b" -dependencies = [ - "hybrid-array", -] - -[[package]] -name = "bumpalo" -version = "3.19.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5dd9dc738b7a8311c7ade152424974d8115f2cdad61e8dab8dac9f2362298510" - -[[package]] -name = "cbc" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26b52a9543ae338f279b96b0b9fed9c8093744685043739079ce85cd58f289a6" -dependencies = [ - "cipher", -] - -[[package]] -name = "cc" -version = "1.2.50" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f50d563227a1c37cc0a263f64eca3334388c01c5e4c4861a9def205c614383c" -dependencies = [ - "find-msvc-tools", - "shlex", -] - -[[package]] -name = "cfg-if" -version = "1.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9330f8b2ff13f34540b44e946ef35111825727b38d33286ef986142615121801" - -[[package]] -name = "cfg_aliases" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fd16c4719339c4530435d38e511904438d07cce7950afa3718a84ac36c10e89e" - -[[package]] -name = "cfg_aliases" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "613afe47fcd5fac7ccf1db93babcb082c5994d996f20b8b159f2ad1658eb5724" - -[[package]] -name = "chrono" -version = "0.4.42" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "145052bdd345b87320e369255277e3fb5152762ad123a901ef5c262dd38fe8d2" -dependencies = [ - "iana-time-zone", - "js-sys", - "num-traits", - "wasm-bindgen", - "windows-link", -] - -[[package]] -name = "cipher" -version = "0.4.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "773f3b9af64447d2ce9850330c473515014aa235e6a783b02db81ff39e4a3dad" -dependencies = [ - "crypto-common", - "inout", -] - -[[package]] -name = "core-foundation-sys" -version = "0.8.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b" - -[[package]] -name = "cpufeatures" -version = "0.2.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "59ed5838eebb26a2bb2e58f6d5b5316989ae9d08bab10e0e6d103e656d1b0280" -dependencies = [ - "libc", -] - -[[package]] -name = "crypto-common" -version = "0.1.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "78c8292055d1c1df0cce5d180393dc8cce0abec0a7102adb6c7b1eef6016d60a" -dependencies = [ - "generic-array", - "typenum", -] - -[[package]] -name = "digest" -version = "0.10.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" -dependencies = [ - "block-buffer", - "crypto-common", -] - -[[package]] -name = "find-msvc-tools" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3a3076410a55c90011c298b04d0cfa770b00fa04e1e3c97d3f6c9de105a03844" - -[[package]] -name = "generic-array" -version = "0.14.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" -dependencies = [ - "typenum", - "version_check", -] - -[[package]] -name = "getrandom" -version = "0.3.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "899def5c37c4fd7b2664648c28120ecec138e4d395b459e5ca34f9cce2dd77fd" -dependencies = [ - "cfg-if", - "libc", - "r-efi", - "wasip2", -] - -[[package]] -name = "hex" -version = "0.4.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" - -[[package]] -name = "hex-literal" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e712f64ec3850b98572bffac52e2c6f282b29fe6c5fa6d42334b30be438d95c1" - -[[package]] -name = "hybrid-array" -version = "0.4.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f471e0a81b2f90ffc0cb2f951ae04da57de8baa46fa99112b062a5173a5088d0" -dependencies = [ - "typenum", -] - -[[package]] -name = "iana-time-zone" -version = "0.1.64" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "33e57f83510bb73707521ebaffa789ec8caf86f9657cad665b092b581d40e9fb" -dependencies = [ - "android_system_properties", - "core-foundation-sys", - "iana-time-zone-haiku", - "js-sys", - "log", - "wasm-bindgen", - "windows-core", -] - -[[package]] -name = "iana-time-zone-haiku" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f31827a206f56af32e590ba56d5d2d085f558508192593743f16b2306495269f" -dependencies = [ - "cc", -] - -[[package]] -name = "inout" -version = "0.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "879f10e63c20629ecabbb64a8010319738c66a5cd0c29b02d63d272b03751d01" -dependencies = [ - "block-padding 0.3.3", - "generic-array", -] - -[[package]] -name = "itoa" -version = "1.0.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ee5b5339afb4c41626dde77b7a611bd4f2c202b897852b4bcf5d03eddc61010" - -[[package]] -name = "js-sys" -version = "0.3.83" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "464a3709c7f55f1f721e5389aa6ea4e3bc6aba669353300af094b29ffbdde1d8" -dependencies = [ - "once_cell", - "wasm-bindgen", -] - -[[package]] -name = "libc" -version = "0.2.178" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "37c93d8daa9d8a012fd8ab92f088405fb202ea0b6ab73ee2482ae66af4f42091" - -[[package]] -name = "libloading" -version = "0.8.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d7c4b02199fee7c5d21a5ae7d8cfa79a6ef5bb2fc834d6e9058e89c825efdc55" -dependencies = [ - "cfg-if", - "windows-link", -] - -[[package]] -name = "lock_api" -version = "0.4.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "224399e74b87b5f3557511d98dff8b14089b3dadafcab6bb93eab67d3aace965" -dependencies = [ - "scopeguard", -] - -[[package]] -name = "log" -version = "0.4.29" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e5032e24019045c762d3c0f28f5b6b8bbf38563a65908389bf7978758920897" - -[[package]] -name = "memchr" -version = "2.7.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f52b00d39961fc5b2736ea853c9cc86238e165017a493d1d5c8eac6bdc4cc273" - -[[package]] -name = "num-traits" -version = "0.2.19" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841" -dependencies = [ - "autocfg", -] - -[[package]] -name = "once_cell" -version = "1.21.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "42f5e15c9953c5e4ccceeb2e7382a716482c34515315f7b03532b8b4e8393d2d" - -[[package]] -name = "parking_lot" -version = "0.12.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "93857453250e3077bd71ff98b6a65ea6621a19bb0f559a85248955ac12c45a1a" -dependencies = [ - "lock_api", - "parking_lot_core", -] - -[[package]] -name = "parking_lot_core" -version = "0.9.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2621685985a2ebf1c516881c026032ac7deafcda1a2c9b7850dc81e3dfcb64c1" -dependencies = [ - "cfg-if", - "libc", - "redox_syscall", - "smallvec", - "windows-link", -] - -[[package]] -name = "ppv-lite86" -version = "0.2.21" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85eae3c4ed2f50dcfe72643da4befc30deadb458a9b590d720cde2f2b1e97da9" -dependencies = [ - "zerocopy", -] - -[[package]] -name = "proc-macro2" -version = "1.0.103" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ee95bc4ef87b8d5ba32e8b7714ccc834865276eab0aed5c9958d00ec45f49e8" -dependencies = [ - "unicode-ident", -] - -[[package]] -name = "quote" -version = "1.0.42" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a338cc41d27e6cc6dce6cefc13a0729dfbb81c262b1f519331575dd80ef3067f" -dependencies = [ - "proc-macro2", -] - -[[package]] -name = "r-efi" -version = "5.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "69cdb34c158ceb288df11e18b4bd39de994f6657d83847bdffdbd7f346754b0f" - -[[package]] -name = "rand" -version = "0.9.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6db2770f06117d490610c7488547d543617b21bfa07796d7a12f6f1bd53850d1" -dependencies = [ - "rand_chacha", - "rand_core", -] - -[[package]] -name = "rand_chacha" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3022b5f1df60f26e1ffddd6c66e8aa15de382ae63b3a0c1bfc0e4d3e3f325cb" -dependencies = [ - "ppv-lite86", - "rand_core", -] - -[[package]] -name = "rand_core" -version = "0.9.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "99d9a13982dcf210057a8a78572b2217b667c3beacbf3a0d8b454f6f82837d38" -dependencies = [ - "getrandom", -] - -[[package]] -name = "redox_syscall" -version = "0.5.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed2bf2547551a7053d6fdfafda3f938979645c44812fbfcda098faae3f1a362d" -dependencies = [ - "bitflags 2.10.0", -] - -[[package]] -name = "regex" -version = "1.12.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "843bc0191f75f3e22651ae5f1e72939ab2f72a4bc30fa80a066bd66edefc24d4" -dependencies = [ - "aho-corasick", - "memchr", - "regex-automata", - "regex-syntax", -] - -[[package]] -name = "regex-automata" -version = "0.4.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5276caf25ac86c8d810222b3dbb938e512c55c6831a10f3e6ed1c93b84041f1c" -dependencies = [ - "aho-corasick", - "memchr", - "regex-syntax", -] - -[[package]] -name = "regex-syntax" -version = "0.8.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a2d987857b319362043e95f5353c0535c1f58eec5336fdfcf626430af7def58" - -[[package]] -name = "rustversion" -version = "1.0.22" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b39cdef0fa800fc44525c84ccb54a029961a8215f9619753635a9c0d2538d46d" - -[[package]] -name = "ryu" -version = "1.0.21" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62049b2877bf12821e8f9ad256ee38fdc31db7387ec2d3b3f403024de2034aea" - -[[package]] -name = "scopeguard" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" - -[[package]] -name = "serde" -version = "1.0.228" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a8e94ea7f378bd32cbbd37198a4a91436180c5bb472411e48b5ec2e2124ae9e" -dependencies = [ - "serde_core", - "serde_derive", -] - -[[package]] -name = "serde_core" -version = "1.0.228" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41d385c7d4ca58e59fc732af25c3983b67ac852c1a25000afe1175de458b67ad" -dependencies = [ - "serde_derive", -] - -[[package]] -name = "serde_derive" -version = "1.0.228" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d540f220d3187173da220f885ab66608367b6574e925011a9353e4badda91d79" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.111", -] - -[[package]] -name = "serde_json" -version = "1.0.145" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "402a6f66d8c709116cf22f558eab210f5a50187f702eb4d7e5ef38d9a7f1c79c" -dependencies = [ - "itoa", - "memchr", - "ryu", - "serde", - "serde_core", -] - -[[package]] -name = "sha2" -version = "0.10.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a7507d819769d01a365ab707794a4084392c824f54a7a6a7862f8c3d0892b283" -dependencies = [ - "cfg-if", - "cpufeatures", - "digest", -] - -[[package]] -name = "shlex" -version = "1.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" - -[[package]] -name = "smallvec" -version = "1.15.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67b1b7a3b5fe4f1376887184045fcf45c69e92af734b7aaddc05fb777b6fbd03" - -[[package]] -name = "static_init" -version = "1.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8bae1df58c5fea7502e8e352ec26b5579f6178e1fdb311e088580c980dee25ed" -dependencies = [ - "bitflags 1.3.2", - "cfg_aliases 0.2.1", - "libc", - "parking_lot", - "parking_lot_core", - "static_init_macro", - "winapi", -] - -[[package]] -name = "static_init_macro" -version = "1.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1389c88ddd739ec6d3f8f83343764a0e944cd23cfbf126a9796a714b0b6edd6f" -dependencies = [ - "cfg_aliases 0.1.1", - "memchr", - "proc-macro2", - "quote", - "syn 1.0.109", -] - -[[package]] -name = "syn" -version = "1.0.109" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" -dependencies = [ - "proc-macro2", - "quote", - "unicode-ident", -] - -[[package]] -name = "syn" -version = "2.0.111" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "390cc9a294ab71bdb1aa2e99d13be9c753cd2d7bd6560c77118597410c4d2e87" -dependencies = [ - "proc-macro2", - "quote", - "unicode-ident", -] - -[[package]] -name = "typenum" -version = "1.19.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "562d481066bde0658276a35467c4af00bdc6ee726305698a55b86e61d7ad82bb" - -[[package]] -name = "unicode-ident" -version = "1.0.22" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9312f7c4f6ff9069b165498234ce8be658059c6728633667c526e27dc2cf1df5" - -[[package]] -name = "unshell-crypt" -version = "0.1.0" -dependencies = [ - "aes", - "block-padding 0.4.2", - "cbc", - "getrandom", - "hex", - "hex-literal", - "regex", - "sha2", -] - -[[package]] -name = "unshell-lib" -version = "0.0.0" -dependencies = [ - "chrono", - "serde", - "serde_json", - "unshell-obfuscate", -] - -[[package]] -name = "unshell-manager" -version = "0.0.0" -dependencies = [ - "bincode", - "libc", - "libloading", - "rand", - "unshell-lib", - "unshell-obfuscate", -] - -[[package]] -name = "unshell-obfuscate" -version = "0.0.0" -dependencies = [ - "proc-macro2", - "quote", - "rand", - "static_init", - "syn 2.0.111", - "unshell-crypt", -] - -[[package]] -name = "unty" -version = "0.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d49784317cd0d1ee7ec5c716dd598ec5b4483ea832a2dced265471cc0f690ae" - -[[package]] -name = "version_check" -version = "0.9.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a" - -[[package]] -name = "virtue" -version = "0.0.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "051eb1abcf10076295e815102942cc58f9d5e3b4560e46e53c21e8ff6f3af7b1" - -[[package]] -name = "wasip2" -version = "1.0.1+wasi-0.2.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0562428422c63773dad2c345a1882263bbf4d65cf3f42e90921f787ef5ad58e7" -dependencies = [ - "wit-bindgen", -] - -[[package]] -name = "wasm-bindgen" -version = "0.2.106" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d759f433fa64a2d763d1340820e46e111a7a5ab75f993d1852d70b03dbb80fd" -dependencies = [ - "cfg-if", - "once_cell", - "rustversion", - "wasm-bindgen-macro", - "wasm-bindgen-shared", -] - -[[package]] -name = "wasm-bindgen-macro" -version = "0.2.106" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "48cb0d2638f8baedbc542ed444afc0644a29166f1595371af4fecf8ce1e7eeb3" -dependencies = [ - "quote", - "wasm-bindgen-macro-support", -] - -[[package]] -name = "wasm-bindgen-macro-support" -version = "0.2.106" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cefb59d5cd5f92d9dcf80e4683949f15ca4b511f4ac0a6e14d4e1ac60c6ecd40" -dependencies = [ - "bumpalo", - "proc-macro2", - "quote", - "syn 2.0.111", - "wasm-bindgen-shared", -] - -[[package]] -name = "wasm-bindgen-shared" -version = "0.2.106" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cbc538057e648b67f72a982e708d485b2efa771e1ac05fec311f9f63e5800db4" -dependencies = [ - "unicode-ident", -] - -[[package]] -name = "winapi" -version = "0.3.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" -dependencies = [ - "winapi-i686-pc-windows-gnu", - "winapi-x86_64-pc-windows-gnu", -] - -[[package]] -name = "winapi-i686-pc-windows-gnu" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" - -[[package]] -name = "winapi-x86_64-pc-windows-gnu" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" - -[[package]] -name = "windows-core" -version = "0.62.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b8e83a14d34d0623b51dce9581199302a221863196a1dde71a7663a4c2be9deb" -dependencies = [ - "windows-implement", - "windows-interface", - "windows-link", - "windows-result", - "windows-strings", -] - -[[package]] -name = "windows-implement" -version = "0.60.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "053e2e040ab57b9dc951b72c264860db7eb3b0200ba345b4e4c3b14f67855ddf" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.111", -] - -[[package]] -name = "windows-interface" -version = "0.59.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f316c4a2570ba26bbec722032c4099d8c8bc095efccdc15688708623367e358" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.111", -] - -[[package]] -name = "windows-link" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0805222e57f7521d6a62e36fa9163bc891acd422f971defe97d64e70d0a4fe5" - -[[package]] -name = "windows-result" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7781fa89eaf60850ac3d2da7af8e5242a5ea78d1a11c49bf2910bb5a73853eb5" -dependencies = [ - "windows-link", -] - -[[package]] -name = "windows-strings" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7837d08f69c77cf6b07689544538e017c1bfcf57e34b4c0ff58e6c2cd3b37091" -dependencies = [ - "windows-link", -] - -[[package]] -name = "wit-bindgen" -version = "0.46.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f17a85883d4e6d00e8a97c586de764dabcc06133f7f1d55dce5cdc070ad7fe59" - -[[package]] -name = "zerocopy" -version = "0.8.31" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fd74ec98b9250adb3ca554bdde269adf631549f51d8a8f8f0a10b50f1cb298c3" -dependencies = [ - "zerocopy-derive", -] - -[[package]] -name = "zerocopy-derive" -version = "0.8.31" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d8a8d209fdf45cf5138cbb5a506f6b52522a25afccc534d1475dad8e31105c6a" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.111", -] diff --git a/ush-manager/Cargo.toml b/ush-manager/Cargo.toml deleted file mode 100644 index 7e7d760..0000000 --- a/ush-manager/Cargo.toml +++ /dev/null @@ -1,20 +0,0 @@ -[package] -name = "ush-manager" -version.workspace = true -edition.workspace = true -authors.workspace = true -include.workspace = true - -[features] -log = ["unshell/log"] -log_debug = ["unshell/log_debug"] - -obfuscate = ["unshell/obfuscate"] - -[dependencies] -unshell = {path = "../", default-features = false} - -bincode = "2.0.1" -libc = "0.2.178" -libloading = "0.8.9" -rand = "0.9.2" diff --git a/ush-manager/src/interface.rs b/ush-manager/src/interface.rs deleted file mode 100644 index b5a3b35..0000000 --- a/ush-manager/src/interface.rs +++ /dev/null @@ -1,39 +0,0 @@ -// use std::collections::HashMap; -use std::fmt::Debug; -use unshell::Result; -use unshell::config::RuntimeConfig; - -use crate::ModuleRuntime; - -pub struct PayloadConfig { - pub id: &'static str, - pub components: Vec, - pub runtime_config: Vec, -} - -#[derive(Clone)] -pub struct NamedComponent { - pub name: &'static str, - - // + Sync + Sync + Sync + Sync + Sync + Sync + Sync + Sync - pub get_interface: &'static (dyn Fn() -> Option<&'static (dyn InterfaceWrapper + Sync)> + Sync), - pub start_runtime: - &'static (dyn Fn(&'static RuntimeConfig) -> Result> + Sync), -} - -impl Debug for NamedComponent { - fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - f.debug_struct("NamedComponent") - .field("name", &self.name) - // .field("get_interface", &self.get_interface) - // .field("start_runtime", &self.start_runtime) - .finish() - } -} - -/// Trait that wraps the get_interface() function inside of components -pub trait InterfaceWrapper: Send + Sync { - fn get_interface(&self) -> Option - where - Self: Sized; -} diff --git a/ush-manager/src/lib.rs b/ush-manager/src/lib.rs deleted file mode 100644 index f868907..0000000 --- a/ush-manager/src/lib.rs +++ /dev/null @@ -1,28 +0,0 @@ -mod manager; -mod module; -mod module_interface; -// pub mod network; -mod proc_load; - -pub mod interface; - -use std::sync::{Arc, Mutex}; - -pub use manager::Manager; -pub use module::Module; - -pub use interface::{InterfaceWrapper, NamedComponent, PayloadConfig}; - -// extern crate unshell_lib; -use unshell::Result; - -/// Trait for defining modules that have a runtime. -pub trait ModuleRuntime: Send + Sync { - fn init(&mut self, manager: Arc>) -> Result<()>; - - /// Returns true if the module is running. - /// After returning false, the module will be dropped. - fn is_running(&self) -> bool; - /// Consumes the module, implementation should kill whatever is running. - fn kill(self: Box); -} diff --git a/ush-manager/src/manager/announcement.rs b/ush-manager/src/manager/announcement.rs deleted file mode 100644 index 034377b..0000000 --- a/ush-manager/src/manager/announcement.rs +++ /dev/null @@ -1,16 +0,0 @@ -use crate::Manager; -use unshell::Announcement; - -impl Manager { - pub fn recv_announcement(&mut self, announcement: &Announcement) { - match announcement { - Announcement::TestAnnouncement(str) => { - println!("Got test announcement: {}", str) - } // Announcement::GetRuntimes => todo!(), - // Announcement::GetRuntimesAck(_) => todo!(), - // Announcement::StartRuntime(runtime_config) => todo!(), - // Announcement::StartRuntimeAck(_) => todo!(), - // _ => {} - } - } -} diff --git a/ush-manager/src/manager/connection.rs b/ush-manager/src/manager/connection.rs deleted file mode 100644 index 186ab71..0000000 --- a/ush-manager/src/manager/connection.rs +++ /dev/null @@ -1,36 +0,0 @@ -use unshell_lib::{Announcement, Result}; - -// use crate::network::Stream; - -use crate::Manager; - -impl Manager { - pub fn add_connection(&mut self, connection: Box>) { - self.connections.push(connection); - } - - pub fn prune_connections(&mut self) { - self.connections.retain(|c| c.is_alive()); - } - - pub fn recv_connection_announcements(&mut self) { - // Collect all incoming announcements - let announcements = self - .connections - .iter_mut() - .map(|c| c.try_read()) - .flat_map(|array| array) - .collect::>(); - - for announcement in announcements { - self.recv_announcement(&announcement) - } - } - - // pub fn broadcast(&mut self, announcement: Announcement) -> Result<()> { - // for connection in &mut self.connections { - // connection.write(announcement.clone())?; - // } - // Ok(()) - // } -} diff --git a/ush-manager/src/manager/mod.rs b/ush-manager/src/manager/mod.rs deleted file mode 100644 index f64d1d6..0000000 --- a/ush-manager/src/manager/mod.rs +++ /dev/null @@ -1,196 +0,0 @@ -mod announcement; -// mod connection; - -use std::{ - collections::HashMap, - sync::{Arc, Mutex}, - thread::{self, JoinHandle}, - time::Duration, -}; - -use unshell::obfuscate::symbol; -use unshell::{Result, config::RuntimeConfig, debug, warn}; - -use crate::{ - ModuleRuntime, - interface::{NamedComponent, PayloadConfig}, - module::Module, - // network::Stream, -}; - -// #[derive(Debug)] -pub struct Manager { - id: &'static str, - - handle: Option>, - - pub modules: Vec, - - components: HashMap, - active_runtimes: Vec>, - // pub connections: Vec>>, -} - -// static mut MANAGER_RUNTIME: Option>> = None; - -impl Manager { - fn new(id: &'static str, components: Vec, modules: Vec) -> Self { - Self { - id, - handle: None, - - modules, - components: components - .into_iter() - .map(|c| (c.name.to_string(), c)) - .collect(), - active_runtimes: Vec::new(), - // connections: Vec::new(), - } - } - - /// Create Manager, and run initialization for each Module - #[allow(static_mut_refs)] - pub fn start(config: &'static PayloadConfig, modules: Vec) -> Arc> { - // Construct self - let mut this = Self::new(&config.id, config.components.clone(), modules); - - debug!("Imported {} base components", this.components.len()); - debug!("Imported {} base runtimes", &config.runtime_config.len()); - - // Load each of the pre-prepared modules - this.load_components(); - - let this = Arc::new(Mutex::new(this)); - - debug!("Creating runtimes..."); - for runtime in &config.runtime_config { - Self::create_runtime(this.clone(), runtime); - } - - debug!("Starting runtimes..."); - for runtime in &mut this.lock().unwrap().active_runtimes { - if let Err(e) = runtime.init(this.clone()) { - warn!("Failed to start runtime: {}", e); - } - } - - this.lock().unwrap().handle = Some(Self::start_thread(this.clone())); - - this - } - - fn load_components(&mut self) { - for module in &self.modules { - // Load get_components function from shared object library - let component_func = match module - .get_symbol:: Vec>(symbol!("get_components").as_bytes()) - { - Ok(func) => func, - Err(_) => { - warn!("get_components function not found"); - continue; - } - }; - - let components = component_func(); - let component_name = "TODO"; //TODO: Make this actually load component name - - debug!("{} - Retrieved payload metadata", component_name); - - // Add each component into self - for c in components { - debug!("{} - Found component '{}'", "TODO", c.name); - self.components.insert(c.name.to_owned(), c); - } - } - } - - /// The manager thread. receives announcements, and kills runtimes. - fn start_thread(this: Arc>) -> JoinHandle<()> { - thread::spawn(move || { - loop { - thread::sleep(Duration::from_millis(10)); - - let mut this_lock = this.lock().unwrap(); - - if this_lock.active_runtimes.len() <= 0 { - debug!("There are no more runtimes! Exiting..."); - break; - } - - this_lock.active_runtimes.retain(|runtime| { - if runtime.is_running() { - true - } else { - debug!("Runtime exited!"); //TODO: Make this better - false - } - }); - - // // Read announcements - // this_lock.recv_connection_announcements(); - - // // Prune dead connections - // this_lock.prune_connections(); - - drop(this_lock) - } - }) - } - - /// Wait for manager thread to finish. - pub fn join(this: Arc>) { - loop { - if this.lock().unwrap().handle.as_ref().unwrap().is_finished() { - break; - } - - thread::sleep(Duration::from_millis(100)); - } - } - - /// Start a runtime - fn create_runtime<'a>(this: Arc>, runtime: &'static RuntimeConfig) { - let mut this_lock = this.lock().unwrap(); - - let component = match this_lock.components.get(&runtime.parent_component) { - Some(component) => component, - None => { - warn!( - "Could not find component '{}' which is referenced by runtime: {}", - runtime.parent_component, runtime.name - ); - return; - } - }; - - debug!("Starting runtime: {}", runtime.name); - - let runtime = match (*component.start_runtime)(runtime) { - Ok(runtime) => runtime, - Err(e) => { - warn!("Failed to start runtime: {:?}", e); - return; - } - }; - - this_lock.active_runtimes.push(runtime); - } - - pub fn add_runtime(this: Arc>, runtime: &'static RuntimeConfig) -> Result<()> { - Self::create_runtime(this.clone(), runtime); - - this.lock() - .unwrap() - .active_runtimes - .iter_mut() - .last() - .unwrap() - .init(this.clone()) - } - - pub fn get_name(&self) -> &str { - self.id - } -} diff --git a/ush-manager/src/module.rs b/ush-manager/src/module.rs deleted file mode 100644 index 68483a5..0000000 --- a/ush-manager/src/module.rs +++ /dev/null @@ -1,52 +0,0 @@ -use libloading::{Library, Symbol}; -use unshell::{ - ModuleError, Result, - logger::{self, SetupLogger, logger}, - warn, -}; - -use crate::proc_load::memfd_create_dlopen; - -pub struct Module { - lib: Library, -} - -impl Module { - pub fn new(path: &str) -> Result { - let lib = unsafe { Library::new(&path) } - .map_err(|e| ModuleError::LibLoadingError(e.to_string()))?; - - let this = Self { lib }; - - if let Ok(setup_logger) = this.get_symbol::(b"setup_logger") { - setup_logger(logger::logger()); - } else { - warn!("setup_logger not found"); - } - - Ok(this) - } - - // TODO: Implement actual reflective ELF loading (possibly even custom format) - // Look at https://github.com/weizhiao/rust-elfloader - pub fn new_bytes(bytes: &[u8]) -> Result { - let lib = - memfd_create_dlopen(bytes).map_err(|e| ModuleError::Error(e.to_string().into()))?; - - let this = Self { lib }; - - if let Ok(setup_logger) = this.get_symbol::(b"setup_logger") { - setup_logger(logger()); - } else { - warn!("setup_logger not found"); - } - - Ok(this) - } - pub fn get_symbol(&self, symbol: &[u8]) -> Result> { - let symbol = unsafe { self.lib.get::(symbol) } - .map_err(|e| ModuleError::LinkError(format!("Failed to load symbol: {}", e)))?; - - Ok(symbol) - } -} diff --git a/ush-manager/src/module_interface.rs b/ush-manager/src/module_interface.rs deleted file mode 100644 index 8f62e97..0000000 --- a/ush-manager/src/module_interface.rs +++ /dev/null @@ -1,54 +0,0 @@ -/// "Module Interface" helper macro that creates a struct with function pointers -/// Useful for defining and requiring modules' functions accross FFI boundry. -#[macro_export] -macro_rules! module_interface { - ($(#[$struct_meta:meta])* $interface_name:ident { $($(#[$fn_meta:meta])* fn $fn_name:ident $(<$($gen:ident),+ $(,)?>)?($($arg:ident : $ty:ty),* $(,)?) $(-> $ret:ty)? $(where $($where_clause:tt)*)?);* $(;)? }) => { - - #[repr(C)] - #[allow(non_camel_case_types)] - #[derive(Clone, Copy)] - #[allow(improper_ctypes_definitions)] - $(#[$struct_meta])* - pub struct $interface_name { - $( - // This line will FAIL TO COMPILE if you use generics in the macro input. - // You MUST use concrete types like *mut c_void for "generic" data. - $fn_name: extern "C" fn($($ty),*) $(-> $ret)?, - )* - } - - impl $interface_name { - $( - #[inline(always)] - $(#[$fn_meta])* // Propagate function attributes - // This is the fix for the `impl` block. - // It adds the captured generics and where-clause to the wrapper function. - pub fn $fn_name $(<$($gen),+>)? (&self, $($arg: $ty),*) $(-> $ret)? - $(where $($where_clause)*)? - { - (self.$fn_name)($($arg),*) - } - )* - - /// Create from raw function pointers - /// - /// # Safety - /// - /// The caller must ensure all function pointers are valid and have - /// the correct signatures - pub fn from_raw( - $($fn_name: extern "C" fn($($ty),*) $(-> $ret)?),* - ) -> Self { - Self { - $($fn_name),* - } - } - } - - // impl crate::module::Interface for $interface_name { - // fn as_any(self: Box) -> Box { - // self - // } - // } - }; -} diff --git a/ush-manager/src/network/mod.rs b/ush-manager/src/network/mod.rs deleted file mode 100644 index 91fe6eb..0000000 --- a/ush-manager/src/network/mod.rs +++ /dev/null @@ -1,30 +0,0 @@ -// mod connection; -mod tcp_stream; - -pub use tcp_stream::TcpStream; - -use unshell_lib::ModuleError; - -/// This is the data transmission type -pub trait Stream: Send + Sync { - // fn get_info(&self) -> String; - fn is_alive(&self) -> bool; - - fn has_recv(&self) -> bool; - - /// Possibly blocking stream read function - fn read(&mut self) -> Vec; - - /// Non-blocking read function - fn try_read(&mut self) -> Vec { - if self.has_recv() { - self.read() - } else { - Vec::new() - } - } - - fn write(&mut self, data: T) -> Result<(), ModuleError>; - - fn try_clone(&self) -> Result + Send + Sync>, ModuleError>; -} diff --git a/ush-manager/src/network/tcp_stream.rs b/ush-manager/src/network/tcp_stream.rs deleted file mode 100644 index a45f4c3..0000000 --- a/ush-manager/src/network/tcp_stream.rs +++ /dev/null @@ -1,128 +0,0 @@ -use std::{ - io::{Read, Write}, - net, - sync::{ - Arc, - atomic::{AtomicBool, Ordering}, - }, -}; - -use unshell_lib::{Announcement, ModuleError, Result, debug}; - -use crate::network::Stream; - -pub struct TcpStream(Arc, net::TcpStream); - -impl TcpStream { - pub fn new(stream: net::TcpStream) -> Self { - stream.set_nonblocking(true).unwrap(); - Self(Arc::new(AtomicBool::new(true)), stream) - } - - // Call this when the stream ends - fn disconnected(&mut self) { - self.0.store(false, Ordering::Relaxed); - } -} - -impl Stream for TcpStream { - fn is_alive(&self) -> bool { - // if self.1.take_error().unwrap_or(None).is_some() { - // // self.1.pe - // warn!("Disconnected #################"); - // return true; - // } else { - // return false; - // } - - // let mut buf = [0u8; 1]; - // match self.1.peek(&mut buf) { - // Ok(n) => n == 1, - // Err(_) => false, - // } - - let mut buf = [0u8; 1]; - match self.1.peek(&mut buf) { - Ok(0) => false, // Connection closed (EOF) - Ok(_) => true, // Data available or connection alive - Err(ref e) if e.kind() == std::io::ErrorKind::WouldBlock => true, // No data but alive - Err(_) => false, // Connection error - } - - // true - - // self.0.load(Ordering::Relaxed) - } - - fn has_recv(&self) -> bool { - let mut buf = [0u8; 1]; - match self.1.peek(&mut buf) { - Ok(n) if n > 0 => true, // Data is available - Ok(_) => false, // EOF (connection closed) - Err(ref e) if e.kind() == std::io::ErrorKind::WouldBlock => false, // No data - Err(_) => false, - } - // false - } - - fn read(&mut self) -> Vec { - let mut ret = Vec::new(); - - while self.has_recv() { - let mut size_buf = [0u8; 4]; - match self.1.read_exact(&mut size_buf) { - Ok(()) => {} - Err(_) => { - self.disconnected(); - break; - } - }; - let size = u32::from_be_bytes(size_buf); - - let mut buf = vec![0u8; size as usize]; - - match self.1.read_exact(&mut buf) { - Ok(()) => {} - Err(_) => { - self.disconnected(); - } - } - - if let Some(a) = Announcement::decode(&buf) { - ret.push(a); - } else { - debug!("Malformed data"); - } - } - - ret - } - - fn write(&mut self, announcement: Announcement) -> Result<()> { - let bytes = announcement.encode(); - - // Write length of bytes - self.1 - .write_all(&u32::to_be_bytes(bytes.len() as u32)) - .map_err(|e| ModuleError::Error(e.to_string().into()))?; - // Write data - self.1 - .write_all(&bytes) - .map_err(|e| ModuleError::Error(e.to_string().into()))?; - // Flush data - self.1 - .flush() - .map_err(|e| ModuleError::Error(e.to_string().into()))?; - - Ok(()) - } - - fn try_clone(&self) -> Result + Send + Sync>> { - Ok(Box::new(Self( - self.0.clone(), - self.1 - .try_clone() - .map_err(|e| ModuleError::Error(e.to_string().into()))?, - ))) - } -} diff --git a/ush-manager/src/proc_load.rs b/ush-manager/src/proc_load.rs deleted file mode 100644 index 45e48b5..0000000 --- a/ush-manager/src/proc_load.rs +++ /dev/null @@ -1,64 +0,0 @@ -// Load a shared object by saving bytes to a filesystem in /proc - -use std::{ffi::CString, io}; - -use libloading::Library; -use unshell::{ModuleError, Result, warn}; - -// The `memfd_create` syscall flags (MFD_CLOEXEC is common and good practice) -const MFD_CLOEXEC: u32 = 0x0001; -const MFD_ALLOW_SEALING: u32 = 0x0002; - -pub fn memfd_create_dlopen(payload: &[u8]) -> Result { - use rand::distr::{Alphanumeric, SampleString}; - - let string = Alphanumeric.sample_string(&mut rand::rng(), 16); - - // 1. Create the anonymous in-memory file descriptor using the raw syscall - let c_name = CString::new(string) - .map_err(|e| ModuleError::LibLoadingError(format!("CString conversion failed: {e:?}")))?; - - let fd = unsafe { libc::memfd_create(c_name.as_ptr(), MFD_CLOEXEC | MFD_ALLOW_SEALING) }; - - if fd < 0 { - return Err(ModuleError::LibLoadingError(format!( - "IO Error {:?}", - io::Error::last_os_error().to_string() - ))); - } - - // 2. Write the payload bytes to the in-memory file - let bytes_written = - unsafe { libc::write(fd, payload.as_ptr() as *const libc::c_void, payload.len()) }; - - if bytes_written != payload.len() as isize { - // If write fails or is incomplete, clean up the file descriptor - unsafe { - libc::close(fd); - } - return Err(ModuleError::LibLoadingError( - "Failed to write full payload to memfd".into(), - )); - } - - // Optional: Seal the file to prevent modification, common for security/integrity - // Note: The MFD_ALLOW_SEALING flag must be set during creation for this to work. - let seals = libc::F_SEAL_GROW | libc::F_SEAL_SHRINK | libc::F_SEAL_WRITE; - if unsafe { libc::fcntl(fd, libc::F_ADD_SEALS, seals) } == -1 { - // Log a warning but continue if sealing fails (e.g., due to permissions) - warn!( - "memfd_create_dlopen: Failed to apply seals. Error: {}", - io::Error::last_os_error() - ); - } - - // 3. Construct the virtual path to the in-memory file - // This path is necessary for dlopen to work, as dlopen expects a filesystem path. - let dl_path = format!("/proc/self/fd/{}", fd); - - // 4. Use dlopen (via libloading) on the virtual path - Ok(unsafe { - Library::new(&dl_path) - .map_err(|e| ModuleError::LibLoadingError(format!("Failed to import library: {}", e)))? - }) -} diff --git a/ush-server/Cargo.lock b/ush-server/Cargo.lock deleted file mode 100644 index 52bed99..0000000 --- a/ush-server/Cargo.lock +++ /dev/null @@ -1,1937 +0,0 @@ -# This file is automatically @generated by Cargo. -# It is not intended for manual editing. -version = 4 - -[[package]] -name = "aes" -version = "0.8.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b169f7a6d4742236a0a00c541b845991d0ac43e546831af1249753ab4c3aa3a0" -dependencies = [ - "cfg-if", - "cipher", - "cpufeatures", -] - -[[package]] -name = "aho-corasick" -version = "1.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ddd31a130427c27518df266943a5308ed92d4b226cc639f5a8f1002816174301" -dependencies = [ - "memchr", -] - -[[package]] -name = "android_system_properties" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "819e7219dbd41043ac279b19830f2efc897156490d7fd6ea916720117ee66311" -dependencies = [ - "libc", -] - -[[package]] -name = "anstream" -version = "0.6.21" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43d5b281e737544384e969a5ccad3f1cdd24b48086a0fc1b2a5262a26b8f4f4a" -dependencies = [ - "anstyle", - "anstyle-parse", - "anstyle-query", - "anstyle-wincon", - "colorchoice", - "is_terminal_polyfill", - "utf8parse", -] - -[[package]] -name = "anstyle" -version = "1.0.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5192cca8006f1fd4f7237516f40fa183bb07f8fbdfedaa0036de5ea9b0b45e78" - -[[package]] -name = "anstyle-parse" -version = "0.2.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4e7644824f0aa2c7b9384579234ef10eb7efb6a0deb83f9630a49594dd9c15c2" -dependencies = [ - "utf8parse", -] - -[[package]] -name = "anstyle-query" -version = "1.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "40c48f72fd53cd289104fc64099abca73db4166ad86ea0b4341abe65af83dadc" -dependencies = [ - "windows-sys 0.61.2", -] - -[[package]] -name = "anstyle-wincon" -version = "3.0.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "291e6a250ff86cd4a820112fb8898808a366d8f9f58ce16d1f538353ad55747d" -dependencies = [ - "anstyle", - "once_cell_polyfill", - "windows-sys 0.61.2", -] - -[[package]] -name = "atomic-waker" -version = "1.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0" - -[[package]] -name = "autocfg" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c08606f8c3cbf4ce6ec8e28fb0014a2c086708fe954eaa885384a6165172e7e8" - -[[package]] -name = "aws-lc-rs" -version = "1.15.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6b5ce75405893cd713f9ab8e297d8e438f624dde7d706108285f7e17a25a180f" -dependencies = [ - "aws-lc-sys", - "untrusted", - "zeroize", -] - -[[package]] -name = "aws-lc-sys" -version = "0.34.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "179c3777a8b5e70e90ea426114ffc565b2c1a9f82f6c4a0c5a34aa6ef5e781b6" -dependencies = [ - "cc", - "cmake", - "dunce", - "fs_extra", -] - -[[package]] -name = "axum" -version = "0.8.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b098575ebe77cb6d14fc7f32749631a6e44edbef6b796f89b020e99ba20d425" -dependencies = [ - "axum-core", - "bytes", - "form_urlencoded", - "futures-util", - "http", - "http-body", - "http-body-util", - "hyper", - "hyper-util", - "itoa", - "matchit", - "memchr", - "mime", - "percent-encoding", - "pin-project-lite", - "serde_core", - "serde_json", - "serde_path_to_error", - "serde_urlencoded", - "sync_wrapper", - "tokio", - "tower", - "tower-layer", - "tower-service", - "tracing", -] - -[[package]] -name = "axum-core" -version = "0.5.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "59446ce19cd142f8833f856eb31f3eb097812d1479ab224f54d72428ca21ea22" -dependencies = [ - "bytes", - "futures-core", - "http", - "http-body", - "http-body-util", - "mime", - "pin-project-lite", - "sync_wrapper", - "tower-layer", - "tower-service", - "tracing", -] - -[[package]] -name = "axum-extra" -version = "0.12.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dbfe9f610fe4e99cf0cfcd03ccf8c63c28c616fe714d80475ef731f3b13dd21b" -dependencies = [ - "axum", - "axum-core", - "bytes", - "futures-core", - "futures-util", - "headers", - "http", - "http-body", - "http-body-util", - "mime", - "pin-project-lite", - "tower-layer", - "tower-service", - "tracing", -] - -[[package]] -name = "base64" -version = "0.22.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" - -[[package]] -name = "bcrypt" -version = "0.17.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "abaf6da45c74385272ddf00e1ac074c7d8a6c1a1dda376902bd6a427522a8b2c" -dependencies = [ - "base64", - "blowfish", - "getrandom 0.3.4", - "subtle", - "zeroize", -] - -[[package]] -name = "bincode" -version = "2.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "36eaf5d7b090263e8150820482d5d93cd964a81e4019913c972f4edcc6edb740" -dependencies = [ - "bincode_derive", - "serde", - "unty", -] - -[[package]] -name = "bincode_derive" -version = "2.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf95709a440f45e986983918d0e8a1f30a9b1df04918fc828670606804ac3c09" -dependencies = [ - "virtue", -] - -[[package]] -name = "bitflags" -version = "1.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" - -[[package]] -name = "bitflags" -version = "2.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "812e12b5285cc515a9c72a5c1d3b6d46a19dac5acfef5265968c166106e31dd3" - -[[package]] -name = "block-buffer" -version = "0.10.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71" -dependencies = [ - "generic-array", -] - -[[package]] -name = "block-padding" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a8894febbff9f758034a5b8e12d87918f56dfc64a8e1fe757d65e29041538d93" -dependencies = [ - "generic-array", -] - -[[package]] -name = "block-padding" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "710f1dd022ef4e93f8a438b4ba958de7f64308434fa6a87104481645cc30068b" -dependencies = [ - "hybrid-array", -] - -[[package]] -name = "blowfish" -version = "0.9.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e412e2cd0f2b2d93e02543ceae7917b3c70331573df19ee046bcbc35e45e87d7" -dependencies = [ - "byteorder", - "cipher", -] - -[[package]] -name = "bumpalo" -version = "3.19.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "46c5e41b57b8bba42a04676d81cb89e9ee8e859a1a66f80a5a72e1cb76b34d43" - -[[package]] -name = "byteorder" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" - -[[package]] -name = "bytes" -version = "1.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b35204fbdc0b3f4446b89fc1ac2cf84a8a68971995d0bf2e925ec7cd960f9cb3" - -[[package]] -name = "cbc" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26b52a9543ae338f279b96b0b9fed9c8093744685043739079ce85cd58f289a6" -dependencies = [ - "cipher", -] - -[[package]] -name = "cc" -version = "1.2.48" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c481bdbf0ed3b892f6f806287d72acd515b352a4ec27a208489b8c1bc839633a" -dependencies = [ - "find-msvc-tools", - "jobserver", - "libc", - "shlex", -] - -[[package]] -name = "cfg-if" -version = "1.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9330f8b2ff13f34540b44e946ef35111825727b38d33286ef986142615121801" - -[[package]] -name = "cfg_aliases" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fd16c4719339c4530435d38e511904438d07cce7950afa3718a84ac36c10e89e" - -[[package]] -name = "cfg_aliases" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "613afe47fcd5fac7ccf1db93babcb082c5994d996f20b8b159f2ad1658eb5724" - -[[package]] -name = "chrono" -version = "0.4.42" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "145052bdd345b87320e369255277e3fb5152762ad123a901ef5c262dd38fe8d2" -dependencies = [ - "iana-time-zone", - "js-sys", - "num-traits", - "wasm-bindgen", - "windows-link", -] - -[[package]] -name = "cipher" -version = "0.4.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "773f3b9af64447d2ce9850330c473515014aa235e6a783b02db81ff39e4a3dad" -dependencies = [ - "crypto-common", - "inout", -] - -[[package]] -name = "clap" -version = "4.5.53" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c9e340e012a1bf4935f5282ed1436d1489548e8f72308207ea5df0e23d2d03f8" -dependencies = [ - "clap_builder", - "clap_derive", -] - -[[package]] -name = "clap_builder" -version = "4.5.53" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d76b5d13eaa18c901fd2f7fca939fefe3a0727a953561fefdf3b2922b8569d00" -dependencies = [ - "anstream", - "anstyle", - "clap_lex", - "strsim", -] - -[[package]] -name = "clap_derive" -version = "4.5.49" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a0b5487afeab2deb2ff4e03a807ad1a03ac532ff5a2cee5d86884440c7f7671" -dependencies = [ - "heck", - "proc-macro2", - "quote", - "syn 2.0.111", -] - -[[package]] -name = "clap_lex" -version = "0.7.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1d728cc89cf3aee9ff92b05e62b19ee65a02b5702cff7d5a377e32c6ae29d8d" - -[[package]] -name = "cmake" -version = "0.1.54" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7caa3f9de89ddbe2c607f4101924c5abec803763ae9534e4f4d7d8f84aa81f0" -dependencies = [ - "cc", -] - -[[package]] -name = "colorchoice" -version = "1.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b05b61dc5112cbb17e4b6cd61790d9845d13888356391624cbe7e41efeac1e75" - -[[package]] -name = "core-foundation-sys" -version = "0.8.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b" - -[[package]] -name = "cpufeatures" -version = "0.2.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "59ed5838eebb26a2bb2e58f6d5b5316989ae9d08bab10e0e6d103e656d1b0280" -dependencies = [ - "libc", -] - -[[package]] -name = "crc32fast" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9481c1c90cbf2ac953f07c8d4a58aa3945c425b7185c9154d67a65e4230da511" -dependencies = [ - "cfg-if", -] - -[[package]] -name = "crossbeam-epoch" -version = "0.9.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b82ac4a3c2ca9c3460964f020e1402edd5753411d7737aa39c3714ad1b5420e" -dependencies = [ - "crossbeam-utils", -] - -[[package]] -name = "crossbeam-utils" -version = "0.8.21" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d0a5c400df2834b80a4c3327b3aad3a4c4cd4de0629063962b03235697506a28" - -[[package]] -name = "crypto-common" -version = "0.1.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "78c8292055d1c1df0cce5d180393dc8cce0abec0a7102adb6c7b1eef6016d60a" -dependencies = [ - "generic-array", - "typenum", -] - -[[package]] -name = "deranged" -version = "0.5.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ececcb659e7ba858fb4f10388c250a7252eb0a27373f1a72b8748afdd248e587" -dependencies = [ - "powerfmt", -] - -[[package]] -name = "digest" -version = "0.10.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" -dependencies = [ - "block-buffer", - "crypto-common", -] - -[[package]] -name = "dunce" -version = "1.0.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "92773504d58c093f6de2459af4af33faa518c13451eb8f2b5698ed3d36e7c813" - -[[package]] -name = "equivalent" -version = "1.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "877a4ace8713b0bcf2a4e7eec82529c029f1d0619886d18145fea96c3ffe5c0f" - -[[package]] -name = "find-msvc-tools" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3a3076410a55c90011c298b04d0cfa770b00fa04e1e3c97d3f6c9de105a03844" - -[[package]] -name = "form_urlencoded" -version = "1.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb4cb245038516f5f85277875cdaa4f7d2c9a0fa0468de06ed190163b1581fcf" -dependencies = [ - "percent-encoding", -] - -[[package]] -name = "fs2" -version = "0.4.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9564fc758e15025b46aa6643b1b77d047d1a56a1aea6e01002ac0c7026876213" -dependencies = [ - "libc", - "winapi", -] - -[[package]] -name = "fs_extra" -version = "1.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "42703706b716c37f96a77aea830392ad231f44c9e9a67872fa5548707e11b11c" - -[[package]] -name = "futures-channel" -version = "0.3.31" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2dff15bf788c671c1934e366d07e30c1814a8ef514e1af724a602e8a2fbe1b10" -dependencies = [ - "futures-core", -] - -[[package]] -name = "futures-core" -version = "0.3.31" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05f29059c0c2090612e8d742178b0580d2dc940c837851ad723096f87af6663e" - -[[package]] -name = "futures-task" -version = "0.3.31" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f90f7dce0722e95104fcb095585910c0977252f286e354b5e3bd38902cd99988" - -[[package]] -name = "futures-util" -version = "0.3.31" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9fa08315bb612088cc391249efdc3bc77536f16c91f6cf495e6fbe85b20a4a81" -dependencies = [ - "futures-core", - "futures-task", - "pin-project-lite", - "pin-utils", -] - -[[package]] -name = "fxhash" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c31b6d751ae2c7f11320402d34e41349dd1016f8d5d45e48c4312bc8625af50c" -dependencies = [ - "byteorder", -] - -[[package]] -name = "generic-array" -version = "0.14.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" -dependencies = [ - "typenum", - "version_check", -] - -[[package]] -name = "getrandom" -version = "0.2.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "335ff9f135e4384c8150d6f27c6daed433577f86b4750418338c01a1a2528592" -dependencies = [ - "cfg-if", - "libc", - "wasi", -] - -[[package]] -name = "getrandom" -version = "0.3.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "899def5c37c4fd7b2664648c28120ecec138e4d395b459e5ca34f9cce2dd77fd" -dependencies = [ - "cfg-if", - "libc", - "r-efi", - "wasip2", -] - -[[package]] -name = "hashbrown" -version = "0.16.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "841d1cc9bed7f9236f321df977030373f4a4163ae1a7dbfe1a51a2c1a51d9100" - -[[package]] -name = "headers" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b3314d5adb5d94bcdf56771f2e50dbbc80bb4bdf88967526706205ac9eff24eb" -dependencies = [ - "base64", - "bytes", - "headers-core", - "http", - "httpdate", - "mime", - "sha1", -] - -[[package]] -name = "headers-core" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "54b4a22553d4242c49fddb9ba998a99962b5cc6f22cb5a3482bec22522403ce4" -dependencies = [ - "http", -] - -[[package]] -name = "heck" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" - -[[package]] -name = "hex" -version = "0.4.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" - -[[package]] -name = "hex-literal" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e712f64ec3850b98572bffac52e2c6f282b29fe6c5fa6d42334b30be438d95c1" - -[[package]] -name = "http" -version = "1.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3ba2a386d7f85a81f119ad7498ebe444d2e22c2af0b86b069416ace48b3311a" -dependencies = [ - "bytes", - "itoa", -] - -[[package]] -name = "http-body" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1efedce1fb8e6913f23e0c92de8e62cd5b772a67e7b3946df930a62566c93184" -dependencies = [ - "bytes", - "http", -] - -[[package]] -name = "http-body-util" -version = "0.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b021d93e26becf5dc7e1b75b1bed1fd93124b374ceb73f43d4d4eafec896a64a" -dependencies = [ - "bytes", - "futures-core", - "http", - "http-body", - "pin-project-lite", -] - -[[package]] -name = "httparse" -version = "1.10.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6dbf3de79e51f3d586ab4cb9d5c3e2c14aa28ed23d180cf89b4df0454a69cc87" - -[[package]] -name = "httpdate" -version = "1.0.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9" - -[[package]] -name = "hybrid-array" -version = "0.4.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f471e0a81b2f90ffc0cb2f951ae04da57de8baa46fa99112b062a5173a5088d0" -dependencies = [ - "typenum", -] - -[[package]] -name = "hyper" -version = "1.8.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2ab2d4f250c3d7b1c9fcdff1cece94ea4e2dfbec68614f7b87cb205f24ca9d11" -dependencies = [ - "atomic-waker", - "bytes", - "futures-channel", - "futures-core", - "http", - "http-body", - "httparse", - "httpdate", - "itoa", - "pin-project-lite", - "pin-utils", - "smallvec", - "tokio", -] - -[[package]] -name = "hyper-util" -version = "0.1.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "52e9a2a24dc5c6821e71a7030e1e14b7b632acac55c40e9d2e082c621261bb56" -dependencies = [ - "bytes", - "futures-core", - "http", - "http-body", - "hyper", - "pin-project-lite", - "tokio", - "tower-service", -] - -[[package]] -name = "iana-time-zone" -version = "0.1.64" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "33e57f83510bb73707521ebaffa789ec8caf86f9657cad665b092b581d40e9fb" -dependencies = [ - "android_system_properties", - "core-foundation-sys", - "iana-time-zone-haiku", - "js-sys", - "log", - "wasm-bindgen", - "windows-core", -] - -[[package]] -name = "iana-time-zone-haiku" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f31827a206f56af32e590ba56d5d2d085f558508192593743f16b2306495269f" -dependencies = [ - "cc", -] - -[[package]] -name = "indexmap" -version = "2.12.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ad4bb2b565bca0645f4d68c5c9af97fba094e9791da685bf83cb5f3ce74acf2" -dependencies = [ - "equivalent", - "hashbrown", -] - -[[package]] -name = "inout" -version = "0.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "879f10e63c20629ecabbb64a8010319738c66a5cd0c29b02d63d272b03751d01" -dependencies = [ - "block-padding 0.3.3", - "generic-array", -] - -[[package]] -name = "instant" -version = "0.1.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e0242819d153cba4b4b05a5a8f2a7e9bbf97b6055b2a002b395c96b5ff3c0222" -dependencies = [ - "cfg-if", -] - -[[package]] -name = "is_terminal_polyfill" -version = "1.70.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a6cb138bb79a146c1bd460005623e142ef0181e3d0219cb493e02f7d08a35695" - -[[package]] -name = "itoa" -version = "1.0.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4a5f13b858c8d314ee3e8f639011f7ccefe71f97f96e50151fb991f267928e2c" - -[[package]] -name = "jobserver" -version = "0.1.34" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9afb3de4395d6b3e67a780b6de64b51c978ecf11cb9a462c66be7d4ca9039d33" -dependencies = [ - "getrandom 0.3.4", - "libc", -] - -[[package]] -name = "js-sys" -version = "0.3.83" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "464a3709c7f55f1f721e5389aa6ea4e3bc6aba669353300af094b29ffbdde1d8" -dependencies = [ - "once_cell", - "wasm-bindgen", -] - -[[package]] -name = "jsonwebtoken" -version = "10.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c76e1c7d7df3e34443b3621b459b066a7b79644f059fc8b2db7070c825fd417e" -dependencies = [ - "aws-lc-rs", - "base64", - "getrandom 0.2.16", - "js-sys", - "pem", - "serde", - "serde_json", - "signature", - "simple_asn1", -] - -[[package]] -name = "libc" -version = "0.2.178" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "37c93d8daa9d8a012fd8ab92f088405fb202ea0b6ab73ee2482ae66af4f42091" - -[[package]] -name = "libloading" -version = "0.8.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d7c4b02199fee7c5d21a5ae7d8cfa79a6ef5bb2fc834d6e9058e89c825efdc55" -dependencies = [ - "cfg-if", - "windows-link", -] - -[[package]] -name = "lock_api" -version = "0.4.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "224399e74b87b5f3557511d98dff8b14089b3dadafcab6bb93eab67d3aace965" -dependencies = [ - "scopeguard", -] - -[[package]] -name = "log" -version = "0.4.28" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34080505efa8e45a4b816c349525ebe327ceaa8559756f0356cba97ef3bf7432" - -[[package]] -name = "matchit" -version = "0.8.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "47e1ffaa40ddd1f3ed91f717a33c8c0ee23fff369e3aa8772b9605cc1d22f4c3" - -[[package]] -name = "memchr" -version = "2.7.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f52b00d39961fc5b2736ea853c9cc86238e165017a493d1d5c8eac6bdc4cc273" - -[[package]] -name = "mime" -version = "0.3.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" - -[[package]] -name = "mio" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "69d83b0086dc8ecf3ce9ae2874b2d1290252e2a30720bea58a5c6639b0092873" -dependencies = [ - "libc", - "wasi", - "windows-sys 0.61.2", -] - -[[package]] -name = "num-bigint" -version = "0.4.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a5e44f723f1133c9deac646763579fdb3ac745e418f2a7af9cd0c431da1f20b9" -dependencies = [ - "num-integer", - "num-traits", -] - -[[package]] -name = "num-conv" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "51d515d32fb182ee37cda2ccdcb92950d6a3c2893aa280e540671c2cd0f3b1d9" - -[[package]] -name = "num-integer" -version = "0.1.46" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7969661fd2958a5cb096e56c8e1ad0444ac2bbcd0061bd28660485a44879858f" -dependencies = [ - "num-traits", -] - -[[package]] -name = "num-traits" -version = "0.2.19" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841" -dependencies = [ - "autocfg", -] - -[[package]] -name = "once_cell" -version = "1.21.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "42f5e15c9953c5e4ccceeb2e7382a716482c34515315f7b03532b8b4e8393d2d" - -[[package]] -name = "once_cell_polyfill" -version = "1.70.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "384b8ab6d37215f3c5301a95a4accb5d64aa607f1fcb26a11b5303878451b4fe" - -[[package]] -name = "parking_lot" -version = "0.11.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d17b78036a60663b797adeaee46f5c9dfebb86948d1255007a1d6be0271ff99" -dependencies = [ - "instant", - "lock_api", - "parking_lot_core 0.8.6", -] - -[[package]] -name = "parking_lot" -version = "0.12.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "93857453250e3077bd71ff98b6a65ea6621a19bb0f559a85248955ac12c45a1a" -dependencies = [ - "lock_api", - "parking_lot_core 0.9.12", -] - -[[package]] -name = "parking_lot_core" -version = "0.8.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "60a2cfe6f0ad2bfc16aefa463b497d5c7a5ecd44a23efa72aa342d90177356dc" -dependencies = [ - "cfg-if", - "instant", - "libc", - "redox_syscall 0.2.16", - "smallvec", - "winapi", -] - -[[package]] -name = "parking_lot_core" -version = "0.9.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2621685985a2ebf1c516881c026032ac7deafcda1a2c9b7850dc81e3dfcb64c1" -dependencies = [ - "cfg-if", - "libc", - "redox_syscall 0.5.18", - "smallvec", - "windows-link", -] - -[[package]] -name = "pem" -version = "3.0.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d30c53c26bc5b31a98cd02d20f25a7c8567146caf63ed593a9d87b2775291be" -dependencies = [ - "base64", - "serde_core", -] - -[[package]] -name = "percent-encoding" -version = "2.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b4f627cb1b25917193a259e49bdad08f671f8d9708acfd5fe0a8c1455d87220" - -[[package]] -name = "pin-project-lite" -version = "0.2.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b3cff922bd51709b605d9ead9aa71031d81447142d828eb4a6eba76fe619f9b" - -[[package]] -name = "pin-utils" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" - -[[package]] -name = "powerfmt" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391" - -[[package]] -name = "ppv-lite86" -version = "0.2.21" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85eae3c4ed2f50dcfe72643da4befc30deadb458a9b590d720cde2f2b1e97da9" -dependencies = [ - "zerocopy", -] - -[[package]] -name = "proc-macro2" -version = "1.0.103" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ee95bc4ef87b8d5ba32e8b7714ccc834865276eab0aed5c9958d00ec45f49e8" -dependencies = [ - "unicode-ident", -] - -[[package]] -name = "quote" -version = "1.0.42" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a338cc41d27e6cc6dce6cefc13a0729dfbb81c262b1f519331575dd80ef3067f" -dependencies = [ - "proc-macro2", -] - -[[package]] -name = "r-efi" -version = "5.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "69cdb34c158ceb288df11e18b4bd39de994f6657d83847bdffdbd7f346754b0f" - -[[package]] -name = "rand" -version = "0.9.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6db2770f06117d490610c7488547d543617b21bfa07796d7a12f6f1bd53850d1" -dependencies = [ - "rand_chacha", - "rand_core 0.9.3", -] - -[[package]] -name = "rand_chacha" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3022b5f1df60f26e1ffddd6c66e8aa15de382ae63b3a0c1bfc0e4d3e3f325cb" -dependencies = [ - "ppv-lite86", - "rand_core 0.9.3", -] - -[[package]] -name = "rand_core" -version = "0.6.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" -dependencies = [ - "getrandom 0.2.16", -] - -[[package]] -name = "rand_core" -version = "0.9.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "99d9a13982dcf210057a8a78572b2217b667c3beacbf3a0d8b454f6f82837d38" -dependencies = [ - "getrandom 0.3.4", -] - -[[package]] -name = "redox_syscall" -version = "0.2.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fb5a58c1855b4b6819d59012155603f0b22ad30cad752600aadfcb695265519a" -dependencies = [ - "bitflags 1.3.2", -] - -[[package]] -name = "redox_syscall" -version = "0.5.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed2bf2547551a7053d6fdfafda3f938979645c44812fbfcda098faae3f1a362d" -dependencies = [ - "bitflags 2.10.0", -] - -[[package]] -name = "regex" -version = "1.12.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "843bc0191f75f3e22651ae5f1e72939ab2f72a4bc30fa80a066bd66edefc24d4" -dependencies = [ - "aho-corasick", - "memchr", - "regex-automata", - "regex-syntax", -] - -[[package]] -name = "regex-automata" -version = "0.4.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5276caf25ac86c8d810222b3dbb938e512c55c6831a10f3e6ed1c93b84041f1c" -dependencies = [ - "aho-corasick", - "memchr", - "regex-syntax", -] - -[[package]] -name = "regex-syntax" -version = "0.8.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a2d987857b319362043e95f5353c0535c1f58eec5336fdfcf626430af7def58" - -[[package]] -name = "rustversion" -version = "1.0.22" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b39cdef0fa800fc44525c84ccb54a029961a8215f9619753635a9c0d2538d46d" - -[[package]] -name = "ryu" -version = "1.0.20" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "28d3b2b1366ec20994f1fd18c3c594f05c5dd4bc44d8bb0c1c632c8d6829481f" - -[[package]] -name = "scopeguard" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" - -[[package]] -name = "serde" -version = "1.0.228" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a8e94ea7f378bd32cbbd37198a4a91436180c5bb472411e48b5ec2e2124ae9e" -dependencies = [ - "serde_core", - "serde_derive", -] - -[[package]] -name = "serde_core" -version = "1.0.228" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41d385c7d4ca58e59fc732af25c3983b67ac852c1a25000afe1175de458b67ad" -dependencies = [ - "serde_derive", -] - -[[package]] -name = "serde_derive" -version = "1.0.228" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d540f220d3187173da220f885ab66608367b6574e925011a9353e4badda91d79" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.111", -] - -[[package]] -name = "serde_json" -version = "1.0.145" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "402a6f66d8c709116cf22f558eab210f5a50187f702eb4d7e5ef38d9a7f1c79c" -dependencies = [ - "itoa", - "memchr", - "ryu", - "serde", - "serde_core", -] - -[[package]] -name = "serde_path_to_error" -version = "0.1.20" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "10a9ff822e371bb5403e391ecd83e182e0e77ba7f6fe0160b795797109d1b457" -dependencies = [ - "itoa", - "serde", - "serde_core", -] - -[[package]] -name = "serde_spanned" -version = "1.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8bbf91e5a4d6315eee45e704372590b30e260ee83af6639d64557f51b067776" -dependencies = [ - "serde_core", -] - -[[package]] -name = "serde_urlencoded" -version = "0.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3491c14715ca2294c4d6a88f15e84739788c1d030eed8c110436aafdaa2f3fd" -dependencies = [ - "form_urlencoded", - "itoa", - "ryu", - "serde", -] - -[[package]] -name = "sha1" -version = "0.10.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3bf829a2d51ab4a5ddf1352d8470c140cadc8301b2ae1789db023f01cedd6ba" -dependencies = [ - "cfg-if", - "cpufeatures", - "digest", -] - -[[package]] -name = "sha2" -version = "0.10.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a7507d819769d01a365ab707794a4084392c824f54a7a6a7862f8c3d0892b283" -dependencies = [ - "cfg-if", - "cpufeatures", - "digest", -] - -[[package]] -name = "shlex" -version = "1.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" - -[[package]] -name = "signal-hook-registry" -version = "1.4.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7664a098b8e616bdfcc2dc0e9ac44eb231eedf41db4e9fe95d8d32ec728dedad" -dependencies = [ - "libc", -] - -[[package]] -name = "signature" -version = "2.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77549399552de45a898a580c1b41d445bf730df867cc44e6c0233bbc4b8329de" -dependencies = [ - "rand_core 0.6.4", -] - -[[package]] -name = "simple_asn1" -version = "0.6.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "297f631f50729c8c99b84667867963997ec0b50f32b2a7dbcab828ef0541e8bb" -dependencies = [ - "num-bigint", - "num-traits", - "thiserror", - "time", -] - -[[package]] -name = "sled" -version = "0.34.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f96b4737c2ce5987354855aed3797279def4ebf734436c6aa4552cf8e169935" -dependencies = [ - "crc32fast", - "crossbeam-epoch", - "crossbeam-utils", - "fs2", - "fxhash", - "libc", - "log", - "parking_lot 0.11.2", -] - -[[package]] -name = "smallvec" -version = "1.15.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67b1b7a3b5fe4f1376887184045fcf45c69e92af734b7aaddc05fb777b6fbd03" - -[[package]] -name = "socket2" -version = "0.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "17129e116933cf371d018bb80ae557e889637989d8638274fb25622827b03881" -dependencies = [ - "libc", - "windows-sys 0.60.2", -] - -[[package]] -name = "static_init" -version = "1.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8bae1df58c5fea7502e8e352ec26b5579f6178e1fdb311e088580c980dee25ed" -dependencies = [ - "bitflags 1.3.2", - "cfg_aliases 0.2.1", - "libc", - "parking_lot 0.12.5", - "parking_lot_core 0.9.12", - "static_init_macro", - "winapi", -] - -[[package]] -name = "static_init_macro" -version = "1.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1389c88ddd739ec6d3f8f83343764a0e944cd23cfbf126a9796a714b0b6edd6f" -dependencies = [ - "cfg_aliases 0.1.1", - "memchr", - "proc-macro2", - "quote", - "syn 1.0.109", -] - -[[package]] -name = "strsim" -version = "0.11.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f" - -[[package]] -name = "subtle" -version = "2.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292" - -[[package]] -name = "syn" -version = "1.0.109" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" -dependencies = [ - "proc-macro2", - "quote", - "unicode-ident", -] - -[[package]] -name = "syn" -version = "2.0.111" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "390cc9a294ab71bdb1aa2e99d13be9c753cd2d7bd6560c77118597410c4d2e87" -dependencies = [ - "proc-macro2", - "quote", - "unicode-ident", -] - -[[package]] -name = "sync_wrapper" -version = "1.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0bf256ce5efdfa370213c1dabab5935a12e49f2c58d15e9eac2870d3b4f27263" - -[[package]] -name = "thiserror" -version = "2.0.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f63587ca0f12b72a0600bcba1d40081f830876000bb46dd2337a3051618f4fc8" -dependencies = [ - "thiserror-impl", -] - -[[package]] -name = "thiserror-impl" -version = "2.0.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3ff15c8ecd7de3849db632e14d18d2571fa09dfc5ed93479bc4485c7a517c913" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.111", -] - -[[package]] -name = "time" -version = "0.3.44" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91e7d9e3bb61134e77bde20dd4825b97c010155709965fedf0f49bb138e52a9d" -dependencies = [ - "deranged", - "itoa", - "num-conv", - "powerfmt", - "serde", - "time-core", - "time-macros", -] - -[[package]] -name = "time-core" -version = "0.1.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "40868e7c1d2f0b8d73e4a8c7f0ff63af4f6d19be117e90bd73eb1d62cf831c6b" - -[[package]] -name = "time-macros" -version = "0.2.24" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "30cfb0125f12d9c277f35663a0a33f8c30190f4e4574868a330595412d34ebf3" -dependencies = [ - "num-conv", - "time-core", -] - -[[package]] -name = "tokio" -version = "1.48.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff360e02eab121e0bc37a2d3b4d4dc622e6eda3a8e5253d5435ecf5bd4c68408" -dependencies = [ - "bytes", - "libc", - "mio", - "parking_lot 0.12.5", - "pin-project-lite", - "signal-hook-registry", - "socket2", - "tokio-macros", - "windows-sys 0.61.2", -] - -[[package]] -name = "tokio-macros" -version = "2.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af407857209536a95c8e56f8231ef2c2e2aff839b22e07a1ffcbc617e9db9fa5" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.111", -] - -[[package]] -name = "toml" -version = "0.9.9+spec-1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eb5238e643fc34a1d5d7e753e1532a91912d74b63b92b3ea51fde8d1b7bc79dd" -dependencies = [ - "indexmap", - "serde_core", - "serde_spanned", - "toml_datetime", - "toml_parser", - "toml_writer", - "winnow", -] - -[[package]] -name = "toml_datetime" -version = "0.7.4+spec-1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fe3cea6b2aa3b910092f6abd4053ea464fab5f9c170ba5e9a6aead16ec4af2b6" -dependencies = [ - "serde_core", -] - -[[package]] -name = "toml_parser" -version = "1.0.5+spec-1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c03bee5ce3696f31250db0bbaff18bc43301ce0e8db2ed1f07cbb2acf89984c" -dependencies = [ - "winnow", -] - -[[package]] -name = "toml_writer" -version = "1.0.5+spec-1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a9cd6190959dce0994aa8970cd32ab116d1851ead27e866039acaf2524ce44fa" - -[[package]] -name = "tower" -version = "0.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d039ad9159c98b70ecfd540b2573b97f7f52c3e8d9f8ad57a24b916a536975f9" -dependencies = [ - "futures-core", - "futures-util", - "pin-project-lite", - "sync_wrapper", - "tokio", - "tower-layer", - "tower-service", - "tracing", -] - -[[package]] -name = "tower-layer" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "121c2a6cda46980bb0fcd1647ffaf6cd3fc79a013de288782836f6df9c48780e" - -[[package]] -name = "tower-service" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8df9b6e13f2d32c91b9bd719c00d1958837bc7dec474d94952798cc8e69eeec3" - -[[package]] -name = "tracing" -version = "0.1.43" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d15d90a0b5c19378952d479dc858407149d7bb45a14de0142f6c534b16fc647" -dependencies = [ - "log", - "pin-project-lite", - "tracing-core", -] - -[[package]] -name = "tracing-core" -version = "0.1.35" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a04e24fab5c89c6a36eb8558c9656f30d81de51dfa4d3b45f26b21d61fa0a6c" -dependencies = [ - "once_cell", -] - -[[package]] -name = "typenum" -version = "1.19.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "562d481066bde0658276a35467c4af00bdc6ee726305698a55b86e61d7ad82bb" - -[[package]] -name = "unicode-ident" -version = "1.0.22" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9312f7c4f6ff9069b165498234ce8be658059c6728633667c526e27dc2cf1df5" - -[[package]] -name = "unshell-crypt" -version = "0.1.0" -dependencies = [ - "aes", - "block-padding 0.4.2", - "cbc", - "getrandom 0.3.4", - "hex", - "hex-literal", - "regex", - "sha2", -] - -[[package]] -name = "unshell-lib" -version = "0.0.0" -dependencies = [ - "chrono", - "serde", - "serde_json", - "unshell-obfuscate", -] - -[[package]] -name = "unshell-manager" -version = "0.0.0" -dependencies = [ - "bincode", - "libc", - "libloading", - "rand", - "unshell-lib", - "unshell-obfuscate", -] - -[[package]] -name = "unshell-obfuscate" -version = "0.0.0" -dependencies = [ - "proc-macro2", - "quote", - "rand", - "static_init", - "syn 2.0.111", - "unshell-crypt", -] - -[[package]] -name = "unshell-server" -version = "0.0.0" -dependencies = [ - "axum", - "axum-extra", - "bcrypt", - "chrono", - "clap", - "jsonwebtoken", - "serde", - "serde_json", - "sled", - "static_init", - "tokio", - "toml", - "unshell-lib", - "unshell-manager", - "unshell-obfuscate", -] - -[[package]] -name = "untrusted" -version = "0.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a156c684c91ea7d62626509bce3cb4e1d9ed5c4d978f7b4352658f96a4c26b4a" - -[[package]] -name = "unty" -version = "0.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d49784317cd0d1ee7ec5c716dd598ec5b4483ea832a2dced265471cc0f690ae" - -[[package]] -name = "utf8parse" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821" - -[[package]] -name = "version_check" -version = "0.9.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a" - -[[package]] -name = "virtue" -version = "0.0.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "051eb1abcf10076295e815102942cc58f9d5e3b4560e46e53c21e8ff6f3af7b1" - -[[package]] -name = "wasi" -version = "0.11.1+wasi-snapshot-preview1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ccf3ec651a847eb01de73ccad15eb7d99f80485de043efb2f370cd654f4ea44b" - -[[package]] -name = "wasip2" -version = "1.0.1+wasi-0.2.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0562428422c63773dad2c345a1882263bbf4d65cf3f42e90921f787ef5ad58e7" -dependencies = [ - "wit-bindgen", -] - -[[package]] -name = "wasm-bindgen" -version = "0.2.106" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d759f433fa64a2d763d1340820e46e111a7a5ab75f993d1852d70b03dbb80fd" -dependencies = [ - "cfg-if", - "once_cell", - "rustversion", - "wasm-bindgen-macro", - "wasm-bindgen-shared", -] - -[[package]] -name = "wasm-bindgen-macro" -version = "0.2.106" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "48cb0d2638f8baedbc542ed444afc0644a29166f1595371af4fecf8ce1e7eeb3" -dependencies = [ - "quote", - "wasm-bindgen-macro-support", -] - -[[package]] -name = "wasm-bindgen-macro-support" -version = "0.2.106" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cefb59d5cd5f92d9dcf80e4683949f15ca4b511f4ac0a6e14d4e1ac60c6ecd40" -dependencies = [ - "bumpalo", - "proc-macro2", - "quote", - "syn 2.0.111", - "wasm-bindgen-shared", -] - -[[package]] -name = "wasm-bindgen-shared" -version = "0.2.106" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cbc538057e648b67f72a982e708d485b2efa771e1ac05fec311f9f63e5800db4" -dependencies = [ - "unicode-ident", -] - -[[package]] -name = "winapi" -version = "0.3.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" -dependencies = [ - "winapi-i686-pc-windows-gnu", - "winapi-x86_64-pc-windows-gnu", -] - -[[package]] -name = "winapi-i686-pc-windows-gnu" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" - -[[package]] -name = "winapi-x86_64-pc-windows-gnu" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" - -[[package]] -name = "windows-core" -version = "0.62.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b8e83a14d34d0623b51dce9581199302a221863196a1dde71a7663a4c2be9deb" -dependencies = [ - "windows-implement", - "windows-interface", - "windows-link", - "windows-result", - "windows-strings", -] - -[[package]] -name = "windows-implement" -version = "0.60.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "053e2e040ab57b9dc951b72c264860db7eb3b0200ba345b4e4c3b14f67855ddf" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.111", -] - -[[package]] -name = "windows-interface" -version = "0.59.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f316c4a2570ba26bbec722032c4099d8c8bc095efccdc15688708623367e358" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.111", -] - -[[package]] -name = "windows-link" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0805222e57f7521d6a62e36fa9163bc891acd422f971defe97d64e70d0a4fe5" - -[[package]] -name = "windows-result" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7781fa89eaf60850ac3d2da7af8e5242a5ea78d1a11c49bf2910bb5a73853eb5" -dependencies = [ - "windows-link", -] - -[[package]] -name = "windows-strings" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7837d08f69c77cf6b07689544538e017c1bfcf57e34b4c0ff58e6c2cd3b37091" -dependencies = [ - "windows-link", -] - -[[package]] -name = "windows-sys" -version = "0.60.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f2f500e4d28234f72040990ec9d39e3a6b950f9f22d3dba18416c35882612bcb" -dependencies = [ - "windows-targets", -] - -[[package]] -name = "windows-sys" -version = "0.61.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae137229bcbd6cdf0f7b80a31df61766145077ddf49416a728b02cb3921ff3fc" -dependencies = [ - "windows-link", -] - -[[package]] -name = "windows-targets" -version = "0.53.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4945f9f551b88e0d65f3db0bc25c33b8acea4d9e41163edf90dcd0b19f9069f3" -dependencies = [ - "windows-link", - "windows_aarch64_gnullvm", - "windows_aarch64_msvc", - "windows_i686_gnu", - "windows_i686_gnullvm", - "windows_i686_msvc", - "windows_x86_64_gnu", - "windows_x86_64_gnullvm", - "windows_x86_64_msvc", -] - -[[package]] -name = "windows_aarch64_gnullvm" -version = "0.53.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a9d8416fa8b42f5c947f8482c43e7d89e73a173cead56d044f6a56104a6d1b53" - -[[package]] -name = "windows_aarch64_msvc" -version = "0.53.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9d782e804c2f632e395708e99a94275910eb9100b2114651e04744e9b125006" - -[[package]] -name = "windows_i686_gnu" -version = "0.53.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "960e6da069d81e09becb0ca57a65220ddff016ff2d6af6a223cf372a506593a3" - -[[package]] -name = "windows_i686_gnullvm" -version = "0.53.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa7359d10048f68ab8b09fa71c3daccfb0e9b559aed648a8f95469c27057180c" - -[[package]] -name = "windows_i686_msvc" -version = "0.53.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e7ac75179f18232fe9c285163565a57ef8d3c89254a30685b57d83a38d326c2" - -[[package]] -name = "windows_x86_64_gnu" -version = "0.53.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c3842cdd74a865a8066ab39c8a7a473c0778a3f29370b5fd6b4b9aa7df4a499" - -[[package]] -name = "windows_x86_64_gnullvm" -version = "0.53.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ffa179e2d07eee8ad8f57493436566c7cc30ac536a3379fdf008f47f6bb7ae1" - -[[package]] -name = "windows_x86_64_msvc" -version = "0.53.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d6bbff5f0aada427a1e5a6da5f1f98158182f26556f345ac9e04d36d0ebed650" - -[[package]] -name = "winnow" -version = "0.7.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a5364e9d77fcdeeaa6062ced926ee3381faa2ee02d3eb83a5c27a8825540829" - -[[package]] -name = "wit-bindgen" -version = "0.46.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f17a85883d4e6d00e8a97c586de764dabcc06133f7f1d55dce5cdc070ad7fe59" - -[[package]] -name = "zerocopy" -version = "0.8.30" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ea879c944afe8a2b25fef16bb4ba234f47c694565e97383b36f3a878219065c" -dependencies = [ - "zerocopy-derive", -] - -[[package]] -name = "zerocopy-derive" -version = "0.8.30" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf955aa904d6040f70dc8e9384444cb1030aed272ba3cb09bbc4ab9e7c1f34f5" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.111", -] - -[[package]] -name = "zeroize" -version = "1.8.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b97154e67e32c85465826e8bcc1c59429aaaf107c1e4a9e53c8d8ccd5eff88d0" diff --git a/ush-server/Cargo.toml b/ush-server/Cargo.toml deleted file mode 100644 index 30b7f90..0000000 --- a/ush-server/Cargo.toml +++ /dev/null @@ -1,31 +0,0 @@ -[package] -name = "ush-server" -version.workspace = true -edition.workspace = true -authors.workspace = true -include.workspace = true - -[features] -default = ["log_debug"] -log = ["unshell/log"] -log_debug = ["unshell/log_debug"] - -[dependencies] -unshell = { path = "../" } -# ush-manager = { path = "../unshell-manager" } - -chrono = { workspace = true } -toml = { workspace = true } -static_init = { workspace = true } -serde = { workspace = true } -serde_json = { workspace = true } - -sled = "0.34.7" - -clap = {version = "4.5.53", features = ["derive"]} -axum = "0.8.7" -axum-extra = {version="0.12.2", features = ["typed-header"]} -tokio = {version="1.48.0", features = ["full"] } - -jsonwebtoken = {version = "10.2.0", features = ["aws_lc_rs"]} -bcrypt = "0.17.1" diff --git a/ush-server/TODO.txt b/ush-server/TODO.txt deleted file mode 100644 index 5baef54..0000000 --- a/ush-server/TODO.txt +++ /dev/null @@ -1,3 +0,0 @@ -GET /api/interface/*/some_config -> Returns the interface and struct at that location - -GET /api/interface/*/some_folder -> Returns the list of sub-folders and interfaces at that location diff --git a/ush-server/src/api.rs b/ush-server/src/api.rs deleted file mode 100644 index 90709b2..0000000 --- a/ush-server/src/api.rs +++ /dev/null @@ -1,105 +0,0 @@ -use axum::{ - Extension, Json, Router, - extract::{Path, State}, - middleware, - routing::{get, post}, -}; -use tokio::net::TcpListener; -use unshell::{debug, info}; - -// axum_extra:: - -use crate::{auth, auth::structs::CurrentUser, logger::Logger, server::Server}; - -macro_rules! route_get { - ($router:expr, $path:expr, $func:expr) => {{ - { - $router.route( - $path, - get($func).layer(middleware::from_fn(auth::authorize)), - ) - } - }}; -} - -macro_rules! route_post { - ($router:expr, $path:expr, $func:expr) => {{ - { - $router.route( - $path, - post($func).layer(middleware::from_fn(auth::authorize)), - ) - } - }}; -} - -pub async fn start_api(address: &str, server: Server) { - let listener = TcpListener::bind(address) - .await - .expect("Unable to start listener"); - - info!("Listening on {}", listener.local_addr().unwrap()); - - let mut router = Router::new().route("/api/auth", post(auth::sign_in)); - - router = route_trees(router); - - router = route_get!(router, "/api/log/{*offset}", Logger::poll_logs_api); - router = route_get!(router, "/api/trees", Server::get_trees_api); - router = route_get!(router, "/api/keys/{*path}", Server::all_tree_keys_api); - router = route_get!(router, "/api/values/{*path}", Server::all_tree_values_api); - - router = route_get!(router, "/api/interface/", Server::get_tree2_root); - router = route_get!(router, "/api/interface/{*path}", Server::get_tree2); - - // router = router.route("/api/interface", get(Server::get_tree2_root)); - - // router = router.route("/api/interface/{*path}", post(Server::post_tree2)); - - router = route_post!(router, "/api/interface/{*path}", Server::post_tree2); - - // router = route_get_log(router); - - axum::serve(listener, router.with_state(server)) - .await - .expect("Error serving application"); -} - -// Loop through all trees and add /api// POST aand GET listeners for them -fn route_trees(mut router: Router) -> Router { - for tree in crate::DATABASE_TREES.iter() { - router = router - // Route GET requests to this tree - .route( - &format!("/api/{}/{{*path}}", tree), - get( - async |State(server): State, - Path(path): Path, - Extension(_): Extension| { - let result = server.get_value(tree, &path); - debug!("GET /api/{}/{}", tree.to_string(), path); - - Json(serde_json::to_value(result).unwrap()) - }, - ) - .layer(middleware::from_fn(auth::authorize)), - ) - // Route POST requests to this tree - .route( - &format!("/api/{}/{{*path}}", tree), - post( - async |State(server): State, - Path(path): Path, - Extension(_): Extension, - body: String| { - let result = server.put_value(tree, &path, &body); - debug!("POST /api/{}/{}", tree.to_string(), path); - - Json(serde_json::to_value(result).unwrap()) - }, - ) - .layer(middleware::from_fn(auth::authorize)), - ); - } - router -} diff --git a/ush-server/src/auth/mod.rs b/ush-server/src/auth/mod.rs deleted file mode 100644 index 0331d91..0000000 --- a/ush-server/src/auth/mod.rs +++ /dev/null @@ -1,130 +0,0 @@ -pub mod structs; - -use axum::{ - body::Body, - extract::{Json, Request}, - http::{self, Response, StatusCode}, - middleware::Next, -}; -use bcrypt::{DEFAULT_COST, hash, verify}; -use chrono::Utc; -use jsonwebtoken::{Header, TokenData, Validation, decode, encode}; -use serde_json::{Value, json}; -use unshell::{debug, info}; - -use crate::{EXPIRE_DURATION, JWT_DECODING_KEY, JWT_ENCODING_KEY}; - -use structs::{AuthError, Cliams, CurrentUser, SignInData}; - -pub fn hash_password(password: &str) -> Result { - let hash = hash(password, DEFAULT_COST)?; - Ok(hash) -} - -pub fn encode_jwt(email: String) -> Result<(String, usize), StatusCode> { - let now = Utc::now(); - let exp = (now + EXPIRE_DURATION).timestamp() as usize; - let iat = now.timestamp() as usize; - - let claim = Cliams { iat, exp, email }; - - let token = encode(&Header::default(), &claim, &JWT_ENCODING_KEY) - .map_err(|_| StatusCode::INTERNAL_SERVER_ERROR)?; - - Ok((token, exp)) -} - -pub fn decode_jwt(jwt: String) -> Result, StatusCode> { - decode(&jwt, &JWT_DECODING_KEY, &Validation::default()) - .map_err(|_| StatusCode::INTERNAL_SERVER_ERROR) -} - -pub async fn authorize(mut req: Request, next: Next) -> Result, AuthError> { - let auth_header = req.headers_mut().get(http::header::AUTHORIZATION); - - let auth_header = match auth_header { - Some(header) => header.to_str().map_err(|_| AuthError { - message: "Empty header is not allowed".to_string(), - status_code: StatusCode::FORBIDDEN, - })?, - None => { - return Err(AuthError { - message: "Please add the JWT token to the header".to_string(), - status_code: StatusCode::FORBIDDEN, - }); - } - }; - let mut header = auth_header.split_whitespace(); - - let (_, token) = (header.next(), header.next()); - - let _token_data: TokenData = match decode_jwt(token.unwrap().to_string()) { - Ok(data) => data, - Err(_) => { - return Err(AuthError { - message: "Invalid Session".to_string(), - status_code: StatusCode::UNAUTHORIZED, - }); - } - }; - - // // Fetch the user details from the database - // let current_user = match retrieve_user_by_email(&token_data.claims.email) { - // Some(user) => user, - // None => { - // return Err(AuthError { - // message: "Unauthorized".to_string(), - // status_code: StatusCode::UNAUTHORIZED, - // }); - // } - // }; - - // req.extensions_mut().insert(current_user); - Ok(next.run(req).await) -} - -pub async fn sign_in(Json(user_data): Json) -> Result, StatusCode> { - // 1. Retrieve user from the database - let user = match retrieve_user_by_email(&user_data.username) { - Some(user) => user, - None => { - debug!( - "Denied user {}: Could not find user data", - user_data.username - ); - return Err(StatusCode::UNAUTHORIZED); - } // User not found - }; - - // 2. Compare the password - if !verify(&user_data.password, &user.password_hash) - .map_err(|_| StatusCode::INTERNAL_SERVER_ERROR)? - // Handle bcrypt errors - { - debug!("Denied user {}: Incorrect password hash", user.username); - return Err(StatusCode::UNAUTHORIZED); // Wrong password - } - - info!( - "Authenticated user {} for {}", - user_data.username, EXPIRE_DURATION - ); - - // 3. Generate JWT - let (token, experation) = - encode_jwt(user.username).map_err(|_| StatusCode::INTERNAL_SERVER_ERROR)?; - - // 4. Return the token - Ok(Json(json!({ - "token": token, - "expiration": experation, - }))) -} - -fn retrieve_user_by_email(_email: &str) -> Option { - let current_user: CurrentUser = CurrentUser { - username: "foo".to_string(), - password_hash: hash_password("bar").unwrap(), - }; - Some(current_user) -} diff --git a/ush-server/src/auth/structs.rs b/ush-server/src/auth/structs.rs deleted file mode 100644 index 326a1a2..0000000 --- a/ush-server/src/auth/structs.rs +++ /dev/null @@ -1,45 +0,0 @@ -use axum::{ - Json, - body::Body, - http::{Response, StatusCode}, - response::IntoResponse, -}; -use serde::{Deserialize, Serialize}; -use serde_json::json; - -#[derive(Deserialize)] -pub struct SignInData { - pub username: String, - pub password: String, -} - -#[derive(Debug, Clone)] -pub struct CurrentUser { - pub username: String, - pub password_hash: String, -} - -#[derive(Debug, Serialize, Deserialize)] -pub struct Cliams { - // pub exp: u128, - // pub iat: u128, - // - pub exp: usize, - pub iat: usize, - pub email: String, -} - -pub struct AuthError { - pub message: String, - pub status_code: StatusCode, -} - -impl IntoResponse for AuthError { - fn into_response(self) -> Response { - let body = Json(json!({ - "error": self.message, - })); - - (self.status_code, body).into_response() - } -} diff --git a/ush-server/src/lib.rs b/ush-server/src/lib.rs deleted file mode 100644 index 7db9e1e..0000000 --- a/ush-server/src/lib.rs +++ /dev/null @@ -1,59 +0,0 @@ -mod api; -mod auth; -// mod config; -pub mod logger; -mod server; - -// use math - -pub use server::Server; - -use static_init::dynamic; - -#[static_init::dynamic] -pub static DATABASE_TREES: Vec<&'static str> = vec!["users"]; - -#[static_init::dynamic] -pub static DEFAULT_HOST: String = "localhost".to_string(); -#[static_init::dynamic] -pub static DATABASE_NAME: String = "database".to_string(); - -#[static_init::dynamic] -pub static SERVER_CONFIG: unshell_manager::PayloadConfig = unshell_manager::PayloadConfig { - id: "Server", - components: Vec::new(), - runtime_config: Vec::new(), -}; - -// Constants for server config -pub use api::start_api; -use chrono::Duration; -use jsonwebtoken::{DecodingKey, EncodingKey}; - -static EXPIRE_DURATION: Duration = Duration::hours(12); - -#[dynamic] - -static JWT_SECRET: String = { - if let Ok(env_secret) = std::env::var("JWT_SECRET") { - env_secret - } else { - println!( - r#" -############## -# WARNING: You are using the default JWT secret, used for creating user sessions -# With this default key, anyone can login as any user. -##############"# - ); - "DEFAULT_SECRET".to_string() - } -}; - -// std::env::var("JWT_SECRET").unwrap_or(|| -> String { -// return "TEST".to_string(); -// }()); - -#[dynamic] -static JWT_ENCODING_KEY: EncodingKey = EncodingKey::from_secret(JWT_SECRET.as_bytes()); -#[dynamic] -static JWT_DECODING_KEY: DecodingKey = DecodingKey::from_secret(JWT_SECRET.as_bytes()); diff --git a/ush-server/src/logger.rs b/ush-server/src/logger.rs deleted file mode 100644 index b7acbbe..0000000 --- a/ush-server/src/logger.rs +++ /dev/null @@ -1,100 +0,0 @@ -use axum::extract::{Path, State}; -use axum::{Extension, Json}; -use chrono::Local; -use std::fs::{self, File, OpenOptions}; -use std::io::{BufRead, BufReader, Write}; -use std::path::PathBuf; -use unshell::debug; - -use crate::Server; -use crate::auth::structs::CurrentUser; - -const LOG_DIR: &str = "logs"; - -const LOG_COUNT: usize = 100; - -/// The full path to the log file. -/// Initialized once based on the startup time. -#[static_init::dynamic] -static LOG_FILE_PATH: PathBuf = { - let log_dir_path = PathBuf::from(LOG_DIR); - - if let Err(e) = fs::create_dir_all(&log_dir_path) { - eprintln!("Error creating log directory {:?}: {}", log_dir_path, e); - - panic!("Failed to initialize log directory."); - } - - let now = Local::now(); - let filename = format!("{}.log", now.format("%Y%m%d_%H%M%S")); - - log_dir_path.join(filename) -}; - -/// A static utility module for logging operations. -pub struct Logger; - -impl Logger { - pub fn log(message: String) { - let log_line = format!("{}\n", message); - - match OpenOptions::new() - .create(true) - .append(true) - .open(&*LOG_FILE_PATH) - { - Ok(mut file) => { - // 3. Write the log line to the file - if let Err(e) = file.write_all(log_line.as_bytes()) { - eprintln!("Error writing log to file {:?}: {}", *LOG_FILE_PATH, e); - } - } - Err(e) => { - eprintln!("Error opening log file {:?}: {}", *LOG_FILE_PATH, e); - } - } - } - - pub fn poll_logs(offset: usize) -> Vec { - match File::open(&*LOG_FILE_PATH) { - Ok(file) => { - let reader = BufReader::new(file); - let lines: Vec = reader - .lines() - .filter_map(|line| line.ok()) // Ignore lines that fail to read - .collect(); - - let total_lines = lines.len(); - if offset >= total_lines { - return Vec::new(); - } - - let start_index = total_lines - .checked_sub(offset) - .and_then(|i| i.checked_sub(LOG_COUNT)) - .unwrap_or(0); - - let end_index = total_lines.checked_sub(offset).unwrap_or(total_lines); - - let slice = &lines[start_index..end_index]; - - slice.iter().cloned().collect() - } - Err(e) => { - eprintln!("Error reading log file {:?}: {}", *LOG_FILE_PATH, e); - Vec::new() - } - } - } - - pub async fn poll_logs_api( - State(_): State, - Extension(_): Extension, - Path(offset): Path, - ) -> axum::Json { - debug!("GET /api/log/{}", offset); - let result = Self::poll_logs(offset); - - Json(serde_json::to_value(result).unwrap()) - } -} diff --git a/ush-server/src/main.rs b/ush-server/src/main.rs deleted file mode 100644 index ea687d4..0000000 --- a/ush-server/src/main.rs +++ /dev/null @@ -1,45 +0,0 @@ -use std::{error::Error, path::PathBuf}; - -use unshell_server::{Server, start_api}; - -use clap::Parser; -use unshell_server::{DATABASE_NAME, DEFAULT_HOST}; - -/// A fictional versioning CLI -#[derive(Debug, Parser)] -#[command(name = "unshell-server")] -#[command(about = "UnShell server", long_about = None)] -pub struct Args { - /// Host to listen on - #[clap(long, default_value_t = DEFAULT_HOST.clone())] - host: String, - - /// Port to listen - #[arg(short, long, default_value_t = 3000)] - port: usize, - - /// Name of database folder - #[clap(short, long, default_value_t = DATABASE_NAME.clone())] - database_name: String, - - /// Load config from path - #[clap(short, long, value_parser)] - pub config: Vec, -} - -#[tokio::main] -async fn main() -> Result<(), Box> { - let args = Args::parse(); - - unshell::logger::PrettyLogger::init_output(|message| { - if let Ok(json) = serde_json::to_string(message) { - unshell_server::logger::Logger::log(json); - } - }); - - let database = Server::new(args.config, args.database_name)?; - - start_api(&format!("{}:{}", args.host, args.port), database).await; - - Ok(()) -} diff --git a/ush-server/src/server/blobs.rs b/ush-server/src/server/blobs.rs deleted file mode 100644 index d38108d..0000000 --- a/ush-server/src/server/blobs.rs +++ /dev/null @@ -1,9 +0,0 @@ -use serde_json::Value; - -use crate::Server; - -impl Server { - pub fn get_blobs(&self) -> Result, String> { - Ok(Vec::new()) - } -} diff --git a/ush-server/src/server/database.rs b/ush-server/src/server/database.rs deleted file mode 100644 index 7b653c5..0000000 --- a/ush-server/src/server/database.rs +++ /dev/null @@ -1,100 +0,0 @@ -use std::collections::HashMap; - -use axum::{ - Extension, Json, - extract::{Path, State}, -}; -use serde_json::Value; -use sled::Tree; -use unshell::{debug, error}; - -use crate::{auth::structs::CurrentUser, server::Server}; - -impl Server { - fn get_tree(&self, tree_name: &str) -> Result { - self.db.open_tree(tree_name).map_err(|e| { - error!("DB Failed to open tree: {}", e); - "Internal server error".to_string() - }) - } - - pub async fn get_trees_api(State(server): State) -> Json { - debug!("GET tree list"); - - let result = server - .db - .tree_names() - .iter() - .map(|n| String::from_utf8_lossy(&n.to_vec()).to_string()) - .collect::>(); - - Json(serde_json::to_value(result).unwrap()) - } - - pub fn put_value(&self, tree_name: &str, key: &str, value: &str) -> Result<(), String> { - match self.get_tree(tree_name)?.insert(key, value) { - Ok(_) => Ok(()), - Err(e) => { - error!("Failed to load '{}' from database: {}", key, e); - Err("Internal server error".to_string()) - } - } - } - - pub fn get_value(&self, tree_name: &str, key: &str) -> Result { - match self.get_tree(tree_name)?.get(key) { - Ok(v) => match v { - Some(v) => Ok(String::from_utf8_lossy(&v.to_vec()).to_string()), - None => Err(format!("Could not find key '{}'", key)), - }, - Err(e) => { - error!("Failed to load '{}' from database: {}", key, e); - Err("Internal server error".to_string()) - // Err(e.to_string()) - } - } - } - - fn get_keys(&self, tree_name: &str) -> Result, String> { - Ok(self - .get_tree(tree_name)? - .iter() - .keys() - .map(|key| { - String::from_utf8_lossy(&key.expect("This key should exist").to_vec()).to_string() - }) - .collect::>()) - } - - // Route the "keys" api for each tree - pub async fn all_tree_keys_api( - State(server): State, - Path(tree_name): Path, - Extension(_): Extension, - ) -> Json { - let result = server.get_keys(&tree_name); - - Json(serde_json::to_value(result).unwrap()) - } - - // Route the "values" api to get all the values for each tree - pub async fn all_tree_values_api( - State(server): State, - Path(tree_name): Path, - Extension(_): Extension, - ) -> Json { - let result = || -> Result, String> { - Ok(server - .get_keys(&tree_name)? - .iter() - .map(|key| -> Result<(String, String), String> { - Ok((key.clone(), server.get_value(&tree_name, &key)?)) - }) - .collect::, String>>()? - .into_iter() - .collect::>()) - }(); - - Json(serde_json::to_value(result).unwrap()) - } -} diff --git a/ush-server/src/server/mod.rs b/ush-server/src/server/mod.rs deleted file mode 100644 index c0e0d79..0000000 --- a/ush-server/src/server/mod.rs +++ /dev/null @@ -1,81 +0,0 @@ -use std::{ - path::PathBuf, - sync::{Arc, Mutex}, -}; - -use unshell::{ - ModuleError, Result, - config::{ConfigStructField, Tree, TreeMessage, config_struct::Config}, -}; -use unshell_manager::Manager; - -mod blobs; -mod database; -mod tree2; - -#[derive(Clone)] -pub struct Server { - // pub component_configs: Vec, - // pub interface: InterfaceWrapper, - pub manager: Arc>, - pub db: sled::Db, - // pub tree: Tree2, - test_thing: Arc>, -} - -impl Server { - pub fn new(_config_paths: Vec, database: String) -> Result { - // let mut component_configs: Vec = Vec::new(1); - - // for config in &config_paths { - // component_configs.extend(crate::config::load_config(config)?); - // } - - Ok(Self { - // component_configs, - manager: Manager::start(&crate::SERVER_CONFIG, Vec::new()), - db: sled::open(database).map_err(|e| ModuleError::DatabaseError(e.to_string()))?, - - test_thing: Arc::new(Mutex::new(Config::new(vec![ - ConfigStructField::Header("Test Heading".into()), - ConfigStructField::Text("Test Texttttttttttttttt".into()), - ConfigStructField::String { - default: "Test Texttttttttttttttt".into(), - max_length: None, - protected: true, - }, - ConfigStructField::String { - default: "Test ".into(), - max_length: Some(15), - protected: false, - }, - ]))), - // tree: Tree2::default(), - // interface: get_test_interface(), - }) - } -} - -impl Tree for Server { - fn is_folder() -> bool { - true - } - - fn get_children_string(&self) -> Vec { - vec!["connection_count".into()] - } - - fn select_child(&mut self, child: &str, message: TreeMessage) -> Result { - match child { - "connection_count" => self.test_thing.lock().unwrap().get(message), - _ => Err("No such child".into()), - } - } -} - -impl Drop for Server { - fn drop(&mut self) { - self.db.flush().expect("Failed to flush database on drop"); - // Manager::join(self.manager.clone()); - } -} diff --git a/ush-server/src/server/tree2.rs b/ush-server/src/server/tree2.rs deleted file mode 100644 index 708695f..0000000 --- a/ush-server/src/server/tree2.rs +++ /dev/null @@ -1,53 +0,0 @@ -use axum::{ - Json, - extract::{Path, State}, -}; - -use serde_json::Value; -use unshell::{ - ModuleError, - config::{Tree, TreeMessage}, - debug, -}; - -use crate::Server; - -impl Server { - pub async fn get_tree2_root( - State(server): State, - // Extension(extension): Extension, - ) -> Json { - Self::get_tree2(State(server), Path("".into())).await - } - - pub async fn get_tree2( - State(mut server): State, - Path(path): Path, - // Extension(_): Extension, - ) -> Json { - debug!("GET /api/interface/{}", path); - - let result = server - .get(&path, TreeMessage::RequestStructAndValue) - .map_err(|e| ModuleError::CryptError(e.to_string())); - - Json(serde_json::to_value(result).unwrap()) - } - - pub async fn post_tree2( - State(mut server): State, - Path(path): Path, - // Extension(_): Extension, - Json(tree_message): Json, - ) -> Json { - debug!("POST /api/interface/"); - - // Json(Value::Null) - - let result = server - .get(&path, tree_message) - .map_err(|e| ModuleError::CryptError(e.to_string())); - - Json(serde_json::to_value(result).unwrap()) - } -}