pub struct RuntimeConfig {
pub paths: DiscoveryPaths,
pub host_overrides: HostOverrides,
}Expand description
Configuration passed to ExtensionRuntime::new.
Carries both the filesystem discovery paths and the HostOverrides
bundle that every dispatch call injects into the wasmtime HostState.
Callers that only need defaults (tests, simple CLI tools) can use
RuntimeConfig::from_paths; production callers that need real
i18n/secrets/HTTP backends chain RuntimeConfig::with_host_overrides
before handing the config to the runtime.
Fields§
§paths: DiscoveryPaths§host_overrides: HostOverridesHost-function overrides threaded into every WASM dispatch.
Defaults to HostOverrides::default() (key-translator, empty
secrets, no HTTP client, empty allow-list, no broker weak ref).
Production callers replace this via RuntimeConfig::with_host_overrides
or the ergonomic ExtensionRuntime::with_host_overrides builder.
Implementations§
Source§impl RuntimeConfig
impl RuntimeConfig
Sourcepub fn from_paths(paths: DiscoveryPaths) -> Self
pub fn from_paths(paths: DiscoveryPaths) -> Self
Construct a config from discovery paths, using production-safe
HostOverrides::default() (no HTTP client, empty secrets/i18n).
Sourcepub fn with_host_overrides(self, overrides: HostOverrides) -> Self
pub fn with_host_overrides(self, overrides: HostOverrides) -> Self
Replace the HostOverrides bundle. Returns self for builder-style
chaining:
let config = RuntimeConfig::from_paths(paths)
.with_host_overrides(production_overrides);Trait Implementations§
Source§impl Clone for RuntimeConfig
impl Clone for RuntimeConfig
Source§fn clone(&self) -> RuntimeConfig
fn clone(&self) -> RuntimeConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl !RefUnwindSafe for RuntimeConfig
impl !UnwindSafe for RuntimeConfig
impl Freeze for RuntimeConfig
impl Send for RuntimeConfig
impl Sync for RuntimeConfig
impl Unpin for RuntimeConfig
impl UnsafeUnpin for RuntimeConfig
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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