Crates.io | cargo-sdl-apk |
lib.rs | cargo-sdl-apk |
version | 0.1.1 |
source | src |
created_at | 2023-05-08 05:39:08.29732 |
updated_at | 2023-05-10 16:10:52.737694 |
description | Build Android packages that use SDL |
homepage | https://github.com/limikael/cargo-sdl-apk |
repository | https://github.com/limikael/cargo-sdl-apk |
max_upload_size | |
id | 859510 |
size | 77,664 |
Build Android packages that use SDL.
This cargo tool aims to be for Rust SDL what cargo-apk is for Glutin, and cargo-quad-apk is for Miniquad. That is, a simple command to package up an APK and upload it to your phone and start it. The way it works internally is by automating the steps described in this article by Julian Heinken. I created it as a tool for my UI library Appy, but it can be used for other Rust SDL projects as well.
cargo install cargo-sdl-apk
.release-2.26.x
branch.ANDROID_HOME
pointing to the Android SDK.ANDROID_NDK_HOME
pointing to the Android NDK.SDL
pointing to the SDL source dir.cargo sdl-apk build
or cargo sdl-apk run
from inside your SDL application crate. You can also use
cargo sdl-apk run --example some_example
to run a crate example, in a similar way as you would do with
cargo.The entry point for your application must be called SDL_main
and use the attribute #[no_mangle]
. Here is
an example project. To build/run the
project, cd into it and run cargo sdl-apk build
or cargo sdl-apk run
.