mirror of
				https://github.com/edera-dev/krata.git
				synced 2025-11-04 15:49:38 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			13 lines
		
	
	
		
			316 B
		
	
	
	
		
			Rust
		
	
	
	
	
	
			
		
		
	
	
			13 lines
		
	
	
		
			316 B
		
	
	
	
		
			Rust
		
	
	
	
	
	
use xenevtchn::error::Result;
 | 
						|
use xenevtchn::EventChannel;
 | 
						|
 | 
						|
#[tokio::main]
 | 
						|
async fn main() -> Result<()> {
 | 
						|
    let channel = EventChannel::open().await?;
 | 
						|
    println!("channel opened");
 | 
						|
    let port = channel.bind_unbound_port(0).await?;
 | 
						|
    println!("port: {}", port);
 | 
						|
    channel.unbind(port).await?;
 | 
						|
    Ok(())
 | 
						|
}
 |