WasmtimeExecutionConfig
Wasmtime engine and store configuration for a core module.
Trust boundary for precompiled artifacts
precompiledModuleBytes holds a serialized Wasmtime artifact (.cwasm). Wasmtime deserializes it with an API that Wasmtime itself documents as unsafe: the artifact is executable code (native machine code or Pulley bytecode) plus trusted runtime metadata, and it is not validated the way a .wasm module is. A crafted artifact can read and write arbitrary host memory and execute arbitrary code in the host process, bypassing fuel, memory limits and every WASI capability configured on this host.
Only pass bytes that the host itself produced from a validated .wasm module with a trusted, pinned toolchain (for example iosWasmtimeCompileModuleToCwasm, androidWasmtimeCompileModuleToCwasm or wasmtime compile) and stored where plugins cannot write. Never load precompiled bytes shipped inside a plugin bundle, downloaded from a location a plugin author controls, or otherwise supplied by an untrusted party. When in doubt, pass the .wasm bytes and let the runtime compile them.
The artifact is silently ignored and the module is compiled from .wasm when a memory policy is applied or when the module needs synthetic memory exports. It must also match the engine version, target and configuration (fuel, limits) of this host.