runner 0.7.0

Utility for running Rust snippets
1
2
3
4
5
6
7
8
9
10
11
12
   println!("Main runtime started.");

    // Spawn an independent concurrent task managed by the Tokio executor
    let handle = tokio::spawn(async {
        println!("Task: Starting background work...");
        ttime::sleep(ttime::Duration::from_secs(2)).await; // Non-blocking sleep
        println!("Task: Background work complete!");
        42 // Return value
    });

    println!("Main: Doing other work while the task runs concurrently...");