From 5535ef71125b406164169ee918745b99033bbc2e Mon Sep 17 00:00:00 2001 From: i5hi Date: Thu, 25 Jan 2024 16:51:42 +0530 Subject: [PATCH] Updated binary naming scheme --- lib/loader.dart | 6 +++--- lib/zzffi.dart | 2 +- rust/Cargo.toml | 3 +-- rust/darwin.sh | 4 ++-- 4 files changed, 7 insertions(+), 8 deletions(-) diff --git a/lib/loader.dart b/lib/loader.dart index 9cac2e9..46e8efe 100644 --- a/lib/loader.dart +++ b/lib/loader.dart @@ -9,7 +9,7 @@ import 'bridge_generated.dart'; class Dylib { static Map? _config; - static String get libName => "unittest.boltz.${_config!['TAG_VERSION']}"; + static String get libName => "unittest.libboltz.${_config!['TAG_VERSION']}"; static String get remoteUrl => "${_config!['REPOSITORY_URL']}${_config!['TAG_VERSION']}/$libName.zip"; static Future _loadJsonAsset() async { @@ -60,7 +60,7 @@ class Dylib { final assetsDir = '${currentDirectory.path}/build/unit_test_assets'; if (Platform.isMacOS) { - return "$assetsDir/$libName/macos/librust_boltz_ffi.dylib"; + return "$assetsDir/$libName/macos/libboltzclient.dylib"; } else { throw Exception("not support platform:${Platform.operatingSystem}"); } @@ -77,7 +77,7 @@ class Dylib { if (Platform.isIOS || Platform.isMacOS) { return DynamicLibrary.executable(); } else if (Platform.isAndroid) { - return DynamicLibrary.open("librust_boltz_ffi.so"); + return DynamicLibrary.open("libboltzclient.so"); } else { throw Exception("not support platform:${Platform.operatingSystem}"); } diff --git a/lib/zzffi.dart b/lib/zzffi.dart index 187b6ce..b0a6f4c 100644 --- a/lib/zzffi.dart +++ b/lib/zzffi.dart @@ -3,7 +3,7 @@ // import 'bridge_generated.dart'; -// const String _libName = 'boltz_dart'; +// const String _libName = 'libboltzclient'; // /// The dynamic library in which the symbols for [BoltzDartBindings] can be found. // final DynamicLibrary _dylib = () { diff --git a/rust/Cargo.toml b/rust/Cargo.toml index 7d1a239..66f5ea8 100644 --- a/rust/Cargo.toml +++ b/rust/Cargo.toml @@ -5,8 +5,7 @@ version = "0.1.0" edition = "2021" [lib] -name = "boltz_dart" -# path = "src/api.rs" +name = "boltzclient" doctest = false crate-type = ["staticlib", "cdylib", "lib"] diff --git a/rust/darwin.sh b/rust/darwin.sh index 4ac0d32..27f3504 100755 --- a/rust/darwin.sh +++ b/rust/darwin.sh @@ -7,8 +7,8 @@ NAME="libboltz" BUILD_DIR=$ROOT/$NAME.$VERSION # MACOS_DIR="../macos" # final binaries stored here # IOS_DIR="../ios" # final binaries stored here -FRAMEWORK="libboltz_dart.xcframework" -LIBNAME=libboltz_dart.a +FRAMEWORK="libboltz.xcframework" +LIBNAME=libboltzclient.a IOS_LIPO_DIR=$BUILD_DIR/ios-sim-lipo MAC_LIPO_DIR=$BUILD_DIR/mac-lipo