Skip to content

Commit

Permalink
Add WithFeatureSignExtensionOps(true) to runtime config as some of …
Browse files Browse the repository at this point in the history
…the wasm modules compiled with AssemblyScript seem to require it. (#22)
  • Loading branch information
pkedy authored Apr 2, 2022
1 parent ce9d435 commit 531235a
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions engines/wazero/wazero.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ import (
"context"
"errors"
"fmt"
"github.com/tetratelabs/wazero/wasi"
"io"
"sync/atomic"

"github.com/tetratelabs/wazero"
"github.com/tetratelabs/wazero/api"
"github.com/tetratelabs/wazero/wasi"

"github.com/wapc/wapc-go"
)
Expand Down Expand Up @@ -110,7 +110,8 @@ func (s *stdout) Write(p []byte) (int, error) {

// New compiles a `Module` from `code`.
func (e *engine) New(code []byte, hostCallHandler wapc.HostCallHandler) (mod wapc.Module, err error) {
r := wazero.NewRuntime()
rc := wazero.NewRuntimeConfig().WithFeatureSignExtensionOps(true)
r := wazero.NewRuntimeWithConfig(rc)
m := &Module{runtime: r, wapcHostCallHandler: hostCallHandler}
m.config = wazero.NewModuleConfig().
WithStartFunctions(functionStart, functionInit). // Call any WASI or waPC start functions on instantiate.
Expand Down

0 comments on commit 531235a

Please sign in to comment.