diff --git a/Cargo.lock b/Cargo.lock index a450651..30758d0 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3928,6 +3928,7 @@ dependencies = [ "chrono", "serde", "serde_json", + "unshell-crypt", "unshell-obfuscate", ] @@ -3973,7 +3974,6 @@ dependencies = [ "libloading", "rand 0.9.2", "unshell", - "unshell-obfuscate", ] [[package]] @@ -4006,7 +4006,6 @@ dependencies = [ "toml", "unshell", "unshell-manager", - "unshell-obfuscate", ] [[package]] diff --git a/Cargo.toml b/Cargo.toml index 31c131f..510c9d8 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,3 +1,5 @@ +cargo-features = ["trim-paths"] + [package] name = "unshell" version = "0.1.0" @@ -26,6 +28,7 @@ serde = { workspace = true } serde_json = { workspace = true } unshell-obfuscate = {path = "./unshell-obfuscate"} +unshell-crypt = {path = "./unshell-crypt"} [workspace.dependencies] #### @@ -40,6 +43,19 @@ toml = "0.9.9" +[profile.release] +strip = true # Strip symbols from the binary +opt-level = "z" # Optimize for size +lto = true # Link tree optimization +codegen-units = 1 +panic = "abort" +debug = false # Remove debug +trim-paths="all" + +# Optimize all dependencies even in debug builds: +[profile.dev.package."*"] +opt-level = 2 + # ---------------------------------------------------------------------------------------- # Lints: diff --git a/src/lib.rs b/src/lib.rs index 92280fb..ed43c28 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -10,6 +10,10 @@ pub use error::{ModuleError, Result}; pub use announcement::Announcement; +// Re-exports +pub use unshell_crypt; +pub use unshell_obfuscate; + // pub trait Component { // fn name(&self) -> &'static str; // // fn start_runtime(&self, manager: Arc>) -> Option>; diff --git a/unshell-gui/Cargo.toml b/unshell-gui/Cargo.toml index b40ad32..9a0ef7d 100644 --- a/unshell-gui/Cargo.toml +++ b/unshell-gui/Cargo.toml @@ -46,22 +46,3 @@ egui-async = "0.2.6" wasm-bindgen-futures = "0.4.50" wasm-bindgen = "0.2.106" web-sys = {version = "0.3.70", features = ['Headers', 'Request', 'RequestInit', 'RequestMode', 'Response', 'Window']} - -[profile.release] -opt-level = 2 # fast and small wasm -# lto = true - -# Optimize all dependencies even in debug builds: -[profile.dev.package."*"] -opt-level = 2 - - -[patch.crates-io] - -# If you want to use the bleeding edge version of egui and eframe: -# egui = { git = "https://github.com/emilk/egui", branch = "main" } -# eframe = { git = "https://github.com/emilk/egui", branch = "main" } - -# If you fork https://github.com/emilk/egui you can test with: -# egui = { path = "../egui/crates/egui" } -# eframe = { path = "../egui/crates/eframe" } diff --git a/unshell-manager/Cargo.toml b/unshell-manager/Cargo.toml index 910452d..9c07882 100644 --- a/unshell-manager/Cargo.toml +++ b/unshell-manager/Cargo.toml @@ -6,14 +6,13 @@ edition = "2024" log = ["unshell/log"] log_debug = ["log", "unshell/log_debug"] -obfuscate = ["unshell-obfuscate/obfuscate"] +obfuscate = ["unshell/obfuscate"] # client = ["unshell-lib/client"] # server = ["unshell-lib/server"] [dependencies] unshell = {path = "../", default-features = false} -unshell-obfuscate = {path = "../unshell-obfuscate"} bincode = "2.0.1" libc = "0.2.178" diff --git a/unshell-manager/src/manager/mod.rs b/unshell-manager/src/manager/mod.rs index a697bac..046563c 100644 --- a/unshell-manager/src/manager/mod.rs +++ b/unshell-manager/src/manager/mod.rs @@ -8,8 +8,8 @@ use std::{ time::Duration, }; +use unshell::unshell_obfuscate::symbol; use unshell::{Result, config::RuntimeConfig, debug, warn}; -use unshell_obfuscate::symbol; use crate::{ ModuleRuntime, diff --git a/unshell-payload/Cargo.toml b/unshell-payload/Cargo.toml index 68c9a68..49c9663 100644 --- a/unshell-payload/Cargo.toml +++ b/unshell-payload/Cargo.toml @@ -1,5 +1,3 @@ -cargo-features = ["trim-paths"] - [package] name = "unshell-payload" edition = "2024" diff --git a/unshell-server/Cargo.toml b/unshell-server/Cargo.toml index c61fb9b..00f2a12 100644 --- a/unshell-server/Cargo.toml +++ b/unshell-server/Cargo.toml @@ -9,9 +9,8 @@ log = ["unshell/log", "unshell-manager/log"] log_debug = ["log", "unshell/log_debug", "unshell-manager/log_debug"] [dependencies] -unshell = {path = "../", default-featues = false} -unshell-obfuscate = {path = "../unshell-obfuscate", default-featues = false} -unshell-manager = {path = "../unshell-manager", default-featues = false} +unshell = { path = "../" } +unshell-manager = { path = "../unshell-manager" } chrono = { workspace = true } toml = { workspace = true } @@ -28,19 +27,3 @@ tokio = {version="1.48.0", features = ["full"] } jsonwebtoken = {version = "10.2.0", features = ["aws_lc_rs"]} bcrypt = "0.17.1" - -# 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"] } - -# serde = {version = "1.0.228", features = ["derive"]} -# serde_json = "1.0.145" -# chrono = "0.4.42" -# static_init = "1.0.4" -# toml = "0.9.9" - -# jsonwebtoken = {version = "10.2.0", features = ["aws_lc_rs"]} -# bcrypt = "0.17.1" - -# sled = "0.34.7"