kratart: support for krata channels for two-way byte communication

This commit is contained in:
Alex Zenla
2024-03-28 05:31:57 +00:00
parent d4f1ee5521
commit 63f7db6cf4
9 changed files with 484 additions and 132 deletions

View File

@ -2,14 +2,18 @@ use anyhow::Result;
use env_logger::Env;
use kratart::chan::KrataChannelService;
use xenevtchn::EventChannel;
use xengnt::GrantTab;
use xenstore::XsdClient;
#[tokio::main]
async fn main() -> Result<()> {
env_logger::Builder::from_env(Env::default().default_filter_or("info")).init();
let mut krata =
KrataChannelService::new(EventChannel::open().await?, XsdClient::open().await?)?;
krata.init().await?;
let mut krata = KrataChannelService::new(
EventChannel::open().await?,
XsdClient::open().await?,
GrantTab::open()?,
)?;
krata.watch().await?;
Ok(())
}