mirror of
https://github.com/edera-dev/krata.git
synced 2025-08-03 13:11:31 +00:00
12 lines
282 B
Rust
12 lines
282 B
Rust
use xenevtchn::error::Result;
|
|
use xenevtchn::EventChannel;
|
|
|
|
fn main() -> Result<()> {
|
|
let mut channel = EventChannel::open()?;
|
|
println!("Channel opened.");
|
|
let port = channel.bind_unbound_port(1)?;
|
|
println!("port: {}", port);
|
|
channel.unbind(port)?;
|
|
Ok(())
|
|
}
|