Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
240 commits
Select commit Hold shift + click to select a range
ee755aa
ios start
QuantumExplorer Jun 2, 2025
6adc716
more work on ios
QuantumExplorer Jun 2, 2025
fd7ce13
more work
QuantumExplorer Jun 2, 2025
1d10634
ios
QuantumExplorer Jun 2, 2025
d01cd9b
feat: add data contract put methods and standardize return types in i…
QuantumExplorer Jun 2, 2025
efb64cf
more
QuantumExplorer Jun 2, 2025
afbb390
ios
QuantumExplorer Jun 2, 2025
b76a342
fmt
QuantumExplorer Jun 2, 2025
85bedad
ios
QuantumExplorer Jun 2, 2025
a3e7d27
more work
QuantumExplorer Jun 2, 2025
bd2aa90
token
QuantumExplorer Jun 3, 2025
7df79c4
more work
QuantumExplorer Jun 3, 2025
00e18fe
more work
QuantumExplorer Jun 3, 2025
cdbe84e
more work
QuantumExplorer Jun 3, 2025
78bb3ed
more work
QuantumExplorer Jun 3, 2025
9295685
more work
QuantumExplorer Jun 3, 2025
8c9642e
more work
QuantumExplorer Jun 3, 2025
a43c67f
more work
QuantumExplorer Jun 3, 2025
77a17e6
fixes
QuantumExplorer Jun 3, 2025
cb4cc31
Merge branch 'v2.0-dev' into ios
QuantumExplorer Jun 4, 2025
ad333cc
document ffi
QuantumExplorer Jun 4, 2025
21fb1b2
better ffi for tokens
QuantumExplorer Jun 4, 2025
4a3f2db
better ffi for tokens
QuantumExplorer Jun 4, 2025
1022009
more work
QuantumExplorer Jun 4, 2025
2eb6d08
more work
QuantumExplorer Jun 4, 2025
b7802d2
refactor: split identity FFI module into organized submodules
QuantumExplorer Jun 4, 2025
aa96f4c
more work
QuantumExplorer Jun 4, 2025
ebfcfd2
more work on sdk
QuantumExplorer Jun 4, 2025
182fe70
more fixes
QuantumExplorer Jun 4, 2025
189b17d
more work
QuantumExplorer Jun 4, 2025
2892fc0
more work
QuantumExplorer Jun 5, 2025
d99bb62
more work
QuantumExplorer Jun 5, 2025
33b470d
queries
Jun 6, 2025
96d0ea2
more work
QuantumExplorer Jun 6, 2025
a38268e
more work
Jun 6, 2025
5e997f7
more work
QuantumExplorer Jun 6, 2025
b73419a
more work
QuantumExplorer Jun 6, 2025
a63d61e
more work
QuantumExplorer Jun 6, 2025
3dacba6
fix
QuantumExplorer Jun 6, 2025
a599d16
more work
QuantumExplorer Jun 6, 2025
faa5933
more work
QuantumExplorer Jun 6, 2025
93016ae
swift example app
QuantumExplorer Jun 8, 2025
719e89d
more work
QuantumExplorer Jun 8, 2025
d93094d
more work
QuantumExplorer Jun 8, 2025
b1d3d15
more work
QuantumExplorer Jun 8, 2025
a0a2be1
more work
QuantumExplorer Jun 8, 2025
84eed10
architecture
QuantumExplorer Jun 9, 2025
8757f3a
architecture
QuantumExplorer Jun 9, 2025
56434ee
architecture
QuantumExplorer Jun 9, 2025
223ee16
Update SDK_ARCHITECTURE.md
QuantumExplorer Jun 9, 2025
2b12a5f
more iOS work
QuantumExplorer Jun 10, 2025
7d22e74
Merge branch 'ios' of github.com:dashpay/platform into ios
QuantumExplorer Jun 10, 2025
54e3c21
Merge branch 'v2.0-dev' into ios
QuantumExplorer Jun 10, 2025
7bb6860
added package
QuantumExplorer Jun 10, 2025
db88b1a
Merge branch 'ios' of github.com:dashpay/platform into ios
QuantumExplorer Jun 10, 2025
7ba9668
more work
QuantumExplorer Jun 10, 2025
7ddc886
more work (not sure)
Jun 25, 2025
98ddab7
feat: Add runtime isolation for rs-sdk-ffi and remove panic handler
Jul 13, 2025
7837bea
feat(rs-sdk-ffi): implement function pointer architecture for Platfor…
Jul 13, 2025
2752259
feat: Implement Unified SDK architecture combining Core and Platform
Jul 16, 2025
6878d8b
feat(rs-sdk-ffi): expose both DashSDKFFI and DashSPVFFI modules
Jul 16, 2025
96e4d6b
chore: exclude all XCFramework files from version control
Jul 22, 2025
f75123f
feat(SwiftExampleApp): integrate Core wallet functionality from dashp…
Jul 30, 2025
8946ba0
test: add Swift constants for SwiftDashSDK tests
Jul 30, 2025
822507b
Merge branch 'v2.1-dev' into feat/ios-2
Jul 30, 2025
3af7cb5
fix: Remove duplicate GetTokenContractInfoRequest implementation
Jul 30, 2025
fa6a530
fix: Remove duplicate TokenContractInfo import
Jul 30, 2025
0080679
fix: Resolve FFI type alias issues and merge conflicts
Jul 30, 2025
c9537c5
fix: resolve build issues after v2.1-dev merge
Jul 30, 2025
809fa38
feat: implement comprehensive HD wallet functionality in SwiftExampleApp
Jul 30, 2025
e909b6b
fix: resolve Rust FFI compilation errors with dashcore API
Jul 30, 2025
3a4f4e1
fix: resolve enum naming conflicts in FFI headers
Jul 31, 2025
fa336ce
fix: add missing enum renaming in iOS build script
Jul 31, 2025
ef030fb
feat: integrate real FFI implementations for wallet operations
Jul 31, 2025
f179612
fix: improve wallet creation error handling and debugging
Jul 31, 2025
7a29751
feat: Add comprehensive debugging to wallet FFI bridge
Jul 31, 2025
3ca53ba
fix: Fix Core Data validation errors in wallet creation
Jul 31, 2025
dc7f048
Fix wallet creation navigation issues in SwiftExampleApp
Aug 1, 2025
e724408
Add AddressManagementView.swift to fix build error
Aug 1, 2025
349936b
Add detailed logging to debug wallet creation issues
Aug 1, 2025
e56a153
Fix Core Data validation errors by sharing ModelContainer
Aug 1, 2025
aae260a
fix: implement real address generation using FFI functions
Aug 1, 2025
61c729a
feat: replace mock Platform queries with real FFI implementations
Aug 1, 2025
4f004d0
feat: implement SDK initialization with trusted setup
Aug 1, 2025
80cc6b2
Revert "feat: implement SDK initialization with trusted setup"
Aug 1, 2025
814df76
feat: implement SDK initialization with trusted setup for iOS
Aug 1, 2025
2d75c2b
fix: identity fetch now returns JSON instead of handle
Aug 1, 2025
68557b2
feat: add comprehensive logging to debug query execution
Aug 1, 2025
3cc4af0
feat: add comprehensive logging and timeout handling for query debugging
Aug 1, 2025
925e8ff
fix: SDK now uses real DAPI addresses instead of falling back to mock…
Aug 1, 2025
2de2d8a
fix: update Swift SDK to use working DAPI addresses from WASM SDK
Aug 1, 2025
6707623
feat: implement SDK status query with mode and quorum count
Aug 1, 2025
33c5b5e
fix: iOS build issues and add SDK status query
Aug 1, 2025
1163681
Debug iOS HTTP request failure: add network diagnostics and Info.plist
Aug 1, 2025
65069dd
Fix Info.plist conflict by removing manually created file
Aug 1, 2025
e15237e
Fix JSON serialization crash for primitive query results
Aug 1, 2025
d94da21
feat: Update iOS query implementations to match WASM SDK parameters
Aug 1, 2025
7045387
feat: Implement remaining FFI query functions in iOS
Aug 1, 2025
02b5b7a
fix: Fix compilation errors in iOS Platform query implementations
Aug 2, 2025
56466f6
feat: Add Diagnostics section with Run All Queries feature
Aug 2, 2025
3a7efe9
feat(ios): Add comprehensive diagnostics view with all 44 platform qu…
Aug 2, 2025
3854e10
fix(ios): Update diagnostic test data to match WASM SDK exactly
Aug 2, 2025
68c830d
fix(ios): Fix platform query errors and improve success rate
Aug 2, 2025
5dd4618
fix(ios): Add missing version files for build
Aug 2, 2025
dd667ec
fix(ios-sdk): Fix token query result formats
Aug 2, 2025
fcb27ab
fix(ios-sdk): Fix getGroupActionSigners invalid action ID
Aug 2, 2025
bc9aa8f
fix(ios-sdk): Fix getTotalCreditsInPlatform and update group test data
Aug 2, 2025
4344746
feat(ios-sdk): Add platform status query to return real block heights
Aug 2, 2025
0f435ae
feat(ios-sdk): Add missing system queries
Aug 2, 2025
1f7bd3b
fix(ios-sdk): Improve error reporting and fix group query contract IDs
Aug 2, 2025
6993415
fix(ios): implement startAfter/startAt pagination and fix test data
Aug 2, 2025
1694405
fix(ios): resolve multiple query errors improving success rate to 76.6%
Aug 2, 2025
0eedbe8
fix: improve platform query implementations
Aug 2, 2025
95b5aa4
feat: add state transitions UI structure
Aug 2, 2025
cf65f71
Fix DPNS queries implementation
Aug 2, 2025
e88232d
Fix StateTransitionsView compilation error
Aug 3, 2025
cf71c42
fmt
QuantumExplorer Aug 3, 2025
62c8ab6
feat: Implement native DPNS queries at Rust SDK level
Aug 3, 2025
0f51a75
fix: Fix DPNS query test compilation error
Aug 3, 2025
40f9bdd
fix: Correct AddressList initialization in DPNS test
Aug 3, 2025
91cf7b3
fix: fix async runtime error in DPNS network tests
Aug 3, 2025
0874580
feat: add trusted context provider support to DPNS tests
Aug 3, 2025
f63ac43
fix: fix DPNS queries to use correct indexed fields
Aug 3, 2025
949416c
fix(rs-sdk-ffi): Fix DPNS get_usernames FFI function identity_id para…
Aug 3, 2025
b72a8f4
fix(swift-sdk): Update dpnsGetUsername to pass identity ID as string
Aug 3, 2025
e085bef
feat(rs-sdk-ffi): Add DPNS resolve FFI function
Aug 3, 2025
38c03a4
fix(tests): Update DPNS resolve tests to use existing name
Aug 3, 2025
adb65d8
fix: Fix contested resource queries index value handling and enable D…
Aug 3, 2025
1d9f853
fix: Use SDK's resolve_dpns_name method in FFI
Aug 3, 2025
f3de3c3
feat: Add getIdentityTokenBalances query to Swift SDK
Aug 3, 2025
ea03bd5
fix: use SDK's Fetch trait for Token Perpetual Distribution Last Claim
Aug 3, 2025
5137fe5
fix: improve identity loading and display in SwiftExampleApp
Aug 3, 2025
2845077
Fix StateTransitionExtensions compilation errors
Aug 3, 2025
bf498af
Implement Identity Credit Transfer and Withdrawal state transitions
Aug 3, 2025
ce2e17a
feat: Add automatic key selection for identity state transitions
Aug 3, 2025
ff3b844
fix: Resolve StateTransitionType enum conflict in Swift SDK
Aug 3, 2025
69debe3
feat: Add identity ID normalization for transfers
Aug 3, 2025
7cb28f5
fix: Remove toBase58 usage to fix build error
Aug 3, 2025
f368685
feat(ios): Add hex to base58 conversion support for identity IDs
Aug 3, 2025
ac58a50
debug: Add character-level debugging for base58 parsing errors
Aug 3, 2025
76623eb
fix(ios): Remove version overlay and move to settings
Aug 3, 2025
b191b15
fix(ios): Export utils module and import DashSDKFFI
Aug 3, 2025
103ff6f
fix: Identity IDs now properly handle base58 format in FFI calls
Aug 3, 2025
55e9e63
feat(ios): Add state transition test suite with env-based credentials
Aug 3, 2025
515a0e5
fix(ios): Fix compilation errors in WalletTests
Aug 3, 2025
dfb728c
feat(ios): Add TestKeyGenerator utility class
Aug 3, 2025
be3741e
fix(ios): Temporarily disable identity transfer to prevent crash
Aug 3, 2025
b97b501
Revert "fix(ios): Temporarily disable identity transfer to prevent cr…
Aug 3, 2025
782de74
fix: resolve EXC_BAD_ACCESS crash in identity transfer operations
Aug 3, 2025
7bf9ade
fix: add missing parse.rs file for identity JSON parsing
Aug 3, 2025
d3ed485
fix: update state transition tests to use new handle-based API
Aug 3, 2025
234c8aa
fix
QuantumExplorer Aug 3, 2025
f7073a9
fix: update tests to use base58 identity IDs and fix EnvLoader for iOS
Aug 3, 2025
d415eee
fix: use identity parse JSON to handle conversion in tests
Aug 3, 2025
71bc4db
feat: add identity get public key by ID function and fix transfer tests
Aug 3, 2025
d883785
fix: cast identity handle to OpaquePointer for get_public_key_by_id
Aug 3, 2025
8acb29d
refactor: Change identity transfer and withdraw APIs to use public ke…
Aug 3, 2025
1c511ea
fix: Add dash_sdk_identity_fetch_handle to resolve EXC_BAD_ACCESS crash
Aug 3, 2025
a9a89a8
debug: Add extensive logging to trace identity transfer crash
Aug 3, 2025
0697abe
debug: Add more detailed logging and test auto-select key mode
Aug 3, 2025
9b5aaf6
debug: Add test module to investigate crash location
Aug 3, 2025
94bd729
fix: Fix iOS build and correct DASH credit calculations
Aug 3, 2025
a38a695
more work
QuantumExplorer Aug 3, 2025
3e31fd8
feat(ios): Add private key management with WIF support
QuantumExplorer Aug 4, 2025
4535d0a
fmt and fixes
QuantumExplorer Aug 4, 2025
590f184
more work
QuantumExplorer Aug 4, 2025
53cc980
saved contracts
QuantumExplorer Aug 4, 2025
910d64e
saved contracts
QuantumExplorer Aug 4, 2025
f04c501
a lot more work
QuantumExplorer Aug 6, 2025
c9fc53d
fixes
QuantumExplorer Aug 6, 2025
0b96514
fixes
QuantumExplorer Aug 6, 2025
8eec6fc
fixes
QuantumExplorer Aug 6, 2025
985dbfb
fixes
QuantumExplorer Aug 6, 2025
84d2e5d
more work
QuantumExplorer Aug 7, 2025
41dcc5a
more work
QuantumExplorer Aug 7, 2025
49434ec
more work
QuantumExplorer Aug 7, 2025
2a8499d
more work
QuantumExplorer Aug 7, 2025
64e5da4
more work
QuantumExplorer Aug 8, 2025
1ac8bec
more work
QuantumExplorer Aug 8, 2025
9b2f5c9
more work
QuantumExplorer Aug 8, 2025
f8ec0e4
more work
QuantumExplorer Aug 9, 2025
e7cdc34
more work
QuantumExplorer Aug 9, 2025
3f79791
work on contested names
QuantumExplorer Aug 10, 2025
b2a96db
more work on contested names
QuantumExplorer Aug 10, 2025
41ef3a7
more work on document purchase
QuantumExplorer Aug 10, 2025
e16fc0c
selection restrictions
QuantumExplorer Aug 10, 2025
7b03493
contract create
QuantumExplorer Aug 10, 2025
0881e5e
clean up
QuantumExplorer Aug 10, 2025
7dc9732
lock
QuantumExplorer Aug 12, 2025
bbfabce
core v40 support
QuantumExplorer Aug 12, 2025
44ebb06
added features
QuantumExplorer Aug 13, 2025
8c623f6
added priv and pub
QuantumExplorer Aug 13, 2025
a4e792a
switched to rust 1.89
QuantumExplorer Aug 18, 2025
7896a1a
improvements for core
QuantumExplorer Aug 19, 2025
7f89944
Merge branch 'v2.1-dev' into feat/ios-2
QuantumExplorer Aug 19, 2025
e8cea28
Merge branch 'feat/ios-2' of github.com:dashpay/platform into feat/ios-2
QuantumExplorer Aug 19, 2025
84adb67
Merge branch 'feat/core40support' into feat/ios-3
QuantumExplorer Aug 27, 2025
401f620
more work
QuantumExplorer Aug 27, 2025
3baba41
many fixes
QuantumExplorer Aug 29, 2025
022e40c
more work
QuantumExplorer Aug 30, 2025
0c6c345
more work
QuantumExplorer Aug 31, 2025
49ab405
more work
QuantumExplorer Aug 31, 2025
198bb8d
fixes
QuantumExplorer Sep 1, 2025
3f7d16d
a lot of fixes
QuantumExplorer Sep 1, 2025
cb9b2eb
more work
QuantumExplorer Sep 1, 2025
061e7b6
more work
QuantumExplorer Sep 2, 2025
d3fc638
swift work
QuantumExplorer Sep 3, 2025
7443bbd
switcher
QuantumExplorer Sep 3, 2025
d9ab181
more work
QuantumExplorer Sep 3, 2025
df09cd2
clean up
QuantumExplorer Sep 3, 2025
c6f188a
Merge branch 'v2.1-dev' into feat/ios-3
QuantumExplorer Sep 3, 2025
5112995
Merge branch 'v2.1-dev' into feat/ios-3
QuantumExplorer Sep 3, 2025
50074df
fixes
QuantumExplorer Sep 3, 2025
d32b2a7
updated rust dash core
QuantumExplorer Sep 3, 2025
5934024
lock
QuantumExplorer Sep 3, 2025
cc2d8fc
small fix
QuantumExplorer Sep 3, 2025
e0aa524
clean up
QuantumExplorer Sep 4, 2025
744b6d9
refactor(sdk): clean up parts of project against warnings (#2762)
QuantumExplorer Sep 5, 2025
bf5896c
fix
QuantumExplorer Sep 5, 2025
4239989
fix for core stubs
QuantumExplorer Sep 5, 2025
bcc5b16
fixed build
QuantumExplorer Sep 5, 2025
bc7b861
fixes
QuantumExplorer Sep 6, 2025
6230170
more work
QuantumExplorer Sep 6, 2025
8f3d8e1
more work
QuantumExplorer Sep 6, 2025
8b50e2f
fixes
QuantumExplorer Sep 6, 2025
435cb5e
more work
QuantumExplorer Sep 6, 2025
19b9783
more work
QuantumExplorer Sep 6, 2025
d38e814
more work
QuantumExplorer Sep 6, 2025
3e4d5d4
fixes
QuantumExplorer Sep 6, 2025
c1a71c8
more work
QuantumExplorer Sep 7, 2025
90d4568
newer versions
QuantumExplorer Sep 7, 2025
b220537
Merge branch 'v2.1-dev' into feat/ios-3
QuantumExplorer Sep 7, 2025
900c995
fixes
QuantumExplorer Sep 7, 2025
da3d7d7
Merge branch 'feat/ios-3' of github.com:dashpay/platform into feat/ios-3
QuantumExplorer Sep 7, 2025
3d97630
fixes
QuantumExplorer Sep 7, 2025
389d3f2
fixes
QuantumExplorer Sep 7, 2025
32c728c
some more fixes
QuantumExplorer Sep 7, 2025
2ea2b9d
sdk fixes
QuantumExplorer Sep 7, 2025
e5a9316
clean up
QuantumExplorer Sep 7, 2025
ce73eee
fix
QuantumExplorer Sep 7, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 2 additions & 0 deletions .cargo/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ rustflags = [
"target-feature=-crt-static",
"-C",
"target-cpu=x86-64",
"-C",
"link-arg=-lstdc++",
]

[target.aarch64-unknown-linux-gnu]
Expand Down
11 changes: 4 additions & 7 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -18,21 +18,18 @@ RUN apt-get update && apt-get install -y \
# Switch to clang
RUN rm /usr/bin/cc && ln -s /usr/bin/clang /usr/bin/cc

# Install protoc - protobuf compiler
# The one shipped with Alpine does not work
# Install protoc - protobuf compiler (pin to 32.0)
# Alpine/system protoc may be outdated; install from releases
ARG TARGETARCH
ARG PROTOC_VERSION=27.3
ARG PROTOC_VERSION=32.0
RUN if [[ "$TARGETARCH" == "arm64" ]] ; then export PROTOC_ARCH=aarch_64; else export PROTOC_ARCH=x86_64; fi; \
curl -Ls https://github.com/protocolbuffers/protobuf/releases/download/v${PROTOC_VERSION}/protoc-${PROTOC_VERSION}-linux-${PROTOC_ARCH}.zip \
-o /tmp/protoc.zip && \
unzip -qd /opt/protoc /tmp/protoc.zip && \
rm /tmp/protoc.zip && \
ln -s /opt/protoc/bin/protoc /usr/bin/

# Install protoc
RUN curl -OL https://github.com/protocolbuffers/protobuf/releases/download/v${PROTOC_VERSION}/protoc-${PROTOC_VERSION}-linux-x86_64.zip \
&& unzip protoc-${PROTOC_VERSION}-linux-x86_64.zip -d /usr/local \
&& rm protoc-${PROTOC_VERSION}-linux-x86_64.zip
# Remove duplicate install; single install above is sufficient

# Switch to vscode user
USER vscode
Expand Down
61 changes: 40 additions & 21 deletions .github/actions/rust/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,12 @@ inputs:
runs:
using: composite
steps:
- name: Resolve HOME path for caching
id: resolved_home
shell: bash
run: |
echo "home=$HOME" >> "$GITHUB_OUTPUT"

- name: Extract Rust toolchain version from rust-toolchain.toml
shell: bash
id: rust_toolchain
Expand All @@ -41,6 +47,7 @@ runs:
components: ${{ inputs.components }}

- name: Get protoc arch
if: runner.os == 'Linux'
shell: bash
id: protoc_arch
run: |
Expand All @@ -59,28 +66,40 @@ runs:
;;
esac

- name: Check if protoc is installed
id: check-protoc
shell: bash
run: |
if command -v protoc >/dev/null 2>&1; then
echo "protoc is already installed."
echo "protoc_installed=true" >> $GITHUB_OUTPUT
else
echo "protoc is not installed."
echo "protoc_installed=false" >> $GITHUB_OUTPUT
fi
- name: Restore cached protoc (v32.0)
if: runner.os == 'Linux'
id: cache-protoc
uses: actions/cache@v4
with:
path: |
${{ steps.resolved_home.outputs.home }}/.local/protoc-32.0/bin
${{ steps.resolved_home.outputs.home }}/.local/protoc-32.0/include
key: protoc/32.0/${{ runner.os }}/${{ steps.protoc_arch.outputs.arch }}

- name: Install protoc
if: steps.check-protoc.outputs.protoc_installed == 'false'
- name: Install protoc (cached v32.0)
if: runner.os == 'Linux'
id: deps-protoc
shell: bash
run: |
curl -Lo /tmp/protoc.zip \
"https://github.com/protocolbuffers/protobuf/releases/download/v27.3/protoc-27.3-linux-${{ steps.protoc_arch.outputs.arch }}.zip"
unzip -o /tmp/protoc.zip -d ${HOME}/.local
echo "PROTOC=${HOME}/.local/bin/protoc" >> $GITHUB_ENV
export PATH="${PATH}:${HOME}/.local/bin"
set -euxo pipefail
PROTOC_DIR="${HOME}/.local/protoc-32.0"
if [ ! -x "${PROTOC_DIR}/bin/protoc" ]; then
mkdir -p "${PROTOC_DIR}"
curl -fsSL -o /tmp/protoc.zip \
"https://github.com/protocolbuffers/protobuf/releases/download/v32.0/protoc-32.0-linux-${{ steps.protoc_arch.outputs.arch }}.zip"
unzip -o /tmp/protoc.zip -d "${PROTOC_DIR}"
fi
echo "${PROTOC_DIR}/bin" >> "$GITHUB_PATH"
echo "PROTOC=${PROTOC_DIR}/bin/protoc" >> "$GITHUB_ENV"

- name: Save cached protoc (v32.0)
if: runner.os == 'Linux' && steps.cache-protoc.outputs.cache-hit != 'true'
uses: actions/cache/save@v4
with:
path: |
${{ steps.resolved_home.outputs.home }}/.local/protoc-32.0/bin
${{ steps.resolved_home.outputs.home }}/.local/protoc-32.0/include
key: protoc/32.0/${{ runner.os }}/${{ steps.protoc_arch.outputs.arch }}

- name: Set HOME variable to github context
shell: bash
Expand All @@ -91,9 +110,9 @@ runs:
if: inputs.cache == 'true'
with:
path: |
${{ env.HOME }}/.cargo/registry/index
${{ env.HOME }}/.cargo/registry/cache
${{ env.HOME }}/.cargo/git
${{ steps.resolved_home.outputs.home }}/.cargo/registry/index
${{ steps.resolved_home.outputs.home }}/.cargo/registry/cache
${{ steps.resolved_home.outputs.home }}/.cargo/git
key: ${{ runner.os }}/cargo/registry/${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}/cargo/registry/${{ hashFiles('**/Cargo.lock') }}
Expand Down
8 changes: 8 additions & 0 deletions .github/package-filters/rs-packages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,3 +75,11 @@ dash-sdk:
- packages/rs-sdk/**
- *dapi_client
- *drive

rs-sdk-ffi:
- .github/workflows/tests*
- packages/rs-sdk-ffi/**
- packages/rs-sdk/**
- packages/rs-drive-proof-verifier/**
- *dapi_client
- *drive
33 changes: 29 additions & 4 deletions .github/workflows/tests-build-js.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@ jobs:
password: ${{ secrets.DOCKERHUB_TOKEN }}
if: ${{ steps.check-artifact.outputs.exists != 'true' }}

- name: Pre-pull protoc Docker image for gRPC codegen
run: docker pull rvolosatovs/protoc:4.0.0
if: ${{ steps.check-artifact.outputs.exists != 'true' }}

- name: Setup Node.JS
uses: ./.github/actions/nodejs
if: ${{ steps.check-artifact.outputs.exists != 'true' }}
Expand Down Expand Up @@ -53,11 +57,32 @@ jobs:
run: cargo binstall wasm-bindgen-cli@0.2.100
if: ${{ steps.check-artifact.outputs.exists != 'true' }}

- name: Install Binaryen
- name: Restore cached wasm-opt (Binaryen)
id: cache-binaryen
uses: actions/cache@v4
with:
path: ${{ env.HOME }}/.cache/binaryen/version_121
key: binaryen/version_121/${{ runner.os }}/x86_64

- name: Install wasm-opt if cache miss
if: steps.cache-binaryen.outputs.cache-hit != 'true'
run: |
wget https://github.com/WebAssembly/binaryen/releases/download/version_121/binaryen-version_121-x86_64-linux.tar.gz -P /tmp
tar -xzf /tmp/binaryen-version_121-x86_64-linux.tar.gz -C /tmp
sudo cp -r /tmp/binaryen-version_121/* /usr/local/
set -euxo pipefail
mkdir -p "${HOME}/.cache/binaryen"
curl -fsSL -o /tmp/binaryen.tar.gz \
"https://github.com/WebAssembly/binaryen/releases/download/version_121/binaryen-version_121-x86_64-linux.tar.gz"
tar -xzf /tmp/binaryen.tar.gz -C "${HOME}/.cache/binaryen"
mv "${HOME}/.cache/binaryen/binaryen-version_121" "${HOME}/.cache/binaryen/version_121"

- name: Save cached wasm-opt
if: steps.cache-binaryen.outputs.cache-hit != 'true'
uses: actions/cache/save@v4
with:
path: ${{ env.HOME }}/.cache/binaryen/version_121
key: binaryen/version_121/${{ runner.os }}/x86_64

- name: Export wasm-opt to PATH
run: echo "${HOME}/.cache/binaryen/version_121/bin" >> $GITHUB_PATH
if: ${{ steps.check-artifact.outputs.exists != 'true' }}

- name: Build JS packages
Expand Down
116 changes: 116 additions & 0 deletions .github/workflows/tests-rs-sdk-ffi-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,116 @@
name: Test rs-sdk-ffi build

on:
workflow_dispatch:
pull_request:
paths:
- 'packages/rs-sdk-ffi/**'
- 'packages/rs-sdk/**'
- '.github/workflows/tests-rs-sdk-ffi-build.yml'
push:
branches:
- master
- 'v*-dev'
paths:
- 'packages/rs-sdk-ffi/**'
- 'packages/rs-sdk/**'
- '.github/workflows/tests-rs-sdk-ffi-build.yml'

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
build-ffi-ios:
name: Build rs-sdk-ffi for iOS targets
# macOS runners are required to access Apple SDKs (no osxcross here)
runs-on: macos-latest
strategy:
fail-fast: false
matrix:
target: [aarch64-apple-ios, aarch64-apple-ios-sim]
steps:
- name: Check out repo
uses: actions/checkout@v4

- name: Setup Rust
uses: ./.github/actions/rust
with:
target: ${{ matrix.target }}

- name: Add Rust target
run: |
rustup target add ${{ matrix.target }}

- name: Restore cached Protobuf (protoc)
id: cache-protoc
uses: actions/cache@v4
with:
path: |
${{ env.HOME }}/.local/protoc-32.0/bin
${{ env.HOME }}/.local/protoc-32.0/include
key: protoc/32.0/${{ runner.os }}/universal

- name: Install Protobuf (protoc) if cache miss
if: steps.cache-protoc.outputs.cache-hit != 'true'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
set -euxo pipefail
VERSION=32.0
OS=osx-universal_binary
PROTOC_DIR="$HOME/.local/protoc-${VERSION}"
mkdir -p "$PROTOC_DIR"
curl -fsSL -H "Authorization: token ${GITHUB_TOKEN}" \
-o /tmp/protoc.zip \
"https://github.com/protocolbuffers/protobuf/releases/download/v${VERSION}/protoc-${VERSION}-${OS}.zip"
unzip -o /tmp/protoc.zip -d "$PROTOC_DIR"

- name: Save cached Protobuf (protoc)
if: steps.cache-protoc.outputs.cache-hit != 'true'
uses: actions/cache/save@v4
with:
path: |
${{ env.HOME }}/.local/protoc-32.0/bin
${{ env.HOME }}/.local/protoc-32.0/include
key: protoc/32.0/${{ runner.os }}/universal

- name: Verify protoc and export env
run: |
set -euxo pipefail
export PATH="$HOME/.local/protoc-32.0/bin:$PATH"
echo "PROTOC=$HOME/.local/protoc-32.0/bin/protoc" >> "$GITHUB_ENV"
"$HOME/.local/protoc-32.0/bin/protoc" --version
# Ensure build scripts see an absolute PROTOC path (some parse parent dirs)
echo "PROTOC=$(which protoc)" >> "$GITHUB_ENV"
# Enable backtraces for clearer failure logs if any build.rs panics
echo "RUST_BACKTRACE=1" >> "$GITHUB_ENV"

- name: Build FFI library
working-directory: packages/rs-sdk-ffi
env:
BLST_PORTABLE: "1"
IPHONEOS_DEPLOYMENT_TARGET: "18.0"
IPHONESIMULATOR_DEPLOYMENT_TARGET: "18.0"
RUSTFLAGS: "-C link-arg=-mios-version-min=18.0"
run: |
echo "Using BLST_PORTABLE=${BLST_PORTABLE} to avoid iOS linker issues"
echo "Minimum iOS deployment target: ${IPHONEOS_DEPLOYMENT_TARGET} (RUSTFLAGS=${RUSTFLAGS})"
cargo build --release --target ${{ matrix.target }}

- name: Verify build output
run: |
LIB=target/${{ matrix.target }}/release/librs_sdk_ffi.a
if [ ! -f "$LIB" ]; then
echo "Error: FFI library was not built for ${{ matrix.target }}"
exit 1
fi
echo "FFI library successfully built for ${{ matrix.target }}"
ls -la "$LIB"

- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: rs-sdk-ffi-${{ matrix.target }}-release
path: |
target/${{ matrix.target }}/release/librs_sdk_ffi.a
4 changes: 2 additions & 2 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ on:
types: [opened, synchronize, reopened, ready_for_review]
branches:
- master
- 'v[0-9]+\.[0-9]+-dev'
- 'v*-dev'
push:
branches:
- master
- 'v[0-9]+\.[0-9]+-dev'
- 'v*-dev'
schedule:
- cron: "30 4 * * *"

Expand Down
Loading
Loading