Skip to content

Commit

Permalink
mend
Browse files Browse the repository at this point in the history
  • Loading branch information
shashank381 committed Apr 12, 2024
1 parent ed34266 commit 9dea47b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions transformer/external/wasmtransformer.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,9 @@ type WASM struct {

// WASMYamlConfig is the format of wasm transformer yaml config
type WASMYamlConfig struct {
WASMModule string `yaml:"wasm_module"`
ExecutionMode string `yaml:"execution_mode"`
EnvList []core.EnvVar `yaml:"env,omitempty"`
WASMModule string `yaml:"wasm_module"`
CompileAOT bool `yaml:"compile_aot"`
EnvList []core.EnvVar `yaml:"env,omitempty"`
}

// Init Initializes the transformer
Expand Down Expand Up @@ -253,7 +253,7 @@ func (t *WASM) Transform(newArtifacts []transformertypes.Artifact, alreadySeenAr
func (t *WASM) initVm(preopens [][]string) (api.Module, context.Context, wazero.Runtime, error) {
ctx := context.Background()
var rt wazero.Runtime
if t.WASMConfig.ExecutionMode == "compiler" {
if t.WASMConfig.CompileAOT {
rt = wazero.NewRuntimeWithConfig(ctx, wazero.NewRuntimeConfigCompiler())
} else {
rt = wazero.NewRuntimeWithConfig(ctx, wazero.NewRuntimeConfigInterpreter())
Expand Down

0 comments on commit 9dea47b

Please sign in to comment.