tokio
Async runtime for Rust.
What is tokio
Tokio powers async Rust — useful for non-blocking work inside Tauri commands.
Install
cargo add tokio --features fullUsage
#[tauri::command]
async fn fetch() -> String {
tokio::time::sleep(std::time::Duration::from_millis(100)).await;
"done".into()
}Docs
Official documentation: tokio.