Skip to main content

malbox_plugin_sdk/
runtime.rs

1//! Runtime implementations that run a [`HostPlugin`](crate::plugin::HostPlugin)
2//! against a transport.
3//!
4//! Two runtimes are provided:
5//!
6//! - [`guest`] - gRPC server runtime for plugins running inside a VM.
7//!   Gated behind the `guest` feature.
8//! - [`host`] - iceoryx2 IPC runtime for plugins running on the daemon host.
9//!   Gated behind the `host` feature.
10//!
11//! Plugin authors don't usually need to import from this module - the
12//! `#[malbox::host_plugin]` and `#[malbox::guest_plugin]` macros generate
13//! a `fn main()` that constructs the appropriate runtime.
14
15#[cfg(feature = "guest")]
16pub mod guest;
17
18#[cfg(feature = "host")]
19pub mod host;
20
21#[cfg(feature = "guest")]
22pub use guest::{GuestRuntime, GuestRuntimeConfig};
23
24#[cfg(feature = "host")]
25pub use host::HostRuntime;