Skip to content

Commit

Permalink
chore: init for build script
Browse files Browse the repository at this point in the history
  • Loading branch information
phodal committed Nov 13, 2023
1 parent 6a6265a commit a501c17
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
3 changes: 1 addition & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
TARGET_DIR := target

android:
@make bindgen-kotlin
cd examples/android && ./gradlew cargoBuild --info
cd examples/android && ./gradlew cargoBuild

# refs to https://mozilla.github.io/uniffi-rs/tutorial/foreign_language_bindings.html
bindgen-kotlin:
Expand Down
10 changes: 10 additions & 0 deletions examples/android/app/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,6 +1,16 @@
plugins {
id("com.android.application")
id("org.jetbrains.kotlin.android")
id("org.mozilla.rust-android-gradle.rust-android") version "0.9.3" apply true
}

cargo {
prebuiltToolchains = true
targetDirectory = "$projectDir/../../../../target" // because of workspace
module = "$projectDir/../../../inference_core" // Or whatever directory contains your Cargo.toml
libname = "inference_core" // Or whatever matches Cargo.toml's [package] name.
profile = "release"
targets = listOf("arm", "arm64", "x86", "x86_64")
}

android {
Expand Down

0 comments on commit a501c17

Please sign in to comment.