GHC WebAssembly Weekly Update, 2022-11-30

Hi all! Inspired by @chreekat’s HF DevOps weekly update, I’d like to try posting a weekly summary of my work as well, starting this week on every Wednesday. In case of no report due to holidays and such, I’ll try to post a notice beforehand as a reply to the latest update thread. These threads are also AMA threads! Any thoughts and questions related to haskell/wasm are welcome.

This week is an initial update, quite recently after the wasm backend merge. So, a very high level summary of my next short term plans:

  • JSFFI and Template Haskell support will not make it to 9.6.1. Given wasm backend is quite young and not used in the wild yet, I plan to spend at least all the remaining time of this year in finding & solving bugs to make it more robust and lay a solid foundation. Better safe than sorry!
  • Before I move on to implement new features, there ought to be better testing & benchmarking for wasm backend on GHC CI. Now I’m working on the testing part.

The rest is this week’s update:

  • Solved a wasm backend bug related to subword clz/ctz/popcnt that resulted in incorrect runtime behavior of text (!9426). Updated ghc-wasm-meta metadata to include GHC bindists with the bugfix.
  • With a lot of help from @bgamari, used test-primops to perform QuickCheck testing on the wasm backend. Based on the test results, reported potential bugs #22531 #22532.
  • Working on a GHC draft MR !9428 to build more variants of wasm target bindists in nightly/release pipelines so to help with testing.
  • Discovered a hadrian bug when testing cross GHC (#22522), then realized I reported the exact same bug a few months ago (#21947) :confused: Seems to be fixed by the recently merged JS backend patch.
  • With some dirty hacks, managed to run the GHC testsuite again. Revealed some more bugs, it takes some time to pick out the interesting ones and file tickets.
  • When attempting to compile a cross GHC with windows host and wasm target, discovered a related hadrian bug. (#22514)
  • Opened two GHC housekeeping MRs to remove unused things in Cmm. (!9422) (!9427)
13 Likes