WASM Plugins Arrive

Miracle‑WM 0.9 added WebAssembly plugin support and a fresh Rust API, opening a path for running sandboxed, high-performance extensions inside the Mir-based Wayland compositor. The release also ships cursor themes and targeted performance improvements useful for edge and compositor-level experiments. (x.com)

A Wayland compositor is the part of Linux that decides where every window goes and how every pixel reaches the screen, so adding code inside it is like letting strangers tinker with your car while it is moving. Miracle‑WM 0.9 now lets that extra code run as WebAssembly instead of as a normal native plugin, which means the extension is packaged as a small portable bytecode module rather than a full shared library. (canonical.com) (webassembly.org) WebAssembly started in web browsers, where sites needed a way to run fast code without handing the whole machine to untrusted software. The WebAssembly standard describes a compact binary format designed for fast loading and near‑native execution, which is why projects outside the browser now use it as a sandboxed plugin format. (webassembly.org) Miracle‑WM is a tiling window manager built on Mir, Canonical’s toolkit for building Wayland compositors on Linux. Its own project page says it aims for the keyboard‑driven style of i3 and Sway, but with smoother graphics and a richer extension system. (github.com) (canonical.com) The new part in version 0.9 is that Miracle loads user‑selected `.wasm` files at runtime and calls specific exported functions when window‑manager events happen. Developer Matthew Kosarek wrote that Miracle runs a WebAssembly engine inside the compositor and currently uses WasmEdge to execute those modules. (matthewkosarek.xyz) (wasmedge.org) That changes who can safely experiment with compositor code. A native plugin written in C or C++ can crash the whole process with one bad pointer, while a WebAssembly module runs inside a tighter runtime with a defined interface and no direct access to arbitrary host memory unless the compositor explicitly exposes it. (matthewkosarek.xyz) (webassembly.org) Miracle‑WM 0.9 also ships a Rust application programming interface, which is a set of ready‑made types and rules for writing those plugins without manually touching the low‑level foreign function interface. The `miracle_plugin` Rust crate says it maps the compositor’s C application binary interface into idiomatic Rust traits and types, then compiles the result into a WebAssembly module. (docs.miracle-wm.org) That matters because Rust is designed to catch memory mistakes during compilation, before the plugin ever reaches the compositor. Pairing Rust with WebAssembly gives Miracle two layers of protection at once: one before the code is built, and one while it is running. (docs.miracle-wm.org) (webassembly.org) The release is not only about plugins. Reports on the 0.9 launch say it also adds cursor theme support, a key sequence for reloading configuration, performance improvements, and bug fixes, which are the small quality‑of‑life pieces that make a hackable compositor usable day to day. (phoronix.com) (linuxiac.com) The reason Linux developers are paying attention is that the compositor sits at the edge of everything you touch: focus rules, animations, window placement, panels, and input behavior all pass through it. If Miracle’s WebAssembly model works well, it gives people a way to test new desktop behavior in one of the most sensitive parts of the stack without recompiling the compositor for every experiment. (matthewkosarek.xyz) (github.com) Miracle‑WM is still a smaller project than giants like GNOME’s Mutter or KDE’s KWin, which is exactly why this release is interesting. Smaller compositors can try ideas that larger desktops avoid, and Miracle 0.9 is betting that “window manager plugins as WebAssembly modules” could be one of those ideas. (gilesorr.com) (github.com)

Get your own daily briefing

Scout delivers personalized news, insights, and conversations tailored to your role and industry.

Download on the App Store

Shared from Scout - Be the smartest in the room.