Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add C++ SDK and update uniffi to 0.25.0 #295

Merged
merged 6 commits into from
Jun 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions .github/workflows/build_dart_sdk.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ jobs:
rustup default stable
rustup override set stable
rustup target add --toolchain stable ${{ matrix.target }}
cargo build --profile dart --target=${{ matrix.target }}
cargo build --release --target=${{ matrix.target }}
cd ../../../
move target\${{ matrix.target }}\dart\*.dll .
move target\${{ matrix.target }}\release\*.dll .
7z a ${{ matrix.target }}.7z *.dll
- name: Upload
uses: svenstaro/upload-release-action@v2
Expand Down Expand Up @@ -55,9 +55,9 @@ jobs:
rustup default stable
rustup override set stable
rustup target add --toolchain stable ${{ matrix.target }}
cargo build --profile dart --target=${{ matrix.target }}
cargo build --release --target=${{ matrix.target }}
cd ../../../
mv target/${{ matrix.target }}/dart/*.dylib .
mv target/${{ matrix.target }}/release/*.dylib .
tar acf ${{ matrix.target }}.tar.xz *.dylib
- name: Upload
uses: svenstaro/upload-release-action@v2
Expand Down Expand Up @@ -89,9 +89,9 @@ jobs:
rustup override set stable
rustup target add --toolchain stable ${{ matrix.target }}
cargo install cross --git https://github.com/cross-rs/cross
cross build --profile dart --target=${{ matrix.target }}
cross build --release --target=${{ matrix.target }}
cd ../../../
mv target/${{ matrix.target }}/dart/*.so .
mv target/${{ matrix.target }}/release/*.so .
tar acf ${{ matrix.target }}.tar.xz *.so
- name: Upload
uses: svenstaro/upload-release-action@v2
Expand Down
21 changes: 17 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -105,13 +105,26 @@ jobs:
with:
crate: uniffi-bindgen-go
git: https://github.com/NordSecurity/uniffi-bindgen-go
tag: "v0.1.5+v0.23.0"
cache-key: "uniffi-bindgen-go@v0.1.5+v0.23.0"
tag: "v0.2.1+v0.25.0"
cache-key: "uniffi-bindgen-go@v0.2.1+v0.25.0"
- uses: actions/setup-go@v4
with:
go-version: 1.21
- run: make test_go

cpp_binding:
name: cpp binding
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: baptiste0928/cargo-install@v2
with:
crate: uniffi-bindgen-cpp
git: https://github.com/NordSecurity/uniffi-bindgen-cpp
tag: "v0.6.0+v0.25.0"
cache-key: "[email protected]+v0.25.0"
- run: make build_cpp run_example_cpp

python_binding:
name: python binding
runs-on: ubuntu-latest
Expand Down Expand Up @@ -144,9 +157,9 @@ jobs:
flutter pub get
flutter_rust_bridge_codegen generate
cd rust
cargo build --profile dart
cargo build --release
cd ..
cp ../../target/dart/*.so .
cp ../../target/release/*.so .
export LD_LIBRARY_PATH=./:$LD_LIBRARY_PATH
dart pub add --dev test
dart test/main.dart
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ examples/Golang/generated/
examples/Python/zklink_sdk*
examples/Python/libzklink_sdk*
examples/Python/__pycache__
examples/Cpp/generated/
bindings/generated


Loading
Loading