by vbezhenar · 2y ago · 0 comments
Compile Linux kernel to wasm. So it can run inside a browser with a very nice performance.
Write FS drivers to enable seamless caching and remote data storage, so you can shutdown your system on PC and boot from laptop. Or even some kind of hibernate mode, so you can just continue from where you left off.
Write graphics drivers using WebGPU and other technologies, enabling very nice performance. May be not perfect for AAA games, but for anything less demanding it'll work.
So basically make a proper Linux port for browser and then reuse all the applications already built.
UML[0] and LKL[1] prove that running the kernel in a process is viable. μClinux efforts like NOMMU and binfmt_flat prove that you don't need memory-management nor ELF to run the kernel.
Both my own independent experiments and WALI[2] have shown it's possible to port the Linux syscall interface and userland ecosystem to WASM.
I'm confident it's doable, but there are a number of other challenges to solve along the way (like dynamic linking, the Harvard architecture, etc). Currently I'm blocked on the fact that while the kernel supports running non-ELF binaries, it really wants to be an ELF itself.
[0]: https://en.wikipedia.org/wiki/User-mode_Linux
No need to run the user's browsers separately inside a slower layer of emulation, when you already have a browser implementing the desktop.
Fewer layers and less bloaty software is better. We're already stuck with the browser, and it's not going away, so use it for everything. X-Windows and Wayland are obsolete and useless, so should be flushed.
Why isn't this obvious? I already said "when you needed to pop up a browser window on the desktop ... simply and efficiently use the same browser that's running the desktop environment". Did you read what I wrote?
Current desktop user interfaces are terrible, and we need the flexibility of a web browser to innovate and implement better ones, since Wayland is simply not up to it, because it's not extensible at runtime in JavaScript or any other language. (No, recompiling or dynamically linking in DLLs doesn't count -- that's just ActiveX.)
"Like, maybe 2 or 3 right now, my dude"
"You are like a little baby, watch this..."
opens 10 browsers inside browsers recursively and crashes hyper-v
Or even plain ChomeOS -- especially if you then run Firefox for Android.
Inception bwaaaaaaaa
Another useful mishmash of technology is pikvm, a kvm based on the raspberry pi.
You connect the pi to a machine via USB and HDMI, and remotely access it through the web browser.
The pi will digitize and send you HDMI out, and relay your keyboard and mouse to the remote machine.
What's fascinating is that pikvm can also emulate a usb flash drive, so from your browser you can give it a liveusb image and boot and run it on the remote machine.
Basically just what you would do with some kind of remote desktop. But it's not remote, it runs locally, with perfect latency. And it's easy to switch to another computer with any underlying host OS, without even interrupting your applications (if hibernate idea would work).
If it can't be achieved with rsync or ZFS send/recv, I honestly doubt a web browser will change anything.
Or wait. Perhaps we could run a VM inside the OS in the browser...