Uno Platform 4.4 arrives with WebAssembly threading and exceptions ahead of .NET 7

Uno Platform 4.4 arrives with WebAssembly threading and exceptions ahead of .NET 7

Uno Platform, a cross-platform framework for .NET development, has released version 4.4 with greatly improved WebAssembly support, along with animation and text rendering enhancements.

Microsoft’s development strategy is constantly in flux, and .NET developers looking for cross-platform support may have found Uno’s platform more complete than first-party frameworks like Blazor or MAUI (Multi-platform App UI).

Uno targets Windows, Web, iOS, macOS, Android and Linux, using the Skia 2D graphics library to support both Linux and Windows 7, neither of which MAUI can target. The framework relies on WebAssembly to enable web applications, using mono-wasm to run C# code in the browser. Uno is Apache 2.0 licensed, with the company behind it apparently depending on paid support plans for its business model.

Uno Platform architecture

A new version of the Uno platform appears every six weeks or so. The new 4.4 is of particular interest because of the improved WebAssembly support. Key features include native WebAssembly exception handling and experimental threading support. Previously, .NET exceptions relied on JavaScript interop when compiled to WebAssembly, slowing performance.

According to the Uno team, using WebAssembly exceptions instead can improve performance by up to 1.75 times. Threading is another big feature and in Uno Platform 4.4 is enabled through a project configuration option, though developers are warned that “there will be dragons” and to expect “scenarios that don’t work properly.”

The Uno developers are in essence offering an early look at these same WebAssembly features also being previewed in .NET 7, and working with the .NET team to improve them, so this is not a fork.

Another new feature in Uno 4.4 is Skottie integration, where Skottie is a native player for JSON animations in the Lottie format, using .NET bindings to Skia. Lottie files will play on all supported Uno platforms. The team has also revamped text rendering in TextBlock components, using an open source text rendering implementation called HarfBuzz.

Uno targets a broader range of platforms than Microsoft’s own cross-platform offerings

Uno is a capable framework and with its wide range of targets reminiscent of Google’s Flutter, but for .NET developers. Microsoft appears to be supportive and has featured Uno in official .NET presentations. The caveat perhaps is that Uno is not for the faint-hearted; those building with Visual Studio and Uno Platform 4.4 require the latest Visual Studio 2022 17.3 preview 2, for example.