allwright_surface_mobile_android/
lib.rs1use allwright_plugin_sdk::{SurfaceFamily, SurfacePlugin, SurfacePluginDescriptor};
2use tokio::time::{Duration, sleep};
3
4#[derive(Debug, Clone, Copy, Default)]
5pub struct MobileAndroidPlugin;
6
7impl SurfacePlugin for MobileAndroidPlugin {
8 fn descriptor(&self) -> SurfacePluginDescriptor {
9 SurfacePluginDescriptor {
10 id: "mobile-android",
11 family: SurfaceFamily::Mobile,
12 version: env!("CARGO_PKG_VERSION"),
13 description: "Android mobile surface plugin for the allwright engine.",
14 }
15 }
16}
17
18pub async fn boot() -> String {
19 sleep(Duration::from_millis(10)).await;
20 "android ready".to_string()
21}
22
23#[cfg(test)]
24mod tests {
25 use super::*;
26
27 #[tokio::test]
28 async fn boots_android_runtime() {
29 assert_eq!(boot().await, "android ready");
30 }
31}