### Build and Run Rust Android Example with GameActivity Source: https://github.com/rust-mobile/rust-android-examples/blob/main/agdk-egui/README.md This snippet provides the necessary steps to set up the environment, build, and run a Rust Android application that utilizes GameActivity, egui, winit, and wgpu. It covers NDK/SDK setup, Rust target addition, cargo-ndk installation, building with cargo ndk, and deploying/launching the app via Gradle and ADB. ```bash export ANDROID_NDK_HOME="path/to/ndk" export ANDROID_HOME="path/to/sdk" rustup target add aarch64-linux-android cargo install cargo-ndk cargo ndk -t arm64-v8a -o app/src/main/jniLibs/ build ./gradlew build ./gradlew installDebug adb shell am start -n co.realfit.agdkegui/.MainActivity ``` -------------------------------- ### Build and Run Rust Android Application Source: https://github.com/rust-mobile/rust-android-examples/blob/main/agdk-winit-wgpu/README.md This set of commands outlines the steps required to prepare the environment, build a Rust application for Android, and then install and launch it on an Android device. It includes setting NDK and SDK paths, adding the Android target, installing `cargo-ndk`, building the Rust library, and finally building and deploying the Android APK using Gradle and ADB. ```bash export ANDROID_NDK_HOME="path/to/ndk" export ANDROID_HOME="path/to/sdk" rustup target add aarch64-linux-android cargo install cargo-ndk cargo ndk -t arm64-v8a -o app/src/main/jniLibs/ build ./gradlew build ./gradlew installDebug adb shell am start -n co.realfit.agdkwinitwgpu/.MainActivity ``` -------------------------------- ### Build Rust Android Application with Gradle Source: https://github.com/rust-mobile/rust-android-examples/blob/main/na-winit-wgpu/README.md This snippet outlines the steps to build a Rust Android application using Gradle. It involves setting up NDK and SDK paths, adding the Android target, installing `cargo-ndk`, and then building and installing the application via Gradle. ```Bash export ANDROID_NDK_HOME="path/to/ndk" export ANDROID_HOME="path/to/sdk" rustup target add aarch64-linux-android cargo install cargo-ndk cargo ndk -t arm64-v8a -o app/src/main/jniLibs/ build ./gradlew build ./gradlew installDebug ``` -------------------------------- ### Build and Run Rust Android Application Source: https://github.com/rust-mobile/rust-android-examples/blob/main/agdk-eframe/README.md This snippet provides the necessary steps to set up the environment, build, and run a Rust Android application. It includes setting NDK/SDK paths, adding the Android target, installing `cargo-ndk`, building with `cargo ndk`, and deploying/launching with Gradle and ADB. ```Shell export ANDROID_NDK_HOME="path/to/ndk" export ANDROID_HOME="path/to/sdk" rustup target add aarch64-linux-android cargo install cargo-ndk cargo ndk -t arm64-v8a -o app/src/main/jniLibs/ build ./gradlew build ./gradlew installDebug adb shell am start -n co.realfit.agdkeframe/.MainActivity ``` -------------------------------- ### Build Android App with Gradle Source: https://github.com/rust-mobile/rust-android-examples/blob/main/na-winit-glutin/README.md This snippet outlines the steps to build the Android application using Gradle. It covers setting up necessary environment variables for NDK and SDK, adding the Rust target for Android, installing `cargo-ndk`, and then executing the build and install commands via `cargo ndk` and `gradlew`. ```bash export ANDROID_NDK_HOME="path/to/ndk" export ANDROID_HOME="path/to/sdk" rustup target add aarch64-linux-android cargo install cargo-ndk cargo ndk -t arm64-v8a -o app/src/main/jniLibs/ build ./gradlew build ./gradlew installDebug ``` -------------------------------- ### Build Rust Android Application with Gradle Source: https://github.com/rust-mobile/rust-android-examples/blob/main/na-mainloop/README.md This snippet provides the necessary shell commands to set up the environment and build a Rust Android application using Gradle. It covers setting NDK and SDK paths, adding the Android target for Rust, installing `cargo-ndk`, building the Rust library for Android, and finally building and installing the Android application using Gradle. ```Shell export ANDROID_NDK_HOME="path/to/ndk" export ANDROID_HOME="path/to/sdk" rustup target add aarch64-linux-android cargo install cargo-ndk cargo ndk -t arm64-v8a -o app/src/main/jniLibs/ build ./gradlew build ./gradlew installDebug ``` -------------------------------- ### Build and Install Android Application for Oculus Quest Source: https://github.com/rust-mobile/rust-android-examples/blob/main/na-openxr-info/README.md Sets up environment variables for Android NDK and SDK, adds the `aarch64-linux-android` rust target, and installs `cargo-ndk`. It then builds the Rust project for Android using `cargo ndk` and finally builds and installs the Android application onto a connected device using Gradle. ```bash export ANDROID_NDK_HOME="path/to/ndk" export ANDROID_HOME="path/to/sdk" rustup target add aarch64-linux-android cargo install cargo-ndk cargo ndk -t arm64-v8a -o app/src/main/jniLibs/ build --features=android ./gradlew build ./gradlew installDebug ``` -------------------------------- ### Build and Run Rust Android Application Source: https://github.com/rust-mobile/rust-android-examples/blob/main/agdk-oboe/README.md This script sets up the Android NDK and SDK paths, adds the Android target for Rust, installs `cargo-ndk`, builds the Rust Android project for `arm64-v8a`, builds the Gradle project, installs the debug APK, and launches the application on an attached device. ```Shell export ANDROID_NDK_HOME="path/to/ndk" export ANDROID_HOME="path/to/sdk" rustup target add aarch64-linux-android cargo install cargo-ndk cargo ndk -t arm64-v8a -o app/src/main/jniLibs/ build ./gradlew build ./gradlew installDebug adb shell am start -n co.realfit.agdkoboe/.MainActivity ``` -------------------------------- ### Build and Run Rust Android Application Source: https://github.com/rust-mobile/rust-android-examples/blob/main/na-egui/README.md This script provides a complete workflow for setting up the development environment, compiling a Rust application for Android using `cargo-ndk`, and then deploying and launching it on an Android device. It assumes Android NDK and SDK are installed and their paths are configured. ```bash export ANDROID_NDK_HOME="path/to/ndk" export ANDROID_HOME="path/to/sdk" rustup target add aarch64-linux-android cargo install cargo-ndk cargo ndk -t arm64-v8a -o app/src/main/jniLibs/ build ./gradlew build ./gradlew installDebug adb shell am start -n co.realfit.naegui/.MainActivity ``` -------------------------------- ### Build and Run Rust Android Application Source: https://github.com/rust-mobile/rust-android-examples/blob/main/agdk-cpal/README.md This script provides the necessary commands to set up the Android development environment for Rust, build the application using `cargo-ndk`, and then deploy and launch it on an Android device. Ensure `ANDROID_NDK_HOME` and `ANDROID_HOME` are correctly set to your NDK and SDK paths. ```Shell export ANDROID_NDK_HOME="path/to/ndk" export ANDROID_HOME="path/to/sdk" rustup target add aarch64-linux-android cargo install cargo-ndk cargo ndk -t arm64-v8a -o app/src/main/jniLibs/ build ./gradlew build ./gradlew installDebug adb shell am start -n co.realfit.agdkcpal/.MainActivity ``` -------------------------------- ### Build and Run Android Application with Gradle Source: https://github.com/rust-mobile/rust-android-examples/blob/main/na-subclass-jni/README.md This snippet provides the necessary shell commands to set up the environment, build the Rust library for Android using `cargo-ndk`, compile the Android application with Gradle, install it on a device, and finally launch the main activity. It outlines the complete build and deployment process for the Android project. ```Shell export ANDROID_NDK_HOME="path/to/ndk" export ANDROID_HOME="path/to/sdk" rustup target add aarch64-linux-android cargo install cargo-ndk cargo ndk -t arm64-v8a -o app/src/main/jniLibs/ build ./gradlew build ./gradlew installDebug adb shell am start -n co.realfit.nasubclassjni/.MainActivity ``` -------------------------------- ### Build and Run Rust Android Application Source: https://github.com/rust-mobile/rust-android-examples/blob/main/agdk-mainloop/README.md This script sets up environment variables for Android NDK and SDK, adds the Android target for Rust, installs `cargo-ndk`, builds the Rust project for Android, builds the Android application using Gradle, installs the debug APK, and launches the application on an attached device. ```Shell export ANDROID_NDK_HOME="path/to/ndk" export ANDROID_HOME="path/to/sdk" rustup target add aarch64-linux-android cargo install cargo-ndk cargo ndk -t arm64-v8a -o app/src/main/jniLibs/ build ./gradlew build ./gradlew installDebug adb shell am start -n co.realfit.agdkmainloop/.MainActivity ``` -------------------------------- ### Build and Run Rust Android Application with Cargo APK Source: https://github.com/rust-mobile/rust-android-examples/blob/main/na-winit-wgpu/README.md This snippet details how to build and run a Rust Android application directly using `cargo-apk`. It requires setting up NDK and SDK paths, adding the Android target, installing `cargo-apk`, and then running the application. ```Bash export ANDROID_NDK_HOME="path/to/ndk" export ANDROID_SDK_HOME="path/to/sdk" rustup target add aarch64-linux-android cargo install cargo-apk cargo apk run ``` -------------------------------- ### Build and Run Android App with Cargo APK Source: https://github.com/rust-mobile/rust-android-examples/blob/main/na-winit-glutin/README.md This snippet details the process for building and running the Android application directly using `cargo-apk`. It includes setting up environment variables for NDK and SDK, adding the Rust target for Android, installing `cargo-apk`, and finally running the application on a connected device or emulator. ```bash export ANDROID_NDK_HOME="path/to/ndk" export ANDROID_SDK_HOME="path/to/sdk" rustup target add aarch64-linux-android cargo install cargo-apk cargo apk run ``` -------------------------------- ### Build and Run Rust Android Application with Cargo APK Source: https://github.com/rust-mobile/rust-android-examples/blob/main/na-mainloop/README.md This snippet outlines the steps to build and run a Rust Android application directly using `cargo-apk`. It includes setting environment variables for NDK and SDK, adding the Android target for Rust, installing `cargo-apk`, and then executing the build and run commands. ```Shell export ANDROID_NDK_HOME="path/to/ndk" export ANDROID_SDK_HOME="path/to/sdk" rustup target add aarch64-linux-android cargo install cargo-apk cargo apk build cargo apk run ``` -------------------------------- ### Build Desktop Application with OpenXR Feature Source: https://github.com/rust-mobile/rust-android-examples/blob/main/na-openxr-info/README.md Runs the Rust project with the `desktop` feature enabled, allowing it to compile for PC. This command is used to build the OpenXR application specifically for desktop environments, leveraging desktop-specific OpenXR functionalities. ```bash cargo run --features=desktop ``` -------------------------------- ### Copy OpenXR Loader for Oculus Quest (arm64-v8a) Source: https://github.com/rust-mobile/rust-android-examples/blob/main/na-openxr-info/README.md Copies the `libopenxr_loader.so` library from the Oculus OpenXR Mobile SDK to the Android project's `jniLibs` directory for the `arm64-v8a` architecture. This step is required for building OpenXR applications on Oculus Quest, ensuring the correct loader is available at runtime. ```bash mkdir app/src/main/jniLibs/arm64-v8a cp ovr_openxr_mobile_sdk_53.0/OpenXR/Libs/Android/arm64-v8a/Debug/libopenxr_loader.so app/src/main/jniLibs/arm64-v8a/libopenxr_loader.so ``` -------------------------------- ### Build OpenXR Wgpu Application for Oculus Quest Source: https://github.com/rust-mobile/rust-android-examples/blob/main/na-openxr-wgpu/README.md This snippet provides the necessary shell commands to prepare your environment and build the OpenXR Wgpu application for Android, targeting Oculus Quest. It involves setting Android SDK/NDK paths, adding the Android Rust target, installing `cargo-ndk`, and then building the project using `cargo ndk` and `gradlew`. ```Shell export ANDROID_NDK_HOME="path/to/ndk" export ANDROID_HOME="path/to/sdk" rustup target add aarch64-linux-android cargo install cargo-ndk cargo ndk -t arm64-v8a -o app/src/main/jniLibs/ build ./gradlew build ./gradlew installDebug ``` -------------------------------- ### Enable Vulkan Validation Layer on Oculus Quest Source: https://github.com/rust-mobile/rust-android-examples/blob/main/na-openxr-info/README.md Uses `adb shell` to set a system property on the Oculus Quest device, enabling the Vulkan validation layer for the specified application package (`co.realfit.naopenxrwgpu`). This command is useful for debugging Vulkan-based applications by providing detailed error and warning messages. ```bash adb shell setprop debug.oculus.loadandinjectpackagedvvl.co.realfit.naopenxrwgpu 1 ``` -------------------------------- ### Build OpenXR Wgpu Application for Desktop Source: https://github.com/rust-mobile/rust-android-examples/blob/main/na-openxr-wgpu/README.md This command builds and runs the OpenXR Wgpu application for desktop platforms. It activates the 'desktop' feature, which configures the build process for non-Android environments. ```Shell cargo run --features=desktop ``` -------------------------------- ### Enable Vulkan Validation Layer on Oculus Quest Source: https://github.com/rust-mobile/rust-android-examples/blob/main/na-openxr-wgpu/README.md This ADB shell command enables the Vulkan validation layer on an Oculus Quest device for the specified application. This is useful for debugging Vulkan rendering issues by providing detailed error and warning messages. ```Shell adb shell setprop debug.oculus.loadandinjectpackagedvvl.co.realfit.naopenxrwgpu 1 ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.