Showing off the first version of Munal OS, an experimental operating system I have been writing in Rust on and off for the past few years.
https://github.com/Askannz/munal-os
It's an unikernel design that is compiled as a single EFI binary and does not use virtual address spaces for process isolation. Instead, applications are compiled to WASM and run inside of an embedded WASM engine.
Other features:
* Fully graphical interface in HD resolution with mouse and keyboard support
* Desktop shell with window manager and contextual radial menus
* PCI and VirtIO drivers
* Ethernet and TCP stack
* Customizable UI toolkit providing various widgets, responsive layouts and flexible text rendering
* Embedded selection of applications including:
* A web browser supporting DNS, HTTPS and very basic HTML
* A text editor
* A Python terminal
Checkout the README for the technical breakdown.Demo video: https://streamable.com/5xqjcf
9d•8mo ago
This readme is really, really interesting to read through.
Why did you use wasmi instead of wasmtime?
I might actually try to use this OS inside a VM.
Half of me wants to port my own reactive GUI lib to Munal.
Gazoche•8mo ago
herobird•8mo ago
I just watched the demo video of Munal OS and am still in awe of all of its features. Really impressive work!
9d•8mo ago
Gazoche•8mo ago
herobird•8mo ago
phickey•8mo ago
lasiotus•8mo ago
9d•8mo ago
https://github.com/khvzak/script-bench-rs
herobird•8mo ago
However, execution is just one metric that might be of importance.
For example, Wasmi's lazy startup time is much better (~100-1000x) since it does not have to produce machine code. This can result in cases where Wasmi is done executing while Wasmtime is still generating machine code.
Old post with some measurements: https://wasmi-labs.github.io/blog/posts/wasmi-v0.32/
Always benchmark and choose the best tool for your usage pattern.
9d•8mo ago
I guess it's like v8 compared to quickjs.
Anyway all this talk about wasm makes me want to write a scriptable Rust app!
phickey•8mo ago
lasiotus•8mo ago
I guess not much can be done at the moment: dependencies are often the primary obstacle in porting crates to new targets, and just comparing the list of dependencies of wasmtime vs wasmi gives a pretty good indication of which crate is a bit more careful in this regard:
https://crates.io/crates/wasmtime/33.0.0/dependencies https://crates.io/crates/wasmi/0.47.0/dependencies
phickey•8mo ago
lasiotus•8mo ago
That's great to hear! I think it is a bit too early to spend extra effort on porting Wasmtime to Motor OS at the moment, as there are a couple of more pressing issues to sort out (e.g. FS performance is not yet where it should be), but in a couple of months I may reach out!
sitkack•8mo ago
What are the min memory requirements for wasmtime/cranelift?
phickey•8mo ago
I have run wasmtime on the esp32 microcontrollers with plenty of ram to spare, but I don’t have a measurement handy.
sitkack•8mo ago
https://github.com/bytecodealliance/wasmtime/blob/main/pulle...
Gazoche•8mo ago
phickey•8mo ago
dmitrygr•8mo ago
SPECTRE and MELTDOWN enter the chat
9d•8mo ago
DoctorOW•8mo ago
fsflover•8mo ago
If you are talking about the app isolation through virtualization, then I've been living in this future for quite some time with Qubes OS. The isolation there is also extremely reliable.
9d•8mo ago
MisterTea•8mo ago
I'd like to see an Inferno with a WASM runtime that utilizes a Plan 9 like ABI/API instead of WASI. Node9 did similar but with Lua: https://github.com/jvburnes/node9
apitman•8mo ago