Live data from Hacker News

Container2wasm: Convert Containers to WASM Blobs

github.com

11–20 of 72 posts

Re: Container2wasm: Convert Containers to WASM Blobs

#11
post #2

This is quite cool... But at the same time, please tell me this is not the future of software packaging.

Newt: My mommy always said there were no monsters, no real ones, but there are. Ripley: Yes, there are, aren't there? Newt: Why do they tell little kids that? Ripley: Most of the time it's true. --- But yes, I do believe this has a strong, serverless future.

Downloading a 50MB WASM blob to run an emulator to boot a Linux kernel and then start an HTTP server to handle a single request is utter madness, which is probably why this will become popular to do.

Re: Container2wasm: Convert Containers to WASM Blobs

#12
post #10

Is this a "why not" project, or are there real-world use cases for this?

Being able to run ANY Docker container directly in the browser is incredibly useful. The most obvious application is educational environments - this makes it trivial to provide all sorts of software for students to tinker with without needing to run any server-side code anywhere, just some static file hosting.

Re: Container2wasm: Convert Containers to WASM Blobs

#13
post #2

This is quite cool... But at the same time, please tell me this is not the future of software packaging.

If this is a step on the road to wasm being the primary target for packaging applications (without a docker image + x86 emulator intermediary)...

Then I am all for it.

Re: Container2wasm: Convert Containers to WASM Blobs

#15
post #10

Is this a "why not" project, or are there real-world use cases for this?

There are tons of real-world use cases.

WASM is more or more being used to extend applications with custom functions/plugins, as well as function-as-a-service services. But they usually require writing custom code, specifically for these environments.

The ability to build standard containers, use any languages and tools, run shell scripts, etc. makes WebAssembly far more accessible. Complex applications can be tested natively, and deployed effortlessly later to environments that require WebAssembly.

From a performance perspective, this is not optimal. But from a productivity perspective, this is awesome, and definitely something to have in your toolbox when all you need is get things done.

Re: Container2wasm: Convert Containers to WASM Blobs

#16
post #9

Maybe these containers should be build for wasm-wasi instead of x86 from the beginning? Then there would be no need to emulate x86 in wasm

Because "wasm-wasi" is not a CPU that Linux runs on.

But, if docker is running on WASM-WASI like it is here, maybe it's possible to do a full build toolchain as well?

Re: Container2wasm: Convert Containers to WASM Blobs

#17

Wow, haven’t seen Bochs mentioned since I was doing hobby OS development 15 years ago. I guess there’s not a ton of emulators that don’t use JIT or hardware extensions these days.

Same here! One of my very first apps for android 1.1 was a port of bochs =)

Re: Container2wasm: Convert Containers to WASM Blobs

#18
If this performs, and it is a big if, it can make life a lot easier for people with stateful services. You just push the service back to the browers and you are done. It can be a lot cheaper and lot faster, and also reduce complexity of making a stateful service scalable and reliable.
Post reply on HN