Ask HN: Is anyone working on a WASM-based Node engine for the browser?

4 months ago 12

There are a number of companies working on solving micro-VM sandboxes, using Firecracker or libkrun. This includes CodeSandbox, E2B and Microsandbox. One of the major use cases is running AI-generated code in a safe environment, with the promise of fast (~2-300 ms) bootup times, pre-built memory snapshots, and the ability hibernate and wake up instances extremely fast. The downside is these solutions still have network latency, require server side resources, and added complexity when managing cloud environments.

StackBlitz has shown that they can achieve a WASM-based Node environment with WebContainers[1] running fully in the browser, but it's a proprietary solution and requires a commercial license to use. There was a similar effort by the CodeSandbox team called Nodebox [2] which appears to be discontinued, and used browser based API polyfills and clever workarounds to emulate Node.

Is anyone working on an open-source effort to build a WASM based Node-compatible engine? These solutions are particularly useful for running AI-generated code in a browser sandbox with instant feedback. If so, I'd love to hear about your project.

[1] https://webcontainers.io/ [2] https://github.com/Sandpack/nodebox-runtime

Read Entire Article