top | item 34793858

WebContainer API

116 points| mingw__ | 3 years ago |webcontainers.io

49 comments

order

upghost|3 years ago

Can anyone translate this from marketing speak to developer speak? I’m genuinely not sure what this is. Is this like… WASM docker in the browser or what?

justanother|3 years ago

"Like codepen, but node.js executing in the browser."

jaequery|3 years ago

I’m also equally confused.

pcj-github|3 years ago

This looks really cool (I love anything with a filesystem API), but I'm unclear on the role of hosted proxies in this setup. Also, the licensing costs aren't clear.

"WebContainers rely on hosted proxies and server-side acceleration to enable truly instant development environments. By obtaining a WebContainer API license, your business can gain access to higher API rate limits, uptime reliability, and a range of benefits designed to help you maximize the potential of the WebContainer API in your organization."

brundolf|3 years ago

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

skeoh|3 years ago

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.

vdfs|3 years ago

Beware of this (from their enterprise page):

"Licensing is required for production usage of the API in a for-profit setting (feel free to prototype as much as you like without a license). If you're using the API to meet the needs of your customers, prospective customers, and/or employees you need a license to ensure continued access to the API as you scale."

ericmsimons|3 years ago

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!

jacooper|3 years ago

Gitpod/codeserver exist. They are basically cloud vscode with server sidr containers.

nkko|3 years ago

Codeanywhere offers on-prem hosted and air-gapped workspaces supporting devcontainer.json

koolala|3 years ago

I hope this kind of thing will be open source or standard one day.

ilaksh|3 years ago

It's tempting to try to integrate this as an alternative to actual containers or fly.io but it seems to need to execute arbitrary npm installs on my server which defeats the purpose since the goal is to everything in the customer's browser instead of trusting their code on my server.

drunkenmagician|3 years 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.

kasajian|3 years ago

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.

avallach|3 years ago

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.

ericmsimons|3 years ago

> 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!

ashishbijlani|3 years ago

"This site is blocked due to a security threat that was discovered by the Cisco Umbrella security researchers."

lanecwagner|3 years ago

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 :)

supermatt|3 years ago

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.

Spivak|3 years ago

While this is really cool the setup guide feels like a lot of work and headache for an app that's already running in your browser in step 1.

kasperni|3 years ago

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

FinalDestiny|3 years ago

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/

tnzk|3 years ago

I thought this was like a standardization effort of Firefox's Multi-Account Container.

wdb|3 years ago

Doesn’t work in Safari for me

brundolf|3 years ago

HN title is a little editorialized, making it sound like a new browser standard. Should be edited imo

The materials themselves also drip with exaggeration and hand-waving, talking about things like "the legacy cloud VM" (emphasis mine), "unmatched security", "spinning up the entire dev environment in milliseconds"

All of this is aside from the actual technology, which could be cool, I have no idea yet. But it rubbed me the wrong way

bob778|3 years ago

Site is blocked due to “active security threat” so that’s not a good sign for an enterprise SaaS

helb|3 years ago

Blocked by what?