pub struct WasmTransformConfig {
pub module: String,
pub function: String,
pub memory_limit_mb: u32,
pub fuel_limit: u64,
pub on_error: WasmOnError,
pub reload_on_change: bool,
}Expand description
Configuration for the wasm transform.
Fields§
§module: StringFilesystem path to the precompiled .wasm module (absolute, or relative
to the working directory). URLs are not supported in v1.
function: StringName of the exported transform function. Default "transform".
memory_limit_mb: u32Linear-memory cap for the module, in mebibytes. A record that grows
memory past this limit fails that record (routed by on_error).
Default 16. The practical lower bound for ~1 KB JSON records is ~8 MB.
fuel_limit: u64wasmtime fuel budget per record — a deterministic CPU bound. A record
that exhausts its fuel fails (routed by on_error). Default
10_000_000. Fuel is the effective CPU limit in v1 (there are no
blocking host calls, so a wall-clock timeout would be redundant).
on_error: WasmOnErrorWhat to do when a record fails inside the module (trap, fuel/memory
exhaustion, ABI violation, or non-JSON output). Default fail.
reload_on_change: boolRe-stat the module file’s mtime before each page; recompile and swap in
the new module atomically at the page boundary if it changed. In-flight
records within a page always use one module. Default false.
Trait Implementations§
Source§impl Clone for WasmTransformConfig
impl Clone for WasmTransformConfig
Source§fn clone(&self) -> WasmTransformConfig
fn clone(&self) -> WasmTransformConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for WasmTransformConfig
impl Debug for WasmTransformConfig
Source§impl<'de> Deserialize<'de> for WasmTransformConfig
impl<'de> Deserialize<'de> for WasmTransformConfig
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 JsonSchema for WasmTransformConfig
impl JsonSchema for WasmTransformConfig
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
$ref keyword. Read moreAuto Trait Implementations§
impl Freeze for WasmTransformConfig
impl RefUnwindSafe for WasmTransformConfig
impl Send for WasmTransformConfig
impl Sync for WasmTransformConfig
impl Unpin for WasmTransformConfig
impl UnsafeUnpin for WasmTransformConfig
impl UnwindSafe for WasmTransformConfig
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,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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