github.com/wasilibs/wazerox@v0.0.0-20240124024944-4923be63ab5f/experimental/opt/opt_test.go (about)

     1  package opt_test
     2  
     3  import (
     4  	"context"
     5  	"runtime"
     6  	"testing"
     7  
     8  	wazero "github.com/wasilibs/wazerox"
     9  	"github.com/wasilibs/wazerox/experimental/opt"
    10  	"github.com/wasilibs/wazerox/internal/testing/require"
    11  )
    12  
    13  func TestUseOptimizingCompiler(t *testing.T) {
    14  	if runtime.GOARCH != "arm64" {
    15  		return
    16  	}
    17  	c := opt.NewRuntimeConfigOptimizingCompiler()
    18  	r := wazero.NewRuntimeWithConfig(context.Background(), c)
    19  	require.NoError(t, r.Close(context.Background()))
    20  }