https://github.com/passy/android-rust-sample
https://github.com/passy/android-rust-sample
Last synced: 11 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/passy/android-rust-sample
- Owner: passy
- Created: 2019-01-27T17:02:46.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2019-01-27T17:05:54.000Z (over 7 years ago)
- Last Synced: 2025-07-31T04:42:46.006Z (12 months ago)
- Language: Rust
- Size: 1000 Bytes
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# rust-android-sample
## Setup
`~/.cargo/config`:
```
[target.x86_64-linux-android]
ar = "/opt/android_sdk/ndk-bundle/toolchains/llvm/prebuilt/darwin-x86_64/bin/x86_64-linux-android-ar"
linker = "/opt/android_sdk/ndk-bundle/toolchains/llvm/prebuilt/darwin-x86_64/bin/x86_64-linux-android28-clang++"
```
```
$ rustup target add x86_64-linux-android
$ cargo build --target x86_64-linux-android --release
```
```
$ cp target/x86_64-linux-android/release/librust.so .../src/main/jniLibs/
```