pub struct PluginToml {
pub enabled: bool,
pub plugin_dir: String,
pub hot_reload: bool,
pub memory_limit_mb: usize,
pub timeout_ms: u64,
pub max_plugins: usize,
pub fuel_metering: bool,
pub fuel_limit: u64,
pub trust_root: Option<String>,
}Expand description
Plugin-system configuration, in a TOML-friendly shape.
Always present on ProxyConfig so existing configs round-trip, but only
consumed when the wasm-plugins feature is enabled. When
plugins.enabled is false (the default), plugin loading is skipped
entirely and every plugin-hook call site becomes a zero-cost no-op.
Converted to crate::plugins::PluginRuntimeConfig at startup via a
feature-gated From impl in src/plugins/config.rs.
Fields§
§enabled: boolEnable the plugin subsystem. Defaults to false — plugins are
strictly opt-in.
plugin_dir: StringDirectory to scan at startup for .wasm plugin files.
hot_reload: boolWatch plugin_dir for file changes and reload plugins hot.
memory_limit_mb: usizeMemory limit per plugin instance, in megabytes.
timeout_ms: u64Execution timeout per hook call, in milliseconds.
max_plugins: usizeMaximum number of concurrently-loaded plugins.
fuel_metering: boolEnable per-call CPU-cycle (fuel) metering to bound plugin runtime.
fuel_limit: u64Fuel units allowed per hook call when fuel_metering = true.
trust_root: Option<String>Optional Ed25519 trust-root directory. When set, every loaded .wasm requires a sidecar .sig that verifies against one of the *.pub files in this directory. When omitted, signatures are not checked (preserves the dev-loop ergonomic of dropping unsigned .wasm files in the plugin dir).
Trait Implementations§
Source§impl Clone for PluginToml
impl Clone for PluginToml
Source§fn clone(&self) -> PluginToml
fn clone(&self) -> PluginToml
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for PluginToml
impl Debug for PluginToml
Source§impl Default for PluginToml
impl Default for PluginToml
Source§impl<'de> Deserialize<'de> for PluginToml
impl<'de> Deserialize<'de> for PluginToml
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
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 PluginToml
impl RefUnwindSafe for PluginToml
impl Send for PluginToml
impl Sync for PluginToml
impl Unpin for PluginToml
impl UnsafeUnpin for PluginToml
impl UnwindSafe for PluginToml
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