mod block;
mod connection;
#[cfg(feature = "gpu")]
pub mod gpu;
mod handler;
#[cfg(feature = "net")]
mod net;
#[cfg(feature = "audio")]
pub mod snd;
pub use block::run_block_device;
pub use block::Options as BlockOptions;
pub use connection::sys::VhostUserListener;
pub use connection::sys::VhostUserStream;
pub use connection::VhostUserConnectionTrait;
use cros_async::Executor;
#[cfg(feature = "gpu")]
pub use gpu::run_gpu_device;
#[cfg(feature = "gpu")]
pub use gpu::Options as GpuOptions;
pub use handler::VhostBackendReqConnectionState;
pub use handler::VhostUserDevice;
#[cfg(feature = "net")]
pub use net::run_net_device;
#[cfg(feature = "net")]
pub use net::NetBackend;
#[cfg(feature = "net")]
pub use net::Options as NetOptions;
#[cfg(feature = "audio")]
pub use snd::run_snd_device;
#[cfg(feature = "audio")]
pub use snd::Options as SndOptions;
pub use crate::virtio::vhost::user::device::connection::BackendConnection;
cfg_if::cfg_if! {
if #[cfg(any(target_os = "android", target_os = "linux"))] {
mod console;
mod fs;
mod vsock;
mod wl;
pub use vsock::{run_vsock_device, Options as VsockOptions, VhostUserVsockDevice};
pub use wl::{run_wl_device, parse_wayland_sock, Options as WlOptions};
pub use console::{create_vu_console_device, run_console_device, Options as ConsoleOptions};
pub use fs::{run_fs_device, Options as FsOptions};
} else if #[cfg(windows)] {
#[cfg(all(feature = "net", feature = "slirp"))]
pub use net::sys::windows::NetBackendConfig;
}
}
pub trait VhostUserDeviceBuilder {
fn build(self: Box<Self>, ex: &Executor) -> anyhow::Result<Box<dyn vmm_vhost::Backend>>;
}