This narrows to what the `internal/platform` package supports, which is currently bound by Go SDK source that include `Mprotect` or windows. Ex. `zsyscall_linux_amd64.go` includes `Mprotect`, but `zsyscall_freebsd_amd64.go` does not. This should prevent errors like below, by allowing `wazero.NewRuntime()` to properly fallback to the interpreter. ``` .../mmap.go:74:16: undefined: syscall.Mprotect ``` A later change will implement FreeBSD. This is just here to ensure users don't crash on unexpected OS. See #607 Signed-off-by: Adrian Cole <adrian@tetrate.io>
9 lines
217 B
Go
9 lines
217 B
Go
// This is the opposite constraint of config_supported.go
|
|
//go:build !(amd64 || arm64) || !(darwin || linux || windows)
|
|
|
|
package wazero
|
|
|
|
func newRuntimeConfig() RuntimeConfig {
|
|
return NewRuntimeConfigInterpreter()
|
|
}
|