File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -200,8 +200,16 @@ const guardMemoryLimitPages = 512
200200// binaries are untrusted third-party artifacts and the gateway never
201201// symbolicates guest stack traces, so skipping DWARF parsing saves compile
202202// time and memory without any functional loss.
203+ //
204+ // wazero.NewRuntimeConfig() is used (rather than NewRuntimeConfigCompiler())
205+ // so the runtime auto-selects the Compiler (AOT) engine on supported
206+ // architectures (amd64/arm64) and transparently falls back to the
207+ // Interpreter engine elsewhere (e.g. riscv64), matching wazero's own
208+ // recommended usage and keeping WASM guard support portable across all
209+ // Go-supported architectures instead of failing to instantiate on
210+ // unsupported ones.
203211func newGuardRuntimeConfig (opts * WasmGuardOptions ) wazero.RuntimeConfig {
204- runtimeConfig := wazero .NewRuntimeConfigCompiler ().
212+ runtimeConfig := wazero .NewRuntimeConfig ().
205213 WithCloseOnContextDone (true ).
206214 WithMemoryLimitPages (guardMemoryLimitPages ).
207215 WithDebugInfoEnabled (logWasm .Enabled ())
You can’t perform that action at this time.
0 commit comments