shimmy 0.1.1

5MB Ollama alternative with dynamic port management and zero-friction LoRA serving. 95%+ test coverage, <100ms startup.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use axum::Json;
use serde::Serialize;
use sysinfo::System;

#[derive(Serialize)]
pub struct Diag { os: String, cores: usize, mem_total_mb: u64 }

pub async fn diag_handler() -> Json<Diag> {
    let mut sys = System::new_all();
    sys.refresh_all();
    // Some sysinfo methods changed across versions; keep it minimal & portable.
    let os = std::env::consts::OS.to_string();
    let cores = std::thread::available_parallelism().map(|n| n.get()).unwrap_or(0);
    let mem_total_mb = sys.total_memory() / 1024; // KiB -> MiB
    Json(Diag { os, cores, mem_total_mb })
}