fix: use current_thread tokio runtime — avoid pthread_create SEGV on Android
Multi-thread tokio runtime crashes with SEGV_ACCERR in __init_tcb during pthread_create on Android (static bionic stubs from CRT). Switch to current_thread runtime which runs network I/O on the calling thread without spawning additional OS threads. Also: clean up build.rs — use only libc++_shared.so (dynamic), remove getauxval_fix.c hack, remove static c++/c++abi linking. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -106,9 +106,9 @@ impl WzpEngine {
|
||||
};
|
||||
}
|
||||
|
||||
// Create tokio runtime
|
||||
let runtime = tokio::runtime::Builder::new_multi_thread()
|
||||
.worker_threads(2)
|
||||
// Create tokio runtime — use current_thread to avoid pthread_create
|
||||
// issues on Android (SEGV_ACCERR in __init_tcb with multi_thread).
|
||||
let runtime = tokio::runtime::Builder::new_current_thread()
|
||||
.thread_name("wzp-net")
|
||||
.enable_all()
|
||||
.build()?;
|
||||
|
||||
Reference in New Issue
Block a user