Skip to content

Commit

Permalink
ffi: build only lib and not bins
Browse files Browse the repository at this point in the history
Signed-off-by: Yuki Kishimoto <[email protected]>
  • Loading branch information
yukibtc committed Nov 27, 2024
1 parent 9abddf7 commit c379401
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 14 deletions.
8 changes: 4 additions & 4 deletions bindings/nostr-sdk-ffi/justfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 ../
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 ../
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 ../
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 ../
Expand Down
2 changes: 1 addition & 1 deletion bindings/nostr-sdk-ffi/python/scripts/generate-windows.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 ../
Expand Down
10 changes: 5 additions & 5 deletions bindings/nostr-sdk-ffi/swift/build-xcframework.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit c379401

Please sign in to comment.