Skip to content

Commit 5b20d9f

Browse files
committed
Switch to using uniffi_cli
1 parent a6e34f2 commit 5b20d9f

File tree

6 files changed

+27
-20
lines changed

6 files changed

+27
-20
lines changed

rust/Cargo.lock

Lines changed: 17 additions & 10 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

rust/Cargo.toml

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,6 @@ edition = "2024"
77
crate-type = ["lib", "staticlib", "cdylib"]
88
name = "cove"
99

10-
[[bin]]
11-
name = "uniffi-bindgen"
12-
path = "src/bin/uniffi-bindgen.rs"
13-
14-
[features]
15-
default = ["uniffi/cli"]
16-
1710
[workspace]
1811
members = ["crates/*"]
1912

rust/crates/uniffi_cli/Cargo.toml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
[package]
2+
name = "uniffi_cli"
3+
version = "0.1.0"
4+
edition = "2024"
5+
6+
[dependencies]
7+
uniffi = { workspace = true, features = ["cli"] }
File renamed without changes.

scripts/build-android.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ cp target/aarch64-linux-android/release/libcove.so ../android/app/src/main/jniLi
2929
cp target/x86_64-linux-android/release/libcove.so ../android/app/src/main/jniLibs/x86_64/libcoveffi.so
3030

3131
# Create Kotlin bindings
32-
cargo run --bin uniffi-bindgen generate \
32+
cargo run -p uniffi_cli generate \
3333
--library target/aarch64-linux-android/release/libcove.so \
3434
--language kotlin \
3535
--out-dir ../android/app/src/main/java \

scripts/build-ios.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,8 @@ mkdir -p "$OUTPUT_DIR"
6262

6363
echo "Running uniffi-bindgen for ${TARGETS[0]}, outputting to $OUTPUT_DIR"
6464
rm -rf $OUTPUT_DIR || true
65-
cargo run --bin uniffi-bindgen -- "$STATIC_LIB_PATH" "$OUTPUT_DIR" \
65+
cargo run -p uniffi_cli \
66+
-- "$STATIC_LIB_PATH" "$OUTPUT_DIR" \
6667
--swift-sources --headers \
6768
--modulemap --module-name cove_core_ffi \
6869
--modulemap-filename module.modulemap
@@ -73,7 +74,6 @@ SPM_PACKAGE="../ios/CoveCore/"
7374
XCFRAMEWORK_OUTPUT="$SPM_PACKAGE/Sources/cove_core_ffi.xcframework"
7475
GENERATED_SWIFT_SOURCES=$SPM_PACKAGE/Sources/CoveCore/generated
7576

76-
7777
rm -rf "$XCFRAMEWORK_OUTPUT" || true
7878
xcodebuild -create-xcframework \
7979
$LIBRARY_FLAGS \

0 commit comments

Comments
 (0)