Skip to content
This repository was archived by the owner on Sep 17, 2024. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@ libarklib.dll

!arklib/.cargo
arklib/.cargo/*
!arklib/.cargo/config
!arklib/.cargo/config
16 changes: 15 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,13 +47,27 @@ implementation 'dev.arkbuilders:arklib:0.3.1'

### Build Rust library

You need to have Rust targets installed:
#### Install Rust Android targets
```sh
rustup target add armv7-linux-androideabi
rustup target add aarch64-linux-android
rustup target add i686-linux-android
rustup target add x86_64-linux-android
```
#### Setup the environment
* ###### Linux
```sh
export ANDROID_HOME=$YOUR_ANDROID_SDK_PATH
export NDK_HOME=$ANDROID_HOME/ndk/{ndk-version}
export ANDROID_NDK_TOOLCHAIN_DIR=$NDK_HOME/toolchains/llvm/prebuilt/linux-x84_64
export AR=$ANDROID_NDK_TOOLCHAIN_DIR/bin/llvm-ar
export LD=$ANDROID_NDK_TOOLCHAIN_DIR/bin/ld
export RANLIB=$ANDROID_NDK_TOOLCHAIN_DIR/bin/llvm-ranlib
export STRIP=$ANDROID_NDK_TOOLCHAIN_DIR/bin/llvm-strip
export PATH=$PATH:$ANDROID_HOME/cmdline-tools/latest/bin
export PATH=$PATH:$ANDROID_NDK_TOOLCHAIN_DIR/bin
```
Replace `{ndk-version}` with the value of `android.ndkVersion` in `build.gradle (:lib)`

#### Compile Rust (option 1)

Expand Down
Loading