Skip to content

Commit 849911e

Browse files
fixes
1 parent 5c58b00 commit 849911e

File tree

5 files changed

+15
-12
lines changed

5 files changed

+15
-12
lines changed

.github/workflows/tests-rs-sdk-ffi-build.yml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,10 +92,15 @@ jobs:
9292
BLST_PORTABLE: "1"
9393
IPHONEOS_DEPLOYMENT_TARGET: "18.0"
9494
IPHONESIMULATOR_DEPLOYMENT_TARGET: "18.0"
95-
RUSTFLAGS: "-C link-arg=-mios-version-min=18.0"
95+
CARGO_TARGET_AARCH64_APPLE_IOS_RUSTFLAGS: "-C link-arg=-mios-version-min=18.0"
96+
CARGO_TARGET_AARCH64_APPLE_IOS_SIM_RUSTFLAGS: "-C link-arg=-mios-version-min=18.0"
97+
CARGO_TARGET_X86_64_APPLE_IOS_RUSTFLAGS: "-C link-arg=-mios-version-min=18.0"
9698
run: |
9799
echo "Using BLST_PORTABLE=${BLST_PORTABLE} to avoid iOS linker issues"
98-
echo "Minimum iOS deployment target: ${IPHONEOS_DEPLOYMENT_TARGET} (RUSTFLAGS=${RUSTFLAGS})"
100+
echo "Minimum iOS deployment target: ${IPHONEOS_DEPLOYMENT_TARGET}"
101+
echo "AARCH64 iOS rustflags: ${CARGO_TARGET_AARCH64_APPLE_IOS_RUSTFLAGS}"
102+
echo "AARCH64 iOS-sim rustflags: ${CARGO_TARGET_AARCH64_APPLE_IOS_SIM_RUSTFLAGS}"
103+
echo "x86_64 iOS rustflags: ${CARGO_TARGET_X86_64_APPLE_IOS_RUSTFLAGS}"
99104
cargo build --release --target ${{ matrix.target }}
100105
101106
- name: Verify build output

packages/rs-sdk-ffi/Cargo.toml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,7 @@ drive-proof-verifier = { path = "../rs-drive-proof-verifier" }
1717
rs-sdk-trusted-context-provider = { path = "../rs-sdk-trusted-context-provider", features = ["dpns-contract"] }
1818
simple-signer = { path = "../simple-signer" }
1919

20-
[target.'cfg(any(target_os = "ios", target_os = "macos"))'.dependencies]
21-
# Core SDK integration (always included for unified SDK); relative to this crate
20+
# Core SDK integration (always included for unified SDK)
2221
dash-spv-ffi = { git = "https://github.com/dashpay/rust-dashcore", rev = "befd0356bebfcd0d06d1028d8a03bfa4c78bd219", optional = true }
2322
dashcore = { git = "https://github.com/dashpay/rust-dashcore", rev = "befd0356bebfcd0d06d1028d8a03bfa4c78bd219" }
2423

packages/rs-sdk-ffi/build_ios.sh

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,12 +37,16 @@ FRAMEWORK_NAME="DashSDKFFI"
3737
# Set iOS deployment targets to match Xcode 16 SDKs and avoid 10.0 default
3838
export IPHONEOS_DEPLOYMENT_TARGET="18.0"
3939
export IPHONESIMULATOR_DEPLOYMENT_TARGET="18.0"
40-
# Ensure linker uses the same min version when rustc links
41-
export RUSTFLAGS="${RUSTFLAGS:-} -C link-arg=-mios-version-min=${IPHONEOS_DEPLOYMENT_TARGET}"
40+
# Ensure linker uses the same min version when rustc links, but only for iOS targets
41+
export CARGO_TARGET_AARCH64_APPLE_IOS_RUSTFLAGS="${CARGO_TARGET_AARCH64_APPLE_IOS_RUSTFLAGS:-} -C link-arg=-mios-version-min=${IPHONEOS_DEPLOYMENT_TARGET}"
42+
export CARGO_TARGET_AARCH64_APPLE_IOS_SIM_RUSTFLAGS="${CARGO_TARGET_AARCH64_APPLE_IOS_SIM_RUSTFLAGS:-} -C link-arg=-mios-version-min=${IPHONESIMULATOR_DEPLOYMENT_TARGET}"
43+
export CARGO_TARGET_X86_64_APPLE_IOS_RUSTFLAGS="${CARGO_TARGET_X86_64_APPLE_IOS_RUSTFLAGS:-} -C link-arg=-mios-version-min=${IPHONESIMULATOR_DEPLOYMENT_TARGET}"
4244

4345
echo "Using IPHONEOS_DEPLOYMENT_TARGET=${IPHONEOS_DEPLOYMENT_TARGET}"
4446
echo "Using IPHONESIMULATOR_DEPLOYMENT_TARGET=${IPHONESIMULATOR_DEPLOYMENT_TARGET}"
45-
echo "RUSTFLAGS=${RUSTFLAGS}"
47+
echo "CARGO_TARGET_AARCH64_APPLE_IOS_RUSTFLAGS=${CARGO_TARGET_AARCH64_APPLE_IOS_RUSTFLAGS}"
48+
echo "CARGO_TARGET_AARCH64_APPLE_IOS_SIM_RUSTFLAGS=${CARGO_TARGET_AARCH64_APPLE_IOS_SIM_RUSTFLAGS}"
49+
echo "CARGO_TARGET_X86_64_APPLE_IOS_RUSTFLAGS=${CARGO_TARGET_X86_64_APPLE_IOS_RUSTFLAGS}"
4650

4751
echo -e "${GREEN}Building Dash SDK FFI for iOS ($BUILD_ARCH)${NC}"
4852

packages/rs-sdk-ffi/src/lib.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,6 @@ pub use protocol_version::*;
5151
pub use sdk::*;
5252
pub use signer::*;
5353
pub use signer_simple::*;
54-
#[cfg(feature = "dash_spv")]
55-
pub use spv_bridge::*;
5654
pub use system::*;
5755
pub use token::*;
5856
pub use types::*;

packages/rs-sdk-ffi/src/spv_bridge.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
#![allow(non_camel_case_types)]
22

3-
#[cfg(feature = "local-dashcore")]
43
use std::os::raw::{c_char, c_int};
54

6-
#[cfg(feature = "local-dashcore")]
75
#[no_mangle]
86
pub extern "C" fn dash_spv_ffi_config_add_peer(
97
config: *mut dash_spv_ffi::FFIClientConfig,
@@ -13,7 +11,6 @@ pub extern "C" fn dash_spv_ffi_config_add_peer(
1311
unsafe { dash_spv_ffi::dash_spv_ffi_config_add_peer(config, addr) }
1412
}
1513

16-
#[cfg(feature = "local-dashcore")]
1714
#[no_mangle]
1815
pub extern "C" fn dash_spv_ffi_config_set_restrict_to_configured_peers(
1916
config: *mut dash_spv_ffi::FFIClientConfig,

0 commit comments

Comments
 (0)