Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/michaelmelanson/wasm-kernel
Runs WebAssembly binaries on barebones x86-64 systems.
https://github.com/michaelmelanson/wasm-kernel
osdev rust uefi webassembly
Last synced: 3 months ago
JSON representation
Runs WebAssembly binaries on barebones x86-64 systems.
- Host: GitHub
- URL: https://github.com/michaelmelanson/wasm-kernel
- Owner: michaelmelanson
- Created: 2019-04-01T20:21:44.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2019-04-23T13:38:57.000Z (over 5 years ago)
- Last Synced: 2024-06-03T07:36:58.405Z (5 months ago)
- Topics: osdev, rust, uefi, webassembly
- Language: Rust
- Homepage:
- Size: 8.15 MB
- Stars: 9
- Watchers: 1
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# WASM kernel
Pushing forward the [_Birth and Death of Javascript_](https://www.destroyallsoftware.com/talks/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`](https://crates.io/crates/uefi) in one hand and
[`wasmi`](https://crates.io/crates/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](doc/images/screenshot.png)
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.