Comment by 9d

Comment by 9d 8 days ago

26 replies

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 8 days ago

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.

  • herobird 8 days ago

    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!

    • Gazoche 7 days ago

      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) :)

      • herobird 7 days ago

        Awww, makes me very happy to hear! :) Thank you!

    • 9d 8 days ago

      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.

  • phickey 8 days ago

    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.

    • Gazoche 7 days ago

      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 :)

      • phickey 7 days ago

        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.

    • lasiotus 7 days ago

      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.

      • phickey 7 days ago

        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.

fsflover 8 days 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 8 days ago

    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.

dmitrygr 8 days ago

> I wonder if this will be the future of OSes.

SPECTRE and MELTDOWN enter the chat

  • DoctorOW 7 days ago

    I don't understand how those vulnerabilities affect WASM OSes more than native ones.

  • 9d 8 days ago

    What the DLL, Dmitry. Don't be a buzzkill.