luminal_rt 0.1.0

A DLL-boundary safe async runtime with tokio-compatible API
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
use luminal::Runtime;

#[test]
fn simple_test() {
    let rt = Runtime::new().unwrap();
    let rt_clone = rt.clone();
    let result = rt.block_on(async move {
        let handle = rt_clone.spawn(async { 42 });
        handle.await
    });
    assert_eq!(result, 42);
    println!("SUCCESS: Simple test passed!");
}