Skip to content

Commit

Permalink
Updated binary naming scheme
Browse files Browse the repository at this point in the history
  • Loading branch information
i5hi committed Jan 25, 2024
1 parent 0f3c109 commit 5535ef7
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 8 deletions.
6 changes: 3 additions & 3 deletions lib/loader.dart
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import 'bridge_generated.dart';

class Dylib {
static Map<String, dynamic>? _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<void> _loadJsonAsset() async {
Expand Down Expand Up @@ -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}");
}
Expand All @@ -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}");
}
Expand Down
2 changes: 1 addition & 1 deletion lib/zzffi.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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 = () {
Expand Down
3 changes: 1 addition & 2 deletions rust/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"]

Expand Down
4 changes: 2 additions & 2 deletions rust/darwin.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 5535ef7

Please sign in to comment.