Skip to main content

async-inspect

X-ray vision for async Rust 🔍

Crates.io versiondocs.rsLicense

Quick Install

cargo add async-inspect

State Machine Inspection

See exactly what your futures are doing. Inspect current state, captured variables, and await points in real-time. No more guessing why your async code is stuck.

Deadlock Detection

Automatically detect circular dependencies and potential deadlocks before they crash production. Get actionable diagnostics with task dependency graphs.

Performance Profiling

Identify bottlenecks with detailed timing analysis. Compare performance across versions, detect regressions, and export to Chrome DevTools and flamegraphs.

asynctokiosmolasync-stdglommio

Multi-Runtime Support

Works with Tokio, async-std, smol, and more. One API for all async runtimes with runtime-agnostic instrumentation and zero-cost abstractions.

Real-Time Dashboard

Monitor your async application with a live web dashboard or terminal UI. Track task states, resource usage, and events as they happen.

Task ATask BTask CTask D

Execution Timeline

Visualize task execution with interactive timelines. See when tasks start, await, resume, and complete. Perfect for debugging complex concurrent workflows.

Simple, Powerful API

Trace async functions
use async_inspect::prelude::*;

#[async_inspect::trace]
async fn fetch_user(id: u64) -> User {
let profile = fetch_profile(id).await;
let posts = fetch_posts(id).await;
User { profile, posts }
}
Detect deadlocks
use async_inspect::deadlock::DeadlockDetector;

// Automatically detect potential deadlocks
let detector = DeadlockDetector::new();
detector.start_monitoring();

// Get detailed diagnostics
if let Some(cycle) = detector.detect_cycle() {
println!("Deadlock detected: {:?}", cycle);
}