Just to clarify, it creates Web Workers with JavaScript which share a WebAssembly instance. This plumbing is done automatically when compiled with Emscripten with the correct flags. You can't just take code that spawns threads, create and run a single WebAssembly instance and have it work without something like Emscripten that will do this plumbing for you. It must be done via Web Workers, which are heavyweight, so you wouldn't want to be spawning lots of them.