Crates.io | sika-asset-loader |
lib.rs | sika-asset-loader |
version | 0.1.0 |
source | src |
created_at | 2023-08-11 20:16:37.884247 |
updated_at | 2023-08-11 20:16:37.884247 |
description | A static resource loader. |
homepage | https://github.com/sika-rs |
repository | https://github.com/sika-rs/sika-asset-loader |
max_upload_size | |
id | 942221 |
size | 8,904 |
[build-dependencies]
sika-asset-loader = "0.1.0"
fn main() {
let loader = sika_asset_loader::AssetLoader::new()
.dir("ui")
.output("ui.rs");
if let Err(err) = loader.load() {
println!("cargo:warning={:?}", err);
}
}
mod ui {
include!(concat!(env!("OUT_DIR"), "/ui.rs"));
}
let scope = web::scope("/ui");
ui::asset_handle(scope);