2024-05-27 18:46:15 +03:00
|
|
|
// Note: The build constraints here are about the compiler, which is more
|
|
|
|
// narrow than the architectures supported by the assembler.
|
|
|
|
//
|
|
|
|
// Constraints here must match platform.CompilerSupported.
|
|
|
|
//
|
|
|
|
// Meanwhile, users who know their runtime.GOOS can operate with the compiler
|
|
|
|
// may choose to use NewRuntimeConfigCompiler explicitly.
|
2024-11-26 19:25:48 +03:00
|
|
|
//go:build (amd64 || arm64) && (linux || darwin || freebsd || netbsd || dragonfly || solaris || windows)
|
2024-05-27 18:46:15 +03:00
|
|
|
|
|
|
|
package wazero
|
|
|
|
|
2024-11-26 19:25:48 +03:00
|
|
|
import "github.com/tetratelabs/wazero/internal/platform"
|
|
|
|
|
2024-05-27 18:46:15 +03:00
|
|
|
func newRuntimeConfig() RuntimeConfig {
|
2024-11-26 19:25:48 +03:00
|
|
|
if platform.CompilerSupported() {
|
|
|
|
return NewRuntimeConfigCompiler()
|
|
|
|
}
|
|
|
|
return NewRuntimeConfigInterpreter()
|
2024-05-27 18:46:15 +03:00
|
|
|
}
|