mirror of
https://github.com/rust-windowing/winit.git
synced 2026-09-01 14:20:05 -04:00
13
xbuild/android-target/Cargo.toml
Normal file
13
xbuild/android-target/Cargo.toml
Normal file
@@ -0,0 +1,13 @@
|
||||
[package]
|
||||
name = "android-xbuild-target"
|
||||
version = "0.1.0"
|
||||
edition = "2021"
|
||||
publish = false
|
||||
|
||||
[lib]
|
||||
crate_type = ["cdylib"]
|
||||
|
||||
[dependencies.winit]
|
||||
version = "0.29.1-beta"
|
||||
path = "../.."
|
||||
features = ["android-native-activity"]
|
||||
11
xbuild/android-target/src/lib.rs
Normal file
11
xbuild/android-target/src/lib.rs
Normal file
@@ -0,0 +1,11 @@
|
||||
use winit::platform::android::{activity::AndroidApp, EventLoopBuilderExtAndroid};
|
||||
|
||||
#[no_mangle]
|
||||
fn android_main(app: AndroidApp) {
|
||||
winit::event_loop::EventLoopBuilder::new()
|
||||
.with_android_app(app)
|
||||
.build()
|
||||
.unwrap()
|
||||
.run(|_, _| todo!())
|
||||
.ok();
|
||||
}
|
||||
Reference in New Issue
Block a user