move uidev to workspace root

This commit is contained in:
galister
2025-06-21 17:39:28 +09:00
parent 814700cbff
commit 9759dff8b9
119 changed files with 14 additions and 6 deletions

12
uidev/src/assets.rs Normal file
View File

@@ -0,0 +1,12 @@
#[derive(rust_embed::Embed)]
#[folder = "assets/"]
pub struct Asset;
impl wgui::assets::AssetProvider for Asset {
fn load_from_path(&mut self, path: &str) -> anyhow::Result<Vec<u8>> {
match Asset::get(path) {
Some(data) => Ok(data.data.to_vec()),
None => anyhow::bail!("embedded file {} not found", path),
}
}
}