Whyyyyyyy. bangs head into desk
The universe is just a simulation running inside a vm inside a web browser. It's web browsers all the way down.
Container2wasm: Convert Containers to WASM Blobs
51–60 of 72 posts
Re: Container2wasm: Convert Containers to WASM Blobs
#52Earlier quoted context omitted.
I very much doubt it's "any" docker image. WASM isn't 1:1 feature equivalent with docker. e.g. filesystem access
It looks to me like they solve that by simulating the entire Linux operating system, filesystem included. You won't get persistence when you restart the process, but you'll still be able to run code that needs to read and write files. Try it for yourself: visit https://ktock.github.io/container2wasm-demo/amd64-debian-was... to start a shell against a Debian container, then use "echo 'hi' > hello.txt" to write a file…
Since it's Linux and you can give it "network access" (using workarounds such as redirecting via a server), you can just use one of the existing ways to mount a remote filesystem that could be stored on the server (such as NFS, sshfs, ...).
Or bridge/mount to the local browser and store it in indexeddb or whatever.
It already has directory mapping when running outside a browser - maybe there's even an easy way to do this more directly than funneling everything through the virtual network.
Re: Container2wasm: Convert Containers to WASM Blobs
#53Shameless self-promotion: https://webvm.io Powered by a x86->Wasm JIT. Technical writeup: https://labs.leaningtech.com/blog/webvm-server-less-x86-virt...
Re: Container2wasm: Convert Containers to WASM Blobs
#54A particularly interesting part is the socket layer inside the browser. Other people solving this problem have previously used a proxy to a server that does the real socket implementation. This means you can't have a "browser-only" solution.
The author has solved this (for HTTP/S only) by proxying HTTP requests and then re-creating them as fetch requests (details here: https://github.com/ktock/container2wasm/tree/main/examples/n...). I'm very interested in using this approach for my own project Runno (https://runno.dev).
Re: Container2wasm: Convert Containers to WASM Blobs
#55It has interesting solution regarding fs.
Re: Container2wasm: Convert Containers to WASM Blobs
#56Do 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. Choo…
Re: Container2wasm: Convert Containers to WASM Blobs
#57Do 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. Choo…
Re: Container2wasm: Convert Containers to WASM Blobs
#58Do 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.
- https://floooh.github.io/visual6502remix/
- (start the emulators by clicking the little "UI" icon to get the debugger UI) https://floooh.github.io/tiny8bit/
- (start by clicking the little "UI" icon) https://floooh.github.io/sokol-html5/
Platform abstraction is handled through the sokol headers: https://github.com/floooh/sokol
Dear ImGui is small and fast enough for running in browsers (it will add up to a few hundred KBytes of WASM byte code). If this is too much "bloat", there are smaller, but also less powerful alternatives like microui: https://github.com/rxi/microui)
Re: Container2wasm: Convert Containers to WASM Blobs
#59Edit: i don't mind saying that such accomplishments make me feel completely inadequate as a developer.
Re: Container2wasm: Convert Containers to WASM Blobs
#60Shameless self-promotion: https://webvm.io Powered by a x86->Wasm JIT. Technical writeup: https://labs.leaningtech.com/blog/webvm-server-less-x86-virt...
Very nice! Most language playground sites should adopt this approach.