Could bun run in the browser? #10400
Replies: 7 comments 2 replies
-
I would love to see something like a Web Container but for Bun. |
Beta Was this translation helpful? Give feedback.
-
If bun could be compiled to wasm, then Web Container/StackBlitz, CodeSandbox would be easier to implement in Web. |
Beta Was this translation helpful? Give feedback.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
-
Bumping this, this would be awesome! |
Beta Was this translation helpful? Give feedback.
-
I would love to get an opinion on this by someone who knows the codebase and the applicability of, for example, compiling bun to webassembly. Node-js compatible web runtimes like Webcontainers and Nodebox are awesome and with recent investments into tools like bolt.new (They just raised over $100M) it's clear to see that they have usecases. However, both tools are closed-source or at least not usable for production environments, and with bun being the expert in developing Nodejs-compatible APIs, I strongly feel that a first class supported js runtime that executes in the web would be a massive selling point for bun. I would love to contribute on this, but this would probably be a serious effort. |
Beta Was this translation helpful? Give feedback.
-
Honest question, (by the way I think would be awesome), but what would be the point to compile bun into wasm to run it next to the browser? What would bring For languages like c++, rust, go, c#, zig you are bringing/bridging/exposing their ecosystem with wasm before unreachable for the browsers. 3d engines, audio processing, images processing, etc, etc. But bun has nothing specialized part for the browser and if you would need a library you can already bundle and mount it into a web worker. So what would be the gain? what would do bun or bring bun that cannot already be done with pure javascript? What use cases would we benefiting from requesting this implementation to the bun team? I don't see the ROI to be fair.
You could do this by building bun into an executable isn't it, already support it? you don't need wasm or am I missing something? |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I've noticed from performance testing some of my methods using bun vs vitest and wondering, is there any feasible solution for replacing v8 in browser with bun instead? I suppose it'd be a WASM or web worker sort of solution, or would be up to frameworks to support that sort of thing.
Wondering if anyone else has thoughts
Beta Was this translation helpful? Give feedback.
All reactions