GHC's build system is aware of only two possible OS platforms
The build system (as facing rts
) currently assumes that the run-time system is built on one of two possible system APIs: POSIX or Win32. But on WebAssembly neither of these APIs is supported. The only system-like API available for WebAssembly is the WebAssembly System Interface (WASI). Porting the run-time system to WASI will require a great many changes (see #21200 (closed)), but it needs to start by making the build system aware that there is a third possibility (WASI) in addition to POSIX and Win32.