17 ms·
Oh, OK. You need to replace calls to syscall.Mmap with windows.VirtualAlloc [1], syscall.Mprotect with windows.VirtualProtect, etc. You don't even need to cha
by ncruces 2y ago
Oh, OK.
You need to replace calls to syscall.Mmap with windows.VirtualAlloc [1], syscall.Mprotect with windows.VirtualProtect, etc.
You don't even need to change the ASM preamble.
[1]: https://pkg.go.dev/golang.org/x/sys/windows#VirtualAlloc https://pkg.go.dev/golang.org/x/sys/windows#VirtualAlloc
- evacchi 2y agoand for reference see how it's done in wazero https://github.com/tetratelabs/wazero/blob/c397a402ad17e495a5a22fef709a1d4abef1f3ce/internal/platform/mmap_windows.go https://github.com/tetratelabs/wazero/blob/c397a402ad17e495a...