diff --git a/Cargo.lock b/Cargo.lock index a09f549dd..a65644f37 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1400,6 +1400,17 @@ dependencies = [ "uniffi", ] +[[package]] +name = "uniffi-wysiwyg-composer" +version = "2.3.1" +dependencies = [ + "uniffi", + "uniffi_build", + "uniffi_macros", + "widestring", + "wysiwyg", +] + [[package]] name = "uniffi_bindgen" version = "0.24.1" @@ -1858,17 +1869,6 @@ dependencies = [ "widestring", ] -[[package]] -name = "wysiwyg-ffi" -version = "2.3.1" -dependencies = [ - "uniffi", - "uniffi_build", - "uniffi_macros", - "widestring", - "wysiwyg", -] - [[package]] name = "wysiwyg-wasm" version = "2.3.1" diff --git a/bindings/wysiwyg-ffi/Cargo.toml b/bindings/wysiwyg-ffi/Cargo.toml index 22301ecaa..f2eeca8a7 100644 --- a/bindings/wysiwyg-ffi/Cargo.toml +++ b/bindings/wysiwyg-ffi/Cargo.toml @@ -6,7 +6,7 @@ repository = "https://gitlab.com/andybalaam/wysiwyg-rust" description = "Swift and Kotlin bindings for wysiwyg-rust" keywords = ["matrix", "chat", "messaging", "composer", "wysiwyg"] license = "Apache-2.0" -name = "wysiwyg-ffi" +name = "uniffi-wysiwyg-composer" version = "2.3.1" rust-version = { workspace = true } diff --git a/bindings/wysiwyg-ffi/README.md b/bindings/wysiwyg-ffi/README.md index 93c7acd53..80a21a937 100644 --- a/bindings/wysiwyg-ffi/README.md +++ b/bindings/wysiwyg-ffi/README.md @@ -107,16 +107,16 @@ cargo build --release --target x86_64-apple-ios mkdir -p ../../target/ios-simulator lipo -create \ - ../../target/x86_64-apple-ios/release/libwysiwyg_ffi.a \ - ../../target/aarch64-apple-ios-sim/release/libwysiwyg_ffi.a \ - -output ../../target/ios-simulator/libwysiwyg_ffi.a + ../../target/x86_64-apple-ios/release/libuniffi_wysiwyg_composer.a \ + ../../target/aarch64-apple-ios-sim/release/libuniffi_wysiwyg_composer.a \ + -output ../../target/ios-simulator/libuniffi_wysiwyg_composer.a ``` * This will create static libraries for both iOS devices and simulators: ``` -../../target/x86_64-apple-ios/debug/libwysiwyg_ffi.a -../../target/ios-simulator/libwysiwyg_ffi.a +../../target/x86_64-apple-ios/debug/libuniffi_wysiwyg_composer.a +../../target/ios-simulator/libuniffi_wysiwyg_composer.a ``` * Generate the bindings inside given output dir: diff --git a/build_xcframework.sh b/build_xcframework.sh index 3ddec2005..0994fa1d3 100755 --- a/build_xcframework.sh +++ b/build_xcframework.sh @@ -5,10 +5,10 @@ GENERATION_PATH=.generated/ios UDL_FILE_PATH=bindings/wysiwyg-ffi/src/wysiwyg_composer.udl UNIFFI_CONFIG_FILE_PATH=bindings/wysiwyg-ffi/uniffi.toml -ARM64_LIB_PATH=target/aarch64-apple-ios/release/libwysiwyg_ffi.a -ARM64_SIM_LIB_PATH=target/aarch64-apple-ios-sim/release/libwysiwyg_ffi.a -X86_LIB_PATH=target/x86_64-apple-ios/release/libwysiwyg_ffi.a -SIM_LIB_PATH=target/ios-simulator/libwysiwyg_ffi.a +ARM64_LIB_PATH=target/aarch64-apple-ios/release/libuniffi_wysiwyg_composer.a +ARM64_SIM_LIB_PATH=target/aarch64-apple-ios-sim/release/libuniffi_wysiwyg_composer.a +X86_LIB_PATH=target/x86_64-apple-ios/release/libuniffi_wysiwyg_composer.a +SIM_LIB_PATH=target/ios-simulator/libuniffi_wysiwyg_composer.a IOS_PATH=platforms/ios TOOLS_PATH="${IOS_PATH}/tools" @@ -27,9 +27,9 @@ XCFRAMEWORK_ARM64_MODULES_PATH="${XCFRAMEWORK_ARM64_PATH}/Modules" XCFRAMEWORK_ARM64_LIBRARY_PATH="${XCFRAMEWORK_ARM64_PATH}/WysiwygComposerFFI" # Build libraries for each platform -cargo build -p wysiwyg-ffi --release --target aarch64-apple-ios -cargo build -p wysiwyg-ffi --release --target aarch64-apple-ios-sim -cargo build -p wysiwyg-ffi --release --target x86_64-apple-ios +cargo build -p uniffi-wysiwyg-composer --release --target aarch64-apple-ios +cargo build -p uniffi-wysiwyg-composer --release --target aarch64-apple-ios-sim +cargo build -p uniffi-wysiwyg-composer --release --target x86_64-apple-ios # Merge x86 and simulator arm libraries with lipo mkdir -p target/ios-simulator diff --git a/platforms/android/library/build.gradle b/platforms/android/library/build.gradle index ab653f146..d3e792425 100644 --- a/platforms/android/library/build.gradle +++ b/platforms/android/library/build.gradle @@ -15,7 +15,7 @@ apply plugin: "com.vanniktech.maven.publish" cargo { module = "../../../crates" // Or whatever directory contains your Cargo.toml - libname = "wysiwyg-ffi" // Or whatever matches Cargo.toml's [package] name. + libname = "uniffi-wysiwyg-composer" // Or whatever matches Cargo.toml's [package] name. targets = ["arm", "x86", "x86_64", "arm64"] targetIncludes = ["libuniffi_wysiwyg_composer.so"] targetDirectory = '../../../target'