5 ms·
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 w
by 9d 1y ago
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.
- Gazoche 1y agoThanks! 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.
- herobird 1y agoWasmi 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!
- 9d 1y agoYeah 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.
- Gazoche 1y agoThank 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) :)
- herobird 1y agoAwww, makes me very happy to hear! :) Thank you!
- phickey 1y agoWasmtime 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.
- lasiotus 1y agoI'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.
- 9d 1y agoBut if this benchmark is right, then wasmtime is 5x faster than wasmi for it: https://github.com/khvzak/script-bench-rs https://github.com/khvzak/script-bench-rs
- herobird 1y agoWasmtime, 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/ https://wasmi-labs.github.io/blog/posts/wasmi-v0.32/ Always benchmark and choose the best tool for your usage pattern.
- 9d 1y agoThat'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!
- phickey 1y ago
- dmitrygr 1y ago> I wonder if this will be the future of OSes. SPECTRE and MELTDOWN enter the chat
- fsflover 1y ago> 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.
- 9d 1y agoMostly 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.
- MisterTea 1y agoThe future happened in the 90's: https://en.wikipedia.org/wiki/Inferno_(operating_system) 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 https://github.com/jvburnes/node9
- apitman 1y agoI 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.