android example xbuild

This commit is contained in:
Alexi Chepura
2023-10-24 17:29:25 +03:00
parent 7c9b6a143c
commit 02d1368d25
2 changed files with 40 additions and 0 deletions

View File

@@ -5,10 +5,25 @@ Get libopenxr_loader.so from the Oculus OpenXR Mobile SDK and add it to `example
https://developer.oculus.com/downloads/package/oculus-openxr-mobile-sdk/
`examples/android/runtime_libs/arm64-v8a/libopenxr_loader.so`
## Run
Running on Meta Quest can be done with https://github.com/rust-mobile/cargo-apk.
```sh
cargo apk run --release
```
But cargo-apk is deprecated in favour of xbuild https://github.com/rust-mobile/xbuild.
```sh
# Install latest version of xbuild
cargo install --git https://github.com/rust-mobile/xbuild
```
```sh
# List devices and copy device string "adb:***"
x devices
# Run on this device
x run --release --device adb:***
```
There is [manifest.yaml](./manifest.yaml) example required by xbuild.
Interface for this manifest can be found as AndroidConfig struct in https://github.com/rust-mobile/xbuild/blob/master/xbuild/src/config.rs
## Notes