stasis-rs 0.2.1

Durable AI orchestration framework with runtime jobs, lineage, and memory integration
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use rust_embed::RustEmbed;

#[derive(RustEmbed)]
#[folder = "dashboard_assets/static"]
pub struct DashboardAssets;

pub fn load(path: &str) -> Option<(Vec<u8>, &'static str)> {
    let file = DashboardAssets::get(path)?;
    let content_type = match path.rsplit('.').next() {
        Some("css") => "text/css; charset=utf-8",
        Some("js") => "application/javascript; charset=utf-8",
        Some("svg") => "image/svg+xml",
        _ => "application/octet-stream",
    };

    Some((file.data.to_vec(), content_type))
}