Executor
Simple dependency-free runtime intended for tests, toy programs and demonstrations. Performance is not a main concern and you should probably use other executors like tokio.
To use this functionality, it is necessary to activate the executor feature.
Example
//! The `executor` feature allows the execution of asynchronous operations
extern crate wtx;
#[wtx::main]
async fn main() {
println!("With great power comes great electricity bills");
}
#[wtx::test]
async fn test_with_runtime(runtime: &wtx::executor::StdRuntime) {
runtime
.spawn(async move {
println!("Behind every successful diet is an unwatched pizza");
})
.unwrap();
}