GHC WebAssembly Weekly Update, 2022-12-14

Previous update:

  • Cross target emulator support in GHC testsuite. (!9515) The real work is done by @bgamari, this draft MR is just a rebased and cleaned up version of his original one. I managed to run the testsuite with the wasm backend, the overall experience is much smoother than before! Previously I had to use proot to run it so that the testsuite driver can spawn wasm subprocesses transparently, it was extremely flaky and caused a lot of LLVM segfaults that I failed to debug in the end.
  • Filed 16 new tickets with the wasm label. Some of those are testsuite failures for me to debug in the coming weeks. There are also lower priority feature requests that I won’t pick up anytime soon, but it may still be better to post them for potential discussion, rather than keeping them as random thoughts in my head.
  • Default to .wasm executable extension to match convention in the wasm ecosystem. (!9533)
  • Add some missing autoconf checks to base required to fix wasm IPE build. (!9532)
  • Minimal repro for LLVM bug #59095.
  • Revisit the issue of creating a wasi package as the proper system library and gradually shift away from unix. Looks like a good starting point is generating Haskell bindings for the wasi syscalls from the machine readable wasi spec, then we can layout a plan on making unix reverse dependencies in boot libs support wasi as well.

Overall, I had much more luck in finding bugs than solving them this week. Debugging a compiler backend is always time consuming and a bit stressful, especially so for wasm. Though I’ve solved more fatal bugs before the merge, so there’s no reason these ones cannot be dealt with :slight_smile:

This is the last weekly report of 2022, next one shall come in January. Thanks all for your interest and support, enjoy rest of this year!