Hacker News new | ask | show | jobs
by drunkenmagician 1218 days ago
Er, I must be missing an important nuance here, can someone who understands this explain. What is the real world use case for this? I'm afraid I don't understand what this provides that either wasm or the browser sandbox does not.
3 comments

https://learn.svelte.dev/tutorial/introducing-sveltekit was built with web containers. SvelteKit allows developers to create server-side APIs and do server-side rendering and web containers allow those server-side components to run in the browser.
This page has some more helpful explanation https://blog.stackblitz.com/posts/introducing-webcontainers/ It has some nice features like native back-end debugging for things like Next.js apps.
Do you want to run nodejs right inside your browser without a backend? If not, then you can just ignore it.

But if you do, then this attempts to solve that problem.

If you're asking what's the use case for running nodejs in the browser? I say use your imagination.

I'm not familiar with node.js, but don't most JavaScript libraries already run in both the browser (including Electron) and node.js?

Is it a matter of significantly different system APIs and standard libraries, and this offers a bridge for applications expecting to run in Node, providing that environment in the JavaScript context of a browser? (Or does it actually run Node in WASM?)