From c379401634e12bd4ae9f2d9869c6e3e0e9728b66 Mon Sep 17 00:00:00 2001 From: Yuki Kishimoto Date: Wed, 27 Nov 2024 10:32:14 +0100 Subject: [PATCH] ffi: build only lib and not bins Signed-off-by: Yuki Kishimoto --- bindings/nostr-sdk-ffi/justfile | 8 ++++---- .../python/scripts/generate-linux-aarch64.sh | 2 +- .../python/scripts/generate-linux-x86_64.sh | 2 +- .../python/scripts/generate-macos-arm64.sh | 2 +- .../python/scripts/generate-macos-x86_64.sh | 2 +- .../nostr-sdk-ffi/python/scripts/generate-windows.sh | 2 +- bindings/nostr-sdk-ffi/swift/build-xcframework.sh | 10 +++++----- 7 files changed, 14 insertions(+), 14 deletions(-) diff --git a/bindings/nostr-sdk-ffi/justfile b/bindings/nostr-sdk-ffi/justfile index 4549ba85d..311f5cd8a 100755 --- a/bindings/nostr-sdk-ffi/justfile +++ b/bindings/nostr-sdk-ffi/justfile @@ -28,22 +28,22 @@ clean-android: [private] aarch64-linux-android: ndk rustup target add aarch64-linux-android - cargo ndk -t aarch64-linux-android -o ffi/kotlin/jniLibs build --release + cargo ndk -t aarch64-linux-android -o ffi/kotlin/jniLibs build --lib --release [private] armv7-linux-androideabi: ndk rustup target add armv7-linux-androideabi - cargo ndk -t armv7-linux-androideabi -o ffi/kotlin/jniLibs build --release + cargo ndk -t armv7-linux-androideabi -o ffi/kotlin/jniLibs build --lib --release [private] i686-linux-android: ndk rustup target add i686-linux-android - cargo ndk -t i686-linux-android -o ffi/kotlin/jniLibs build --release + cargo ndk -t i686-linux-android -o ffi/kotlin/jniLibs build --lib --release [private] x86_64-linux-android: ndk rustup target add x86_64-linux-android - cargo ndk -t x86_64-linux-android -o ffi/kotlin/jniLibs build --release + cargo ndk -t x86_64-linux-android -o ffi/kotlin/jniLibs build --lib --release [private] android: aarch64-linux-android armv7-linux-androideabi i686-linux-android x86_64-linux-android diff --git a/bindings/nostr-sdk-ffi/python/scripts/generate-linux-aarch64.sh b/bindings/nostr-sdk-ffi/python/scripts/generate-linux-aarch64.sh index 8c370e113..b974cf99b 100755 --- a/bindings/nostr-sdk-ffi/python/scripts/generate-linux-aarch64.sh +++ b/bindings/nostr-sdk-ffi/python/scripts/generate-linux-aarch64.sh @@ -6,7 +6,7 @@ pip install -r requirements.txt echo "Generating native binaries..." rustup target add aarch64-unknown-linux-gnu -CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER=aarch64-linux-gnu-gcc cargo build --release --target aarch64-unknown-linux-gnu +CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER=aarch64-linux-gnu-gcc cargo build --lib --release --target aarch64-unknown-linux-gnu echo "Generating nostr_sdk.py..." cd ../ diff --git a/bindings/nostr-sdk-ffi/python/scripts/generate-linux-x86_64.sh b/bindings/nostr-sdk-ffi/python/scripts/generate-linux-x86_64.sh index 116b72783..a3e2be8a3 100644 --- a/bindings/nostr-sdk-ffi/python/scripts/generate-linux-x86_64.sh +++ b/bindings/nostr-sdk-ffi/python/scripts/generate-linux-x86_64.sh @@ -6,7 +6,7 @@ ${PYBIN}/pip install -r requirements.txt echo "Generating native binaries..." rustup target add x86_64-unknown-linux-gnu -cargo build --release --target x86_64-unknown-linux-gnu +cargo build --lib --release --target x86_64-unknown-linux-gnu echo "Generating nostr_sdk.py..." cd ../ diff --git a/bindings/nostr-sdk-ffi/python/scripts/generate-macos-arm64.sh b/bindings/nostr-sdk-ffi/python/scripts/generate-macos-arm64.sh index 66989d6f6..a5b32b5dd 100644 --- a/bindings/nostr-sdk-ffi/python/scripts/generate-macos-arm64.sh +++ b/bindings/nostr-sdk-ffi/python/scripts/generate-macos-arm64.sh @@ -6,7 +6,7 @@ pip install --user -r requirements.txt echo "Generating native binaries..." rustup target add aarch64-apple-darwin -cargo build --release --target aarch64-apple-darwin +cargo build --lib --release --target aarch64-apple-darwin echo "Generating nostr_sdk.py..." cd ../ diff --git a/bindings/nostr-sdk-ffi/python/scripts/generate-macos-x86_64.sh b/bindings/nostr-sdk-ffi/python/scripts/generate-macos-x86_64.sh index e51225fd2..89c0201cf 100644 --- a/bindings/nostr-sdk-ffi/python/scripts/generate-macos-x86_64.sh +++ b/bindings/nostr-sdk-ffi/python/scripts/generate-macos-x86_64.sh @@ -6,7 +6,7 @@ pip install --user -r requirements.txt echo "Generating native binaries..." rustup target add x86_64-apple-darwin -cargo build --release --target x86_64-apple-darwin +cargo build --lib --release --target x86_64-apple-darwin echo "Generating nostr_sdk.py..." cd ../ diff --git a/bindings/nostr-sdk-ffi/python/scripts/generate-windows.sh b/bindings/nostr-sdk-ffi/python/scripts/generate-windows.sh index 08678ae15..0febad9b7 100644 --- a/bindings/nostr-sdk-ffi/python/scripts/generate-windows.sh +++ b/bindings/nostr-sdk-ffi/python/scripts/generate-windows.sh @@ -6,7 +6,7 @@ pip install --user -r requirements.txt echo "Generating native binaries..." rustup target add x86_64-pc-windows-msvc -cargo build --release --target x86_64-pc-windows-msvc +cargo build --lib --release --target x86_64-pc-windows-msvc echo "Generating nostr_sdk.py..." cd ../ diff --git a/bindings/nostr-sdk-ffi/swift/build-xcframework.sh b/bindings/nostr-sdk-ffi/swift/build-xcframework.sh index 2549f91d5..fb7fadce0 100644 --- a/bindings/nostr-sdk-ffi/swift/build-xcframework.sh +++ b/bindings/nostr-sdk-ffi/swift/build-xcframework.sh @@ -21,11 +21,11 @@ rustup target add aarch64-apple-darwin # mac M1 rustup target add x86_64-apple-darwin # mac x86_64 # Build iOS and Darwin targets -cargo build -p nostr-sdk-ffi --release --target x86_64-apple-darwin -cargo build -p nostr-sdk-ffi --release --target aarch64-apple-darwin -cargo build -p nostr-sdk-ffi --release --target x86_64-apple-ios -cargo build -p nostr-sdk-ffi --release --target aarch64-apple-ios -cargo build -p nostr-sdk-ffi --release --target aarch64-apple-ios-sim +cargo build -p nostr-sdk-ffi --lib --release --target x86_64-apple-darwin +cargo build -p nostr-sdk-ffi --lib --release --target aarch64-apple-darwin +cargo build -p nostr-sdk-ffi --lib --release --target x86_64-apple-ios +cargo build -p nostr-sdk-ffi --lib --release --target aarch64-apple-ios +cargo build -p nostr-sdk-ffi --lib --release --target aarch64-apple-ios-sim # Make universal dirs (only for iOS simulator and Darwin) mkdir -p "${TARGET_DIR}/ios-universal-sim/release" # iOS Simulator