News for hackers. Stuff that matters.
Re:Show HN: Munal OS: a graphical experimental OS with WASM ... by 9d on Monday June 09, 2025 @02:27PM (#44227568)
This is incredible. I wonder if this will be the future of OSes.

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.

Re:Show HN: Munal OS: a graphical experimental OS with WASM ... by Gazoche on Monday June 09, 2025 @02:46PM (#44227819)
Thanks! I tried to get wasmtime working but it was too much of a pain to compile in no_std mode, so I settled for wasmi instead.
Re:Show HN: Munal OS: a graphical experimental OS with WASM ... by herobird on Monday June 09, 2025 @02:52PM (#44227913)
Wasmi author here. Glad to see Wasmi being used in embedded contexts were it really shines. :)

I just watched the demo video of Munal OS and am still in awe of all of its features. Really impressive work!

Re:Show HN: Munal OS: a graphical experimental OS with WASM ... by 9d on Monday June 09, 2025 @03:23PM (#44228308)
Yeah it's one of those projects were I'm so impressed that I'm saying nothing because there's nothing to say, it's just really impressive. I'm not sure what will come of this project, but it has a lot of potential to at least inspire other projects or spark important discussions around its innovations.
Re:Show HN: Munal OS: a graphical experimental OS with WASM ... by Gazoche on Monday June 09, 2025 @04:40PM (#44229210)
Thank you! And thanks for making Wasmi, it's a really impressive project and it's the reason why I decided to go this whole WASM sandbox route (because I could embed it easily) :)
Re:Show HN: Munal OS: a graphical experimental OS with WASM ... by herobird on Monday June 09, 2025 @06:31PM (#44230270)
Awww, makes me very happy to hear! :) Thank you!
Re:Show HN: Munal OS: a graphical experimental OS with WASM ... by phickey on Monday June 09, 2025 @03:40PM (#44228525)
Wasmtime maintainer here - curious to hear what went wrong, I and several other users of wasmtime have production embeddings under no_std, so it should do everything you need, including building out WASI preview 2 support. You can find me on the bytecode alliance zulip if you need help.
Re:Show HN: Munal OS: a graphical experimental OS with WASM ... by lasiotus on Monday June 09, 2025 @04:52PM (#44229339)
I'm not the OP, but I have a similar experience with Motor OS: wasmi compiles and works "out of the box", while wasmtime has a bunch of dependencies (e.g. target-lexicon) that won't compile on custom targets even if all features are turned off in wasmtime.
Re:Show HN: Munal OS: a graphical experimental OS with WASM ... by phickey on Monday June 09, 2025 @06:56PM (#44230508)
Not sure how to help with this much information but I've built and run wasmtime on some pretty squalid architectures (xtensa and riscv32 microcontrollers among others) but the right collection of features might not be obvious. We can help you find the right configuration on the Bytecode Alliance zulip or the wasmtime issue tracker if you need it.
Re:Show HN: Munal OS: a graphical experimental OS with WASM ... by lasiotus on Monday June 09, 2025 @10:53PM (#44231982)
> Not sure how to help with this [...]

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

Re:Show HN: Munal OS: a graphical experimental OS with WASM ... by phickey on Tuesday June 10, 2025 @01:02AM (#44232717)
Wasmtime has many capabilities that wasmi does not, and therefore has more optional dependencies, but the required set of dependencies has been portable to every platform I've targeted so far. If anything does present a concrete issue we are eager to address it. For example, you could file an issue on target-lexicon describing how to reproduce your issue.
Re:Show HN: Munal OS: a graphical experimental OS with WASM ... by lasiotus on Tuesday June 10, 2025 @03:18AM (#44233683)
> If anything does present a concrete issue we are eager to address it.

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!

Re:Show HN: Munal OS: a graphical experimental OS with WASM ... by sitkack on Tuesday June 10, 2025 @08:09PM (#44242909)
Is that wasmtime in interpreter mode? I didn't see a rv32 backend to wasmtime (in cranelift) or did I not look in the right place.

What are the min memory requirements for wasmtime/cranelift?

Re:Show HN: Munal OS: a graphical experimental OS with WASM ... by phickey on Wednesday June 11, 2025 @01:03AM (#44244353)
There’s now an interpreter in wasmtime called Pulley. It’s an optimizing interpreter based on Cranelift, which generates interpreter opcodes which are more efficient to traverse than directly interpreting the Wasm binary.

I have run wasmtime on the esp32 microcontrollers with plenty of ram to spare, but I don’t have a measurement handy.

Re:Show HN: Munal OS: a graphical experimental OS with WASM ... by sitkack on Wednesday June 11, 2025 @02:56PM (#44250645)
Re:Show HN: Munal OS: a graphical experimental OS with WASM ... by 9d on Monday June 09, 2025 @04:59PM (#44229411)
But if this benchmark is right, then wasmtime is 5x faster than wasmi for it:

https://github.com/khvzak/script-bench-rs

Re:Show HN: Munal OS: a graphical experimental OS with WASM ... by herobird on Monday June 09, 2025 @06:20PM (#44230180)
Wasmtime, being an optimizing JIT, usually is ~10 times faster than Wasmi during execution.

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.

Re:Show HN: Munal OS: a graphical experimental OS with WASM ... by 9d on Monday June 09, 2025 @06:45PM (#44230390)
That's a good point I didn't think about.

I guess it's like v8 compared to quickjs.

Anyway all this talk about wasm makes me want to write a scriptable Rust app!

Re:Show HN: Munal OS: a graphical experimental OS with WASM ... by Gazoche on Monday June 09, 2025 @04:56PM (#44229376)
I think I was a bit spooked by the examples (https://github.com/bytecodealliance/wasmtime/tree/main/examp...), and the need to implement platform dependencies in C code (which would have complicated the build process). Makes sense since it's a more complex and mature project, but Wasmi on the other hand was just a pure Rust dependency that only required a single line in the Cargo.toml. So in short I went the lazy route :)
Re:Show HN: Munal OS: a graphical experimental OS with WASM ... by phickey on Monday June 09, 2025 @06:54PM (#44230489)
All of the C primitives there implemented in (unsafe) Rust, but we built that example for an audience that already had some platform elements in C. We'll try to improve the example so that both integrating with C, and using pure Rust, are covered.
Re:Show HN: Munal OS: a graphical experimental OS with WASM ... by fsflover on Monday June 09, 2025 @03:21PM (#44228288)
> I wonder if this will be the future of OSes.

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.

Re:Show HN: Munal OS: a graphical experimental OS with WASM ... by 9d on Monday June 09, 2025 @03:42PM (#44228564)
Mostly I meant WASM as a platform (waap?) which seems so futuristic to me. I hope one day all OSes can natively run WASM code, though I'm not sold on WASI since then we're back to square one with security it seems.
Re:Show HN: Munal OS: a graphical experimental OS with WASM ... by MisterTea on Tuesday June 10, 2025 @04:14PM (#44240983)
The future happened in the 90's: https://en.wikipedia.org/wiki/Inferno_(operating_system)

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

Re:Show HN: Munal OS: a graphical experimental OS with WASM ... by apitman on Tuesday June 10, 2025 @05:10PM (#44241468)
I wouldn't say square one. It's still way simpler to control what a program can do. The host runtime decides what's on the other side of those WASI calls.
Re:Show HN: Munal OS: a graphical experimental OS with WASM ... by dmitrygr on Monday June 09, 2025 @03:10PM (#44228177)
> I wonder if this will be the future of OSes.

SPECTRE and MELTDOWN enter the chat

Re:Show HN: Munal OS: a graphical experimental OS with WASM ... by 9d on Monday June 09, 2025 @03:13PM (#44228207)
What the DLL, Dmitry. Don't be a buzzkill.
Re:Show HN: Munal OS: a graphical experimental OS with WASM ... by DoctorOW on Tuesday June 10, 2025 @03:40AM (#44233812)
I don't understand how those vulnerabilities affect WASM OSes more than native ones.