add tokio example
Co-authored-by: Alex Crichton <alex@alexcrichton.com>
This commit is contained in:
6
examples/tokio/wasm/tokio-wasi.rs
Normal file
6
examples/tokio/wasm/tokio-wasi.rs
Normal file
@@ -0,0 +1,6 @@
|
||||
fn main() {
|
||||
let name = std::env::var("NAME").unwrap();
|
||||
println!("Hello, world! My name is {}", name);
|
||||
std::thread::sleep(std::time::Duration::from_secs(1));
|
||||
println!("Goodbye from {}", name);
|
||||
}
|
||||
Reference in New Issue
Block a user