Thanks for the help! For now, I’ve found that replacing emscripen_return_address
in the generated js with a noop before it gets imported to WASM works as a temporary hack.
If anyone is curious what a migration to emscripten can look like for a small but nontrivial project, see this commit for my raytracer. Although it was a little painful at times as someone who had never used emscripten before, the switch is definitely worth it if you expect to use a lot of memory and need to share between workers.