Skip to content

michaelmelanson/wasm-kernel

Repository files navigation

WASM kernel

Pushing forward the Birth and Death of Javascript one step at a time.

tl;dr: To run this follow the Setup instructions then run make. You'll almost certainly get errors that you'll have to work through, because this was done in like 4 hours so set your expectations accordingly.

What is this?

This is a small Rust project that produces a bootable binary with an embedded WebAssembly interpreter. It can boot in QEMU using the included UEFI firmware (see ovmf), then execute WebAssembly binaries. I haven't tried booting it on real hardware but theoretically it should work as long as the machine has the right firmware.

It's basically what happens if you took uefi-rs in one hand and wasmi in the other hand, and tried to stick them together. They had an enormous fight, and when they were done WebAssembly was booting in QEMU.

Screenshot

That text comes from a Rust application in extern/init that gets compiled to WebAssembly and embedded into the kernel binary then interpreted.

Setup instructions

make setup
brew install qemu

At this point, running make should start QEMU and show INFO: Hello from WASM! as seen in the screenshot above.

About

Runs WebAssembly binaries on barebones x86-64 systems.

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published