MCPcopy Create free account
hub / github.com/evilsocket/cake / update_serving_status

Function update_serving_status

cake-mobile/src/lib.rs:50–64  ·  view source on GitHub ↗
(model_name: &str, layers_range: &str, backend: &str)

Source from the content-addressed store, hash-verified

48}
49
50fn update_serving_status(model_name: &str, layers_range: &str, backend: &str) {
51 fn esc(s: &str) -> String {
52 s.replace('\\', "\\\\").replace('"', "\\\"")
53 }
54 let json = format!(
55 r#"{{"stage":"serving","message":"Ready — serving inference","progress":1.0000,"model":"{}","layers":"{}","backend":"{}"}}"#,
56 esc(model_name),
57 esc(layers_range),
58 esc(backend),
59 );
60 log_mobile(&format!("[cake-mobile] status: {}", json));
61 if let Ok(mut s) = WORKER_STATUS.lock() {
62 *s = json;
63 }
64}
65
66#[uniffi::export]
67pub fn get_worker_status() -> String {

Callers 1

run_zero_config_workerFunction · 0.85

Calls 1

log_mobileFunction · 0.85

Tested by

no test coverage detected