2024-05-27 17:46:15 +02: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 17:25:48 +01:00
|
|
|
//go:build (amd64 || arm64) && (linux || darwin || freebsd || netbsd || dragonfly || solaris || windows)
|
2024-05-27 17:46:15 +02:00
|
|
|
|
|
|
|
package wazero
|
|
|
|
|
2024-11-26 17:25:48 +01:00
|
|
|
import "github.com/tetratelabs/wazero/internal/platform"
|
|
|
|
|
2024-05-27 17:46:15 +02:00
|
|
|
func newRuntimeConfig() RuntimeConfig {
|
2024-11-26 17:25:48 +01:00
|
|
|
if platform.CompilerSupported() {
|
|
|
|
return NewRuntimeConfigCompiler()
|
|
|
|
}
|
|
|
|
return NewRuntimeConfigInterpreter()
|
2024-05-27 17:46:15 +02:00
|
|
|
}
|