mirror of
https://github.com/edera-dev/krata.git
synced 2025-08-02 21:00:55 +00:00
13 lines
330 B
Rust
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(())
|
|
}
|