dev-async 0.1.0

Async-specific validation for Rust. Deadlocks, task leaks, hung futures, graceful shutdown. Part of the dev-* verification suite.
Documentation
  • Coverage
  • 100%
    7 out of 7 items documented1 out of 5 items with examples
  • Size
  • Source code size: 35.91 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 348.87 kB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 25s Average build duration of successful builds.
  • all releases: 20s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • Homepage
  • jamesgober/dev-async
    0 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • jamesgober

What it does

Catches the async-specific failure modes that synchronous tests miss:

  • Futures that never complete
  • Tasks that get dropped without cleanup
  • Shutdown sequences that hang
  • Blocking calls inside async paths
  • Unbounded task growth

All output flows through dev-report so AI agents and CI gates can act on it without parsing logs.

Quick start

[dependencies]
dev-async = "0.1"
tokio = { version = "1", features = ["macros", "rt-multi-thread"] }
use dev_async::{run_with_timeout, join_all_with_timeout};
use std::time::Duration;

#[tokio::main]
async fn main() {
    // Hard-timeout a single future.
    let check = run_with_timeout(
        "user_login",
        Duration::from_secs(2),
        async {
            // your async code here
        }
    ).await;

    // Verify all spawned tasks finish in time.
    let h1 = tokio::spawn(async { 1 });
    let h2 = tokio::spawn(async { 2 });
    let checks = join_all_with_timeout(
        "worker_pool",
        Duration::from_secs(5),
        vec![h1, h2]
    ).await;
}

What's planned

  • Deadlock detection wrapper around parking_lot / Mutex types.
  • Task tracking: detect tasks that outlive their parent scope.
  • Shutdown verification: confirm a system reaches a clean stopped state within a deadline.
  • Blocking-call detection inside async contexts (best-effort, behind a feature flag).

License

Apache-2.0. See LICENSE.