Skip to content

Commit c8ff340

Browse files
committed
Use stable Rust toolchain for Swift builds
1 parent ff73462 commit c8ff340

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

scripts/uniffi_bindgen_generate_swift.sh

+8-6
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
#!/bin/bash
2+
set -eox pipefail
3+
24
BINDINGS_DIR="./bindings/swift"
35
UNIFFI_BINDGEN_BIN="cargo run --manifest-path bindings/uniffi-bindgen/Cargo.toml"
46

@@ -8,19 +10,19 @@ $UNIFFI_BINDGEN_BIN generate bindings/ldk_node.udl --language swift -o "$BINDING
810
mkdir -p $BINDINGS_DIR
911

1012
# Install rust target toolchains
11-
rustup install 1.73.0
12-
rustup component add rust-src --toolchain 1.73.0
13-
rustup target add aarch64-apple-ios x86_64-apple-ios --toolchain 1.73.0
14-
rustup target add aarch64-apple-ios-sim --toolchain 1.73.0
15-
rustup target add aarch64-apple-darwin x86_64-apple-darwin --toolchain 1.73.0
13+
rustup upgrade stable
14+
rustup component add rust-src --toolchain stable
15+
rustup target add aarch64-apple-ios x86_64-apple-ios --toolchain stable
16+
rustup target add aarch64-apple-ios-sim --toolchain stable
17+
rustup target add aarch64-apple-darwin x86_64-apple-darwin --toolchain stable
1618

1719
# Build rust target libs
1820
cargo build --profile release-smaller --features uniffi || exit 1
1921
cargo build --profile release-smaller --features uniffi --target x86_64-apple-darwin || exit 1
2022
cargo build --profile release-smaller --features uniffi --target aarch64-apple-darwin || exit 1
2123
cargo build --profile release-smaller --features uniffi --target x86_64-apple-ios || exit 1
2224
cargo build --profile release-smaller --features uniffi --target aarch64-apple-ios || exit 1
23-
cargo +1.73.0 build --release --features uniffi --target aarch64-apple-ios-sim || exit 1
25+
cargo +stable build --release --features uniffi --target aarch64-apple-ios-sim || exit 1
2426

2527
# Combine ios-sim and apple-darwin (macos) libs for x86_64 and aarch64 (m1)
2628
mkdir -p target/lipo-ios-sim/release-smaller || exit 1

0 commit comments

Comments
 (0)