mirror of
https://github.com/EasyTier/EasyTier.git
synced 2026-08-06 04:29:52 +00:00
13f2ebfe12
Add config server client support for the C FFI and Android JNI bindings. Reuse the existing easytier::web_client::run_web_client path and NetworkInstanceManager; OHOS is unchanged. Report successful remote config apply/delete operations through a callback, with one JSON event per affected instance. Keep the config server client and FFI data plane mutually exclusive: once either side is in use, the other side returns an error instead of sharing lifecycle state.
18 lines
573 B
Rust
18 lines
573 B
Rust
use std::{env, path::PathBuf};
|
|
|
|
fn main() {
|
|
let target_os = env::var("CARGO_CFG_TARGET_OS").unwrap_or_default();
|
|
if !matches!(target_os.as_str(), "android" | "linux") {
|
|
return;
|
|
}
|
|
|
|
let manifest_dir = PathBuf::from(env::var("CARGO_MANIFEST_DIR").unwrap());
|
|
let exports = manifest_dir.join("exports.map");
|
|
println!("cargo:rerun-if-changed={}", exports.display());
|
|
println!(
|
|
"cargo:rustc-cdylib-link-arg=-Wl,--version-script={}",
|
|
exports.display()
|
|
);
|
|
println!("cargo:rustc-cdylib-link-arg=-Wl,--exclude-libs,ALL");
|
|
}
|