mirror of
				https://github.com/async-rs/async-std.git
				synced 2025-10-31 08:46:38 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			13 lines
		
	
	
	
		
			181 B
		
	
	
	
		
			Rust
		
	
	
	
	
	
			
		
		
	
	
			13 lines
		
	
	
	
		
			181 B
		
	
	
	
		
			Rust
		
	
	
	
	
	
| //! Spawns a task that says hello.
 | |
| 
 | |
| #![feature(async_await)]
 | |
| 
 | |
| use async_std::task;
 | |
| 
 | |
| async fn say_hi() {
 | |
|     println!("Hello, world!");
 | |
| }
 | |
| 
 | |
| fn main() {
 | |
|     task::block_on(say_hi())
 | |
| }
 |