-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add makefile for kotlin, python, swift bindings
- Loading branch information
Showing
2 changed files
with
20 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,9 @@ | ||
To build the bindings: | ||
|
||
```bash | ||
# Kotlin | ||
cargo run --features=uniffi/cli --bin uniffi-bindgen generate src/ls_sdk.udl --no-format --language kotlin -o ffi/kotlin | ||
make kotlin | ||
|
||
# Python | ||
cargo run --features=uniffi/cli --bin uniffi-bindgen generate src/ls_sdk.udl --no-format --language python -o ffi/python | ||
make python | ||
|
||
# Swift | ||
cargo run --features=uniffi/cli --bin uniffi-bindgen generate src/ls_sdk.udl --no-format --language swift -o ffi/swift | ||
make swift | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
SOURCES=$(sort $(wildcard ./src/*.rs ./src/**/*.rs)) | ||
|
||
TARGET ?= x86_64-unknown-linux-gnu | ||
|
||
all: python kotlin swift | ||
|
||
python: $(SOURCES) | ||
cargo build --release --target $(TARGET) | ||
cargo run --features=uniffi/cli --bin uniffi-bindgen generate src/ls_sdk.udl --no-format --language python -o ffi/python | ||
|
||
kotlin: $(SOURCES) | ||
cargo build --release --target $(TARGET) | ||
cargo run --features=uniffi/cli --bin uniffi-bindgen generate src/ls_sdk.udl --no-format --language kotlin -o ffi/kotlin | ||
|
||
swift: $(SOURCES) | ||
cargo build --release --target $(TARGET) | ||
cargo run --features=uniffi/cli --bin uniffi-bindgen generate src/ls_sdk.udl --no-format --language swift -o ffi/swift |