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