wstd 0.6.6

An async standard library for Wasm Components and WASI 0.2
Documentation
1
2
3
4
5
6
7
8
9
use std::error::Error;
use wstd::task::sleep;
use wstd::time::Duration;

#[wstd::test]
async fn just_sleep() -> Result<(), Box<dyn Error>> {
    sleep(Duration::from_secs(1)).await;
    Ok(())
}