| ▲ | UncleOxidant 4 hours ago | ||||||||||||||||
> So the later modules embed a full 32-bit Alpine Linux machine that boots inside the browser tab, using the v86 x86-to-wasm emulator... You are running OCaml bytecode inside a Linux guest inside an x86 machine emulated in WebAssembly, several layers of emulation deep Wow, this is wild! > The thing I would love to reach is booting a compiled unikernel directly in wasm via WASI, with no Linux host underneath at all. That would make the last module as live as the rest. Couldn't the Mirage unikernel thingy be used to compile a unikernel with all of the needed OCaml libs + i/o support? Thus negating the need for having to boot Linux inside of a browser tab? Couldn't that be done in all of the places they're booting Linux in a tab? | |||||||||||||||||
| ▲ | kcsrk 4 hours ago | parent [-] | ||||||||||||||||
Author of the post here. I need a Linux VM to illustrate a couple of things in the last few lectures. Showing C undefined behaviour, memory safety issues and how that becomes security issues, compiling OCaml program to show test coverage, and being able to build unikernels. So can’t completely do away with Linux VMs. For Unikernels, currently v86 is 32-bit only and OCaml 5 has dropped support for native 32-bit backends. In order to boot 64-bit unikernels, I’d need qemu. All of this could be done, but (a) this is likely to be quite slow (and the current emulation already is) and (b) the learning objectives are probably not improved a lot with the additional infrastructure. Hence, dropped it. | |||||||||||||||||
| |||||||||||||||||