Skip to main content

validate_wasm_config

Function validate_wasm_config 

Source
pub fn validate_wasm_config(
    service_name: &str,
    spec: &ServiceSpec,
) -> Result<(), ValidationError>
Expand description

Validate WASM configuration for a single service

Checks:

  • WASM config should not be present on non-WASM service types
  • min_instances <= max_instances
  • max_memory format validation
  • Capability restriction validation (users can only restrict from defaults, not grant)
  • WasmHttp must have at least one HTTP endpoint (if endpoints exist)
  • Preopens must have non-empty source and target

ยงErrors

Returns a validation error if the WASM configuration is invalid.