tokio-test-lite

Crates.iotokio-test-lite
lib.rstokio-test-lite
version0.2.0
created_at2025-12-24 14:14:21.140441+00
updated_at2025-12-24 14:30:37.627052+00
descriptionLightweight #[test] attribute for async tokio tests without syn
homepage
repositoryhttps://github.com/bearcove/tokio-test-lite
max_upload_size
id2003283
size20,965
Amos Wenger (fasterthanlime)

documentation

README

tokio-test-lite

Lightweight #[test] attribute for async tokio tests — without syn.

Why?

tokio-macros pulls in syn, which adds significant compile time. This crate provides a minimal #[test] attribute macro using only quote and proc_macro2.

Usage

#[tokio_test_lite::test]
async fn my_test() {
    let result = some_async_fn().await;
    assert_eq!(result, expected);
}

Each test creates its own single-threaded tokio runtime with all features enabled.

License

Licensed under either of Apache License, Version 2.0 or MIT license at your option.

Commit count: 0

cargo fmt