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