Hello!
I am trying to understand the most reliable way to call Web Assembly (WASM) code in an editor.p5js.org sketch. I couldn't find any precedents or examples where others had done this, so I thought a thread here might help. For more on Web Assembly, see Mozilla, Wikipedia.
This involves fetching a .wasm file from a URL, and my problem seems to be that I haven't found a pattern for delaying invocation of the P5 sketch code until the WASM part is ready.
The motivation for this is that WASM provides a way to exploit code written in other languages, and can also sometimes help with performance. My particular interest is to explore using the box2d/liquidfun physics engine this way, but hopefully a shared template could work for other uses.
I made an example yesterday that seems to sometimes work, and sometimes not. Friends report it works