krata/crates/xen/xenevtchn/examples/simple.rs
Alex Zenla 1cf03a460e
fix(idm): reimplement packet processing algorithm (#330)
* chore(xen): rewrite event channel code

* fix(idm): repair idm bugs on the file backend
2024-08-13 23:18:27 +00: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(())
}