Skip to content

Commit

Permalink
Migrate 'crypto' (Rust bindings) to separate repo (#16)
Browse files Browse the repository at this point in the history
## Purpose

Complete the migration of the Rust binding library, i.e. `ConcordiumWalletCrypto` which was imported into another repository in Concordium/concordium-wallet-crypto-swift#2.

## Changes

Replace the previously embedded Rust code with an external dependency to the repository that it was moved to.
  • Loading branch information
bisgardo authored Feb 6, 2024
1 parent 05aff9d commit 5e70026
Show file tree
Hide file tree
Showing 16 changed files with 11 additions and 2,522 deletions.
10 changes: 0 additions & 10 deletions .github/workflows/build+test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ on:
pull_request:

env:
rust_version: "1.72"
swift_version: "5.9"

jobs:
Expand All @@ -18,17 +17,8 @@ jobs:
uses: swift-actions/setup-swift@v1
with:
swift-version: "${{env.swift_version}}"
- name: Setup Rust
run: |
rustup default "${{env.rust_version}}"
rustup target install aarch64-apple-darwin aarch64-apple-ios aarch64-apple-ios-sim x86_64-apple-darwin x86_64-apple-ios
- name: Check out sources
uses: actions/checkout@v4
with:
submodules: recursive
- name: Build rust bindings
run: ./build.sh
working-directory: ./lib/crypto
- name: Check formatting
run: swift package plugin --allow-writing-to-package-directory swiftformat --lint
- name: Build project
Expand Down
3 changes: 0 additions & 3 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
[submodule "concordium-grpc-api"]
path = concordium-grpc-api
url = https://github.com/Concordium/concordium-grpc-api.git
[submodule "lib/crypto/concordium-base"]
path = lib/crypto/concordium-base
url = https://github.com/Concordium/concordium-base.git
4 changes: 0 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,3 @@ fmt:
.PHONY: generate-grpc
generate-grpc:
protoc --proto_path=./concordium-grpc-api --grpc-swift_opt='Client=true,Server=false' --grpc-swift_out=./Sources/ConcordiumSwiftSdk/Generated/Grpc --swift_out=./Sources/ConcordiumSwiftSdk/Generated/Grpc ./concordium-grpc-api/v2/concordium/*.proto

.PHONY: build-crypto
build-crypto:
cd ./lib/crypto && ./build.sh
9 changes: 9 additions & 0 deletions Package.resolved
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,15 @@
"version" : "5.3.0"
}
},
{
"identity" : "concordium-wallet-crypto-swift",
"kind" : "remoteSourceControl",
"location" : "https://github.com/Concordium/concordium-wallet-crypto-swift.git",
"state" : {
"revision" : "7453b929c819fc926f8d805955988777467c879e",
"version" : "1.0.0"
}
},
{
"identity" : "grpc-swift",
"kind" : "remoteSourceControl",
Expand Down
4 changes: 2 additions & 2 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,14 @@ let package = Package(
.package(url: "https://github.com/anquii/Base58Check.git", from: "1.0.0"),
.package(url: "https://github.com/grpc/grpc-swift.git", from: "1.15.0"),
.package(url: "https://github.com/nicklockwood/SwiftFormat.git", exact: "0.53.0"),
.package(path: "./lib/crypto/ConcordiumWalletCrypto"),
.package(url: "https://github.com/Concordium/concordium-wallet-crypto-swift.git", exact: "1.0.0"),
],
targets: [
.target(
name: "ConcordiumSwiftSdk",
dependencies: [
"Base58Check",
"ConcordiumWalletCrypto",
.product(name: "ConcordiumWalletCrypto", package: "concordium-wallet-crypto-swift"),
.product(name: "GRPC", package: "grpc-swift"),
"SwiftFormat",
]
Expand Down
2 changes: 0 additions & 2 deletions lib/crypto/.gitignore

This file was deleted.

Loading

0 comments on commit 5e70026

Please sign in to comment.