Files
wazero/config_unsupported.go
Crypt Keeper 50d504cfdd Narrows compiler support to operating systems currently known to work (#612)
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>
2022-06-01 13:49:55 +08:00

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()
}