The idea is that you'll be able to program window management, animation, configuration and more from WebAssembly plugins that are built with Rust. I've been wanting something like this for a while now in Wayland, especially something that skirts around the need for a heavy scripting language. I'm hoping to have a stable release of it by mid year.
Yup! A nice language-agnostic API + a lightweight runtime was my goal. Although I concede the point about debuggability and whatnot. I'm hoping to figure that out later down the road, but it is a tricky part.
I've been working on a new Wayland compositor called Miracle for about two years now. I recently built a plugin system for window management based off of WebAssembly. Check out my blog post for more information, but I think it is a solid and novel approach to separating window management from the compositor in Wayland. Let me know what you think!
> albeit you have to struggle sending `std` types back and forth a bit
Firefox solves this partly by not using `std` types.
For example, https://github.com/mozilla/thin-vec exists in large part because it's compatible with Firefox's existing C++ Vec/Array implementation (with the bonus that it's only 8 bytes on the stack compared to 24 for the std Vec).
The idea is that you'll be able to program window management, animation, configuration and more from WebAssembly plugins that are built with Rust. I've been wanting something like this for a while now in Wayland, especially something that skirts around the need for a heavy scripting language. I'm hoping to have a stable release of it by mid year.
I'm in the process of recreating the Niri window manager in Miracle: https://github.com/miracle-wm-org/miri-plugin
reply