krata/crates/xen/xenevtchn/examples/simple.rs
2024-08-13 14:59:43 -07:00

13 lines
330 B
Rust

use xenevtchn::error::Result;
use xenevtchn::EventChannelService;
#[tokio::main]
async fn main() -> Result<()> {
let channel = EventChannelService::open().await?;
println!("channel opened");
let port = channel.bind_unbound_port(0).await?;
println!("port: {}", port);
channel.unbind(port).await?;
Ok(())
}