Skip to content

Commit

Permalink
chore(parachain): use wazero instead of wasmer
Browse files Browse the repository at this point in the history
User wazero runtime instance instead of wasmer runtime instance
  • Loading branch information
kishansagathiya committed Aug 30, 2023
1 parent 26b101d commit 00646bc
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions dot/parachain/runtime/instance.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (

parachaintypes "github.com/ChainSafe/gossamer/dot/parachain/types"
"github.com/ChainSafe/gossamer/lib/common"
runtimewasmer "github.com/ChainSafe/gossamer/lib/runtime/wasmer"
runtimewazero "github.com/ChainSafe/gossamer/lib/runtime/wazero"
"github.com/ChainSafe/gossamer/pkg/scale"
)

Expand Down Expand Up @@ -49,15 +49,15 @@ type ValidationParameters struct {
RelayParentStorageRoot common.Hash
}

// Instance is a wrapper around the wasmer runtime instance.
// Instance is a wrapper around the wazero runtime instance.
type Instance struct {
*runtimewasmer.Instance
*runtimewazero.Instance
}

func SetupVM(code []byte) (*Instance, error) {
cfg := runtimewasmer.Config{}
cfg := runtimewazero.Config{}

instance, err := runtimewasmer.NewInstance(code, cfg)
instance, err := runtimewazero.NewInstance(code, cfg)
if err != nil {
return nil, fmt.Errorf("creating instance: %w", err)
}
Expand Down

0 comments on commit 00646bc

Please sign in to comment.