pub struct WasmConfig {Show 18 fields
pub min_instances: u32,
pub max_instances: u32,
pub idle_timeout: Duration,
pub request_timeout: Duration,
pub max_memory: Option<String>,
pub max_fuel: u64,
pub epoch_interval: Option<Duration>,
pub capabilities: Option<WasmCapabilities>,
pub allow_http_outgoing: bool,
pub allowed_hosts: Vec<String>,
pub allow_tcp: bool,
pub allow_udp: bool,
pub preopens: Vec<WasmPreopen>,
pub kv_enabled: bool,
pub kv_namespace: Option<String>,
pub kv_max_value_size: u64,
pub secrets: Vec<String>,
pub precompile: bool,
}Expand description
Comprehensive configuration for all WASM service types.
Replaces the previous WasmHttpConfig with resource limits, capability
declarations, networking controls, and storage configuration.
Fields§
§min_instances: u32Minimum number of warm instances to keep ready
max_instances: u32Maximum number of instances to scale to
idle_timeout: DurationTime before idle instances are terminated
request_timeout: DurationMaximum time for a single request
max_memory: Option<String>Maximum linear memory (e.g., “64Mi”, “256Mi”)
max_fuel: u64Maximum fuel (instruction count limit, 0 = unlimited)
epoch_interval: Option<Duration>Epoch interval for cooperative preemption
capabilities: Option<WasmCapabilities>Explicit capability grants (overrides world defaults when restricting)
allow_http_outgoing: boolAllow outgoing HTTP requests (default: true)
allowed_hosts: Vec<String>Allowed outgoing HTTP hosts (empty = all allowed)
allow_tcp: boolAllow raw TCP sockets (default: false)
allow_udp: boolAllow raw UDP sockets (default: false)
preopens: Vec<WasmPreopen>Pre-opened directories (host path -> guest path)
kv_enabled: boolEnable KV store access (default: true)
kv_namespace: Option<String>KV store namespace (default: service name)
kv_max_value_size: u64KV store max value size in bytes (default: 1MB)
secrets: Vec<String>Secret names accessible to this WASM module
precompile: boolPre-compile on deploy to reduce cold start (default: true)
Trait Implementations§
Source§impl Clone for WasmConfig
impl Clone for WasmConfig
Source§fn clone(&self) -> WasmConfig
fn clone(&self) -> WasmConfig
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more