pub struct PluginRuntimeConfig {Show 14 fields
pub enabled: bool,
pub plugin_dir: PathBuf,
pub hot_reload: bool,
pub memory_limit: usize,
pub timeout: Duration,
pub max_plugins: usize,
pub fuel_metering: bool,
pub fuel_limit: u64,
pub enable_simd: bool,
pub enable_threads: bool,
pub cache_modules: bool,
pub cache_dir: Option<PathBuf>,
pub plugins: HashMap<String, PluginConfig>,
pub trust_root: Option<PathBuf>,
}Expand description
Configuration for the plugin runtime
Fields§
§enabled: boolEnable plugin system
plugin_dir: PathBufPlugin directory
hot_reload: boolHot reload on file change
memory_limit: usizeMemory limit per plugin (bytes)
timeout: DurationExecution timeout per call
max_plugins: usizeMaximum plugins loaded
fuel_metering: boolEnable fuel metering (limits CPU cycles)
fuel_limit: u64Fuel limit per call (if fuel_metering enabled)
enable_simd: boolEnable WASM SIMD
enable_threads: boolEnable multi-threading
cache_modules: boolCache compiled modules
cache_dir: Option<PathBuf>Module cache directory
plugins: HashMap<String, PluginConfig>Per-plugin configurations
trust_root: Option<PathBuf>Optional Ed25519 trust root: directory of *.pub files. When
set, every loaded .wasm requires a sidecar .sig that
verifies against one of the keys. When None, signatures
aren’t checked (preserves the dev-loop ergonomic of dropping
unsigned .wasm files in the plugin dir).
Trait Implementations§
Source§impl Clone for PluginRuntimeConfig
impl Clone for PluginRuntimeConfig
Source§fn clone(&self) -> PluginRuntimeConfig
fn clone(&self) -> PluginRuntimeConfig
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for PluginRuntimeConfig
impl Debug for PluginRuntimeConfig
Source§impl Default for PluginRuntimeConfig
impl Default for PluginRuntimeConfig
Source§impl From<&PluginToml> for PluginRuntimeConfig
Convert the TOML-shaped PluginToml into a live PluginRuntimeConfig.
impl From<&PluginToml> for PluginRuntimeConfig
Convert the TOML-shaped PluginToml into a live PluginRuntimeConfig.
Values that aren’t exposed in TOML (SIMD, threading, module cache) take their runtime defaults.
Source§fn from(t: &PluginToml) -> Self
fn from(t: &PluginToml) -> Self
Auto Trait Implementations§
impl Freeze for PluginRuntimeConfig
impl RefUnwindSafe for PluginRuntimeConfig
impl Send for PluginRuntimeConfig
impl Sync for PluginRuntimeConfig
impl Unpin for PluginRuntimeConfig
impl UnsafeUnpin for PluginRuntimeConfig
impl UnwindSafe for PluginRuntimeConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more