Skip to content

Commit 09a25ae

Browse files
build: update rust and uniffi version
1 parent 13c746a commit 09a25ae

File tree

7 files changed

+1536
-1230
lines changed

7 files changed

+1536
-1230
lines changed

.github/workflows/build.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name: "Anoncreds"
22

33
env:
4-
RUST_VERSION: "1.65.0"
4+
RUST_VERSION: "1.73.0"
55
CROSS_VERSION: "0.2.4"
66

77
on:
@@ -107,8 +107,8 @@ jobs:
107107
- name: Release artifacts
108108
uses: a7ul/[email protected]
109109
if: |
110-
(${{ matrix.architecture }} != 'swift-package-universal' &&
111-
github.event_name == 'release' ||
110+
matrix.architecture != 'swift-package-universal' &&
111+
(github.event_name == 'release' ||
112112
(github.event_name == 'workflow_dispatch' && github.event.inputs.publish-binaries == 'true'))
113113
with:
114114
command: c
@@ -118,8 +118,8 @@ jobs:
118118

119119
- name: Add library artifacts to release
120120
if: |
121-
(${{ matrix.architecture }} != 'swift-package-universal' &&
122-
github.event_name == 'release' ||
121+
matrix.architecture != 'swift-package-universal' &&
122+
(github.event_name == 'release' ||
123123
(github.event_name == 'workflow_dispatch' && github.event.inputs.publish-binaries == 'true'))
124124
uses: svenstaro/upload-release-action@v2
125125
with:
@@ -128,10 +128,10 @@ jobs:
128128

129129
- name: Add swift package artifacts to release
130130
if: |
131-
(${{ matrix.architecture }} == 'swift-package-universal' &&
132-
github.event_name == 'release' ||
131+
matrix.architecture == 'swift-package-universal' &&
132+
(github.event_name == 'release' ||
133133
(github.event_name == 'workflow_dispatch' && github.event.inputs.publish-binaries == 'true'))
134134
uses: svenstaro/upload-release-action@v2
135135
with:
136-
file: ${{ matrix.lib }}
136+
file: ${{ matrix.libPath }}
137137
asset_name: "${{ matrix.lib }}"

uniffi/Cargo.toml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,17 @@ crate-type = [
1313
]
1414
name = "anoncreds_uniffi"
1515

16+
[[bin]]
17+
name = "uniffi-bindgen"
18+
path = "uniffi-bindgen.rs"
19+
1620
[dependencies.anoncreds_core]
1721
path = '..'
1822
package = "anoncreds"
1923
features = ["vendored"]
2024

2125
[dependencies]
22-
uniffi_macros = "0.20.0"
23-
uniffi = { version = "0.20.0", features=["builtin-bindgen"] }
26+
uniffi = { version = "0.24.3" }
2427
lazy_static = "1.3"
2528
futures = { version = "0.3.17", features = ["thread-pool"] }
2629
num_cpus = "1.8.0"
@@ -39,5 +42,5 @@ features = [
3942
]
4043

4144
[build-dependencies]
42-
uniffi_build = { version = "0.20.0", features=["builtin-bindgen"] }
45+
uniffi = { version = "0.24.3", features = [ "build", "cli" ] }
4346
swift-bridge-build = "0.1.51"

uniffi/build-release-apple-universal.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ mkdir -p ./target/universal-darwin/release || true
2525

2626
# Generate Uniffi bindings
2727
echo "Creating uniffi bindings"
28-
uniffi-bindgen generate src/anoncreds.udl --language swift -o ./wrappers/swift/anoncreds
28+
cargo run --bin uniffi-bindgen generate src/anoncreds.udl --language swift -o ./wrappers/swift/anoncreds
2929

3030
# Build targets
3131
echo "Build all targets"

uniffi/build-release-linux.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,12 @@ rm -f ./wrappers/kotlin/anoncreds/uniffi/anoncreds/anoncreds.kt || true
99
cargo build --release --target x86_64-unknown-linux-gnu
1010

1111
# Generate the file anoncreds.kt in wrappers/kotlin/anoncreds/uniffi/anoncreds/anoncreds.kt
12-
~/.cargo/bin/uniffi-bindgen generate src/anoncreds.udl --language kotlin -o ./wrappers/kotlin/anoncreds
12+
cargo run --bin uniffi-bindgen generate src/anoncreds.udl --language kotlin -o ./wrappers/kotlin/anoncreds
1313

1414
# Move code to output-frameworks/anoncreds-jvm
1515
rm -f ./output-frameworks/anoncreds-jvm/src/main/uniffi/anoncreds/anoncreds.kt
1616
mv ./wrappers/kotlin/anoncreds/uniffi/anoncreds/anoncreds.kt ./output-frameworks/anoncreds-jvm/src/main/uniffi/anoncreds/anoncreds.kt
1717

1818
# make the jar
1919
cd ./output-frameworks/anoncreds-jvm
20-
./gradlew jar
20+
./gradlew jar

uniffi/build.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
fn main() {
2-
uniffi_build::generate_scaffolding("./src/anoncreds.udl").unwrap();
2+
uniffi::generate_scaffolding("./src/anoncreds.udl").unwrap();
33
}

0 commit comments

Comments
 (0)