Live data from Hacker News

WebContainer API

webcontainers.io

41–50 of 54 posts

Re: WebContainer API

#41
post #7

Earlier quoted context omitted.

That's bizarre how the major emphasis is on running things client-side instead of on a hosted VM, but then it still requires a live paid service

I believe due to CORS and native code being used you would need a service to download NPM packages and compile binaries to WASM. You could offer self hosting of those and no licensing for commercial products, but you then wouldn't have a financial strategy to develop the technology in the first place. Not quite as much at least. A big draw is you don't have to give access to a 3rd party all of your code if the techno…

What kind of use cases does this have? Excuse my ignorance on the topic

Re: WebContainer API

#42
post #7

Earlier quoted context omitted.

That's bizarre how the major emphasis is on running things client-side instead of on a hosted VM, but then it still requires a live paid service

I believe due to CORS and native code being used you would need a service to download NPM packages and compile binaries to WASM. You could offer self hosting of those and no licensing for commercial products, but you then wouldn't have a financial strategy to develop the technology in the first place. Not quite as much at least. A big draw is you don't have to give access to a 3rd party all of your code if the techno…

Eric (CEO of StackBlitz) here- your explanation is 100% correct regarding why & how servers need to be used to power parts of WebContainer environments (i.e. proxying npm, git, transforming binaries, amongst a handful of other things).

Some of these operations can be cacheable which is ideal for scalability, but even the ones that cannot tend to be far cheaper than running VMs which incur by the minute CPU costs.

Our intention is to be fully transparent on the how & why, so I’m happy to answer further questions on all this! I also think it’d be good for us to include something more detailed like your explanation in our docs so that other folks don’t feel similarly confused when reading them- curious if there’s particular points that jump out to you that I can share with our team to include!

Re: WebContainer API

#43
post #9

Short of building my own using this API, does a self-hosted Codesandbox/Stackblitz alternative exist? I love the idea of spinning up web containers within my corporate network so I can prototype applications using internal APIs.

Eric (StackBlitz CEO) here- you can actually self host StackBlitz! You’ll just need our Enterprise Edition (https://stackblitz.com/enterprise) which can be run on any cloud or on-prem. Happy to answer any questions you might have!

Re: WebContainer API

#44

I like the website layout. Knowing little about Web development. Is this custom made or using some kind of framework/template?

It looks like they're loading in MDX (Markdown) for a lot of the pages There are quite a few "static-site generator" templates that are easy to setup and customize and many of them are free to use! If I had to guess, I think they're using VitePress [1] here. Nextra [2] is also good for this kind of a website. [1] https://vitepress.vuejs.org/ [2] https://nextra.site/

Eric (StackBlitz CEO) here- just wanted to confirm that we are indeed using VitePress! By far the best documentation site generator available right now from a DX, design, and flexibility perspective. Highly recommend.

Re: WebContainer API

#45
This is potentially exactly what I'm looking for to take Boot.dev to the next level. I'm a bit worried that it's too JS focused, but if I can hack in the other stuff I need with wasm then this gets really exciting. thanks for posting :)

Re: WebContainer API

#46

This is potentially exactly what I'm looking for to take Boot.dev to the next level. I'm a bit worried that it's too JS focused, but if I can hack in the other stuff I need with wasm then this gets really exciting. thanks for posting :)

FYI, in your homepage video explainer, the code contains the comment "Don't touch above this line", but I think you meant "below" given the purpose of the exercise.

Re: WebContainer API

#47
post #9

Short of building my own using this API, does a self-hosted Codesandbox/Stackblitz alternative exist? I love the idea of spinning up web containers within my corporate network so I can prototype applications using internal APIs.

Eric (StackBlitz CEO) here- you can actually self host StackBlitz! You’ll just need our Enterprise Edition ( https://stackblitz.com/enterprise ) which can be run on any cloud or on-prem. Happy to answer any questions you might have!

For free?

Re: WebContainer API

#49
Does "WebContainer API" mean "proprietary web service for accessing npm and git over http"? Or is it "ECMAScript API of new open source WASM-based POSIX-style browser OS"?

The documentation doesn't seem to separate these two, and applying such name for the former would seem intentionally misleading to me, especially if it gets trademarked by commercial entity providing the service.

Re: WebContainer API

#50

Does "WebContainer API" mean "proprietary web service for accessing npm and git over http"? Or is it "ECMAScript API of new open source WASM-based POSIX-style browser OS"? The documentation doesn't seem to separate these two, and applying such name for the former would seem intentionally misleading to me, especially if it gets trademarked by commercial entity providing the service.

> is it "ECMAScript API of new open source WASM-based POSIX-style browser OS"

This is closer to what the Bytecode Alliance is looking to do with WASI, which we're playing a small (but crucial) part in: https://blog.stackblitz.com/posts/bytecode-alliance/

> Does "WebContainer API" mean "proprietary web service for accessing npm and git over http"?

Kinda, we have plans to allow self hosting and more reg open source- more to come!

Post reply on HN