Here's what works:
- Build a custom Linux kernel and base system based on the buildroot embedded Linux distribution
- Boot in the browser
- Run python. Works great!
Here's what doesn't work:
There were also some gotchas:
- When temu runs on Linux, it uses KVM for x86 emulation. But in the browser, KVM is not available, so it attempts to provide its own x86 CPU emulation, so the emulation behaves differently, and is buggier. Also, the temu x86 CPU emulator is not currently open source.
Possible uses for this technology are:
- Supporting online integrated development environments IDEs to develop system software, without needing to spin up a server.
- Supporting web-focused build toolchains (e.g. typescript, babel) to compile web projects on-the-fly in the browser
- Pedagogy: create online classroom environments without needing to spin up a bunch of servers