Get dynamic component loading working

This commit is contained in:
Michael Mikovsky
2025-11-14 09:43:41 -07:00
parent cc2b2960e8
commit f34ac017ce
13 changed files with 119 additions and 82 deletions
+5 -3
View File
@@ -7,7 +7,10 @@ edition = "2024"
[features]
obfuscate = ["unshell-obfuscate/obfuscate"]
log_debug = ["unshell-lib/log_debug"]
# default = ["obfuscate"]
client = ["unshell-lib/client"]
server = ["unshell-lib/server"]
[dependencies]
env_logger = "0.11.8"
@@ -15,7 +18,7 @@ lazy_static = "1.5.0"
libloading = "0.8.9"
proc-macro2 = "1.0.103"
unshell-lib = {path = "../unshell-lib"}
unshell-lib = {path = "../unshell-lib", default-features = false}
unshell-obfuscate = {path = "../unshell-obfuscate"}
[profile.release]
@@ -26,4 +29,3 @@ codegen-units = 1
panic = "abort"
debug = false # Remove debug
trim-paths="all"
# panic=immediate-abort
+3
View File
@@ -0,0 +1,3 @@
OBFUSCATION_KEY=abc123abc \
RUST_LOG=info \
cargo run --no-default-features $@ --release # $(ls ../*/target/release/*.so)
+4 -4
View File
@@ -16,15 +16,15 @@ lazy_static! {
id: symbol!("Test ID"),
components: unshell_lib::get_components(),
runtime_config: vec![RuntimeConfig {
parent_component: symbol!("client"),
name: symbol!("client runtime"),
config: HashMap::from([(symbol!("host"), obs!("localhost:1234"))]),
parent_component: symbol!("client").to_string(),
name: symbol!("client runtime").to_string(),
config: HashMap::from([(symbol!("host").to_string(), obs!("localhost:1234"))]),
}],
};
}
fn main() {
// #[cfg(not(feature = "obfuscate"))]
#[cfg(not(feature = "obfuscate"))]
unshell_lib::logger::PrettyLogger::init();
debug!("Initialized");