github.com/bananabytelabs/wazero@v0.0.0-20240105073314-54b22a776da8/internal/platform/mmap_unsupported.go (about) 1 //go:build !(darwin || linux || freebsd || windows) 2 3 package platform 4 5 import ( 6 "fmt" 7 "runtime" 8 ) 9 10 var errUnsupported = fmt.Errorf("mmap unsupported on GOOS=%s. Use interpreter instead.", runtime.GOOS) 11 12 func munmapCodeSegment(code []byte) error { 13 panic(errUnsupported) 14 } 15 16 func mmapCodeSegmentAMD64(size int) ([]byte, error) { 17 panic(errUnsupported) 18 } 19 20 func mmapCodeSegmentARM64(size int) ([]byte, error) { 21 panic(errUnsupported) 22 } 23 24 func MprotectRX(b []byte) (err error) { 25 panic(errUnsupported) 26 }