@dmchurch, could you add the wasm port to the continuous integration available in dev.swi-prolog.org?
This will help to easily see when things break, and also might help others to comipile to wasm by looking at the source.
BTW, thanks for your great contributions to SWI-Prolog!