web wasm ui

This commit is contained in:
Alexandr Bogomiakov
2025-07-24 08:24:51 +03:00
parent 626b152227
commit 8af35dca4f
17 changed files with 6766 additions and 18 deletions

View File

@@ -10,6 +10,9 @@ license = "WTFPL"
keywords = ["ssh", "known-hosts", "security", "system-admin", "automation"]
categories = ["command-line-utilities", "network-programming"]
[lib]
crate-type = ["cdylib", "rlib"]
[[bin]]
name = "khm"
path = "src/bin/cli.rs"
@@ -20,28 +23,34 @@ path = "src/bin/desktop.rs"
required-features = ["gui"]
[dependencies]
actix-web = "4"
actix-web = { version = "4", optional = true }
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
log = "0.4"
regex = "1.10.5"
base64 = "0.21"
tokio = { version = "1", features = ["full", "sync"] }
tokio-postgres = { version = "0.7", features = ["with-chrono-0_4"] }
tokio-util = { version = "0.7", features = ["codec"] }
clap = { version = "4", features = ["derive"] }
chrono = "0.4.38"
reqwest = { version = "0.12", features = ["json"] }
trust-dns-resolver = "0.23"
futures = "0.3"
hostname = "0.3"
rust-embed = "8.0"
regex = { version = "1.10.5", optional = true }
base64 = { version = "0.21", optional = true }
tokio = { version = "1", features = ["full", "sync"], optional = true }
tokio-postgres = { version = "0.7", features = ["with-chrono-0_4"], optional = true }
tokio-util = { version = "0.7", features = ["codec"], optional = true }
clap = { version = "4", features = ["derive"], optional = true }
chrono = { version = "0.4.38", features = ["serde"], optional = true }
reqwest = { version = "0.12", features = ["json"], optional = true }
trust-dns-resolver = { version = "0.23", optional = true }
futures = { version = "0.3", optional = true }
hostname = { version = "0.3", optional = true }
rust-embed = { version = "8.0", optional = true }
tray-icon = { version = "0.21", optional = true }
notify = { version = "6.1", optional = true }
notify-debouncer-mini = { version = "0.4", optional = true }
dirs = "5.0"
eframe = { version = "0.29", optional = true }
egui = { version = "0.29", optional = true }
wasm-bindgen-futures = { version = "0.4", optional = true }
web-sys = { version = "0.3", optional = true }
wasm-bindgen = { version = "0.2", optional = true }
console_error_panic_hook = { version = "0.1", optional = true }
tracing-wasm = { version = "0.2", optional = true }
getrandom = { version = "0.2", features = ["js"], optional = true }
winit = { version = "0.30", optional = true }
env_logger = "0.11"
urlencoding = "2.1"
@@ -53,13 +62,19 @@ glib = { version = "0.18", optional = true }
[features]
default = ["server", "web", "gui"]
cli = ["server", "web"]
cli = ["server", "web", "web-gui"]
desktop = ["gui"]
gui = ["tray-icon", "eframe", "egui", "winit", "notify", "notify-debouncer-mini", "gtk", "glib"]
server = []
web = []
web-gui = ["egui", "eframe", "wasm-bindgen-futures", "web-sys", "wasm-bindgen", "console_error_panic_hook", "tracing-wasm", "getrandom"]
web-gui-wasm = ["web-gui"]
server = ["actix-web", "tokio", "tokio-postgres", "tokio-util", "clap", "chrono", "regex", "base64", "futures", "hostname", "rust-embed", "trust-dns-resolver", "reqwest"]
web = ["server"]
# Target-specific dependencies for cross-compilation
[target.aarch64-unknown-linux-gnu.dependencies]
openssl = { version = "0.10", features = ["vendored"] }
# WASM-specific dependencies
[target.'cfg(target_arch = "wasm32")'.dependencies]
getrandom = { version = "0.2", features = ["js"] }