Blazor WebAssembly (client-side) with AOT and SkiaSharp

As we’re working to stabilize our .NET 5 support for Uno Platform, and particularly Full AOT and Profile Guided AOT, it seemed natural to experiment and validate if the work we’ve been doing could also benefit Blazor. There is always something we learn when we experiment and help push the WebAssembly toolchain forward, so top-notch tooling is available as soon as possible. It turns out that enabling AOT and native linking in Blazor WebAssembly (client-side) can work, producing as you’d expect, some great performance benefits! If you are like us and like to experiment with WebAssembly, read on to see how we turned AOT on for Blazor WebAssembly. Here it is running on our server. Make sure you run the sample more than once, just to also experience the performance difference you get with initial load vs cached WebAssembly applications.   About Uno Platform For those new to Uno Platform – it allows for creation of pixel-perfect, single-source C# and XAML apps which run natively on Windows, iOS, Android, macOS, Linux and Web via WebAssembly. Uno Platform is free and Open Source (Apache 2.0) and available on GitHub.     We’ve built a simple sample “File New Project” template

Uno Platform 3.2: .NET 5, C# 9 support and .NET 5 WebAssembly AOT Support

The 3.2 release is loaded with features and performance improvements. Most of the release focused on upcoming .NET 5 and all benefits Uno Platform gets from building on top of it. However, we are also releasing improvements to the controls and tooling we introduced in previous releases. Adding preview support for .NET 5 and .NET 5 WebAssembly AOT The .NET team has been working hard to add WebAssembly support for .NET 5, and we’ve been able to leverage this work to update Uno and provide a preview of this support. This update gives the ability for Uno Platform apps to use the .NET 5 APIs and features, like C# 9.0 and its source generators, records, pattern-matching-enhancements and others interesting features. But that’s not all! The .NET 5 WebAssembly support comes with the IL interpreter runtime, but also brings the AOT support that was already present in the Mono Runtime that Uno Platform currently uses, giving a performance boost of 7-15x compared to the IL interpreter. To get this support, the Uno WebAssembly Bootstrapper has been updated to include the AOT runtime for .NET 5, while keeping the support for the Mono 6.x WebAssembly support (using the netstandard2.0 target framework for

Profile Guided AOT in Uno Platform reduces package size by 50%

We’re pleased to announce the support for .NET Profile Guided AOT (PG-AOT) for the Uno Platform, which allows the creation of faster and smaller apps. When compared with the Full AOT support we’ve added support for last year, the package size is cut in half. It provides better performance with the Mixed Mode support we announced support for earlier by making a smarter use of the IL Interpreter. We’ve updated the Uno Calculator, the Uno Playground, the XAML Controls Gallery, the RayTracer benchmark and the Roslyn Quoter applications using PG-AOT. These size improvements allow for these apps to run on Safari for iOS. About Uno Platform For those new to Uno Platform – it enables for creation of single-source C# and XAML apps which run natively on iOS and Android, macOS and Web via WebAssembly. Uno Platform is Open Source (Apache 2.0) and available on GitHub. To learn more about Uno Platform, see how it works, or create a small sample app. What is .NET AOT ? The .NET runtime supports three modes of execution: Interpreter, where the .NET assemblies are executed IL opcode by opcode using a WebAssembly compiled interpreter, as WebAssembly does not yet support JIT (Just in Time) compilation.

Build .NET AOT for WebAssembly in Visual Studio with Uno Platform

It’s been a long-time request: Build Uno Platform WebAssembly apps in Visual Studio on Windows using Ahead of Time (AOT) compilation. Good news, it’s now available in preview in Uno dev branch! The Uno.Wasm.Bootstrap package 1.1-dev.416 package now provides the ability to create AOT, Mixed (AOT+Interpreter) and Interpreter (with Bitcode dependencies) builds on Windows 10, without leaving Visual Studio 2019. To our knowledge, Uno is the first one to provide this kind of functionality. If we are not – please let us know in the comments below; maybe we missed something. This new Uno feature makes transparent use of the Windows Subsystem for Linux (WSL) to create the final binaries. You’ll only need to setup your WSL environment once using a simple script, and don’t worry if you forget to set it up, the bootstrapper will explain what to do.   Quick Start – Uno, Visual Studio, WASM, AOT Make sure WSL with Ubuntu 18.04 is installed Install the latest Uno Visual Studio templates Create a new Uno Cross Platform app project Update the Uno.Wasm.Bootstrap and Uno.Wasm.Bootstrap.Cli nuget packages to 1.1-dev.416 or later, using the Nuget Package manager (There’s no need to update other packages) In the Wasm project, add