Live data from Hacker News

Container2wasm: Convert Containers to WASM Blobs

github.com

21–30 of 72 posts

Re: Container2wasm: Convert Containers to WASM Blobs

#21

Earlier quoted context omitted.

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?

Docker is not running on wasm. There's a wasm app, that is a x86_64 CPU emulator, used to run a Linux VM, on top of which anything can run. Including existing Docker images for x86_64.

Re: Container2wasm: Convert Containers to WASM Blobs

#23
post #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.

I very much doubt it's "any" docker image. WASM isn't 1:1 feature equivalent with docker. e.g. filesystem access

Re: Container2wasm: Convert Containers to WASM Blobs

#24
post #11

Earlier quoted context omitted.

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.

I can see my house from up here!

Re: Container2wasm: Convert Containers to WASM Blobs

#25
Do any GUI frameworks support WASM?

I've been looking for a way to run GUI applications remotely for a while, specifically on a wlroots compositor. Projects like this (maybe one day) and https://github.com/udevbe/greenfield are interesting since they essentially make access universally accessible.

Re: Container2wasm: Convert Containers to WASM Blobs

#26
post #2

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

Allow me to introduce you to https://www.destroyallsoftware.com/talks/the-birth-and-death... Everything is on track.

I love all of Gary Bernhardt's talks.

Re: Container2wasm: Convert Containers to WASM Blobs

#27
post #25

Do any GUI frameworks support WASM? I've been looking for a way to run GUI applications remotely for a while, specifically on a wlroots compositor. Projects like this (maybe one day) and https://github.com/udevbe/greenfield are interesting since they essentially make access universally accessible.

I don't know about GTK, QT, and the like, but there's a whole budding ecosystem purporting to solve it WASM-native.

Dioxus [1] and about a dozen other libraries are attempting to be write-once, deploy web, mobile, desktop with native performance. They adopt a React-like component UI.

The Rust ecosystem is full of stuff. There are lots of different approaches too - immediate mode drawing, canvas drawing [2], etc.

Choosing a winner is the hard part. There are too many projects and no clear community-elected leader.

[1] https://dioxuslabs.com/learn/0.4/getting_started/wasm

[2] https://www.egui.rs/#demo

Re: Container2wasm: Convert Containers to WASM Blobs

#28
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.

Why is that relevant? txdv was suggesting to ditch Linux, so what CPUs Linux supports is not relevant.

Re: Container2wasm: Convert Containers to WASM Blobs

#30
post #25

Do any GUI frameworks support WASM? I've been looking for a way to run GUI applications remotely for a while, specifically on a wlroots compositor. Projects like this (maybe one day) and https://github.com/udevbe/greenfield are interesting since they essentially make access universally accessible.

Flutter is looking to do so, it was just waiting for WASM-GC support which has now shipped on Chrome. Rust is another good one as the other commenter stated. I personally use Flutter for the UI and Rust for the business logic, using libraries like flutter_rust_bridge and rinf as FFI between the two.
Post reply on HN