Hacker News new | ask | show | jobs
by nickmain 1472 days ago
You could certainly generate a new Wasm module on the fly and then execute it from Javascript. Linking and sharing of memory should be possible.

Pyodide can dynamically load libraries that are separate Wasm modules so it is worth checking out how that works.

1 comments

IIRC inter-module calls are more expensive than intra-module calls though.

WASM also doesn't allow for functions with variadic return counts.