News

Native AOT Advances in .NET 8 Preview 6

.NET 8, now four months away from GA, continues to advance native ahead-of-time compilation (native AOT) functionality in the new Preview 6.

Native AOT (or NativeAOT) is a focus point of the .NET 8 dev team. It was introduced in .NET 7 a couple years after its absence from predecessor .NET Core was identified in a survey as holding back adoption of the development platform.

Does the lack of officially supported native AOT option prevent you from using .NET more?
[Click on image for larger view.] "Does the lack of officially supported native AOT option prevent you from using .NET more?" (source: Microsoft).

Though it comes with some trade-offs, it provides several benefits including faster startup time and smaller memory footprints, along with enabling apps to run on machines that don't have the .NET runtime installed.

[Click on image for larger view.] Native AOT in .NET 8 (source: Microsoft).

Those machines might run iOS, and Preview 6 introduces an opt-in feature to enable support for targeting iOS-like platforms.

"This includes building and running .NET iOS and .NET MAUI applications with NativeAOT on: ios, iossimulator, maccatalyst, tvos or tvossimulator systems," Microsoft said in a July 11 post announcing Preview 6. "The motivation of this work is to enable users to explore the possibility of achieving better performance and size savings when targeting such platforms with NativeAOT."

This opt-in feature targets app deployment, and Mono is still the default runtime choice for app development and deployment. Microsoft cited some found improvements (30-40 percent reduction in app sizes compared to Mono) in the post and provided guidance on how to build and run a .NET MAUI application with Native AOT on an iOS device with .NET CLI (command-line interface).

While perhaps not a major feature, the above stands out in a preview that Microsoft described as "a continuation" of the previous preview. The company specifically highlighted library updates, a new WASM mode, more source generators and constant performance improvements along with Native AOT support on iOS.

Microsoft also noted the preview of a .NET MAUI extension for Visual Studio Code, allowing for cross-platform development with Microsoft's evolution of Xamarin.Forms, such evolution including the addition of the desktop as an app target in addition to traditional iOS and Android mobile targets.

.NET MAUI (or NET Multi-platform App UI ) warranted its own announcement, which noted the dev team resolved 23 high-impact issues. That announcement also noted that developers can try out .NET 8 with the 17.6.1 release of Visual Studio for Mac.

On the web-dev side of things in the ASP.NET Core component, Microsoft bolstered new Blazor rendering schemes.

About the Author

David Ramel is an editor and writer at Converge 360.

comments powered by Disqus

Featured

  • Compare New GitHub Copilot Free Plan for Visual Studio/VS Code to Paid Plans

    The free plan restricts the number of completions, chat requests and access to AI models, being suitable for occasional users and small projects.

  • Diving Deep into .NET MAUI

    Ever since someone figured out that fiddling bits results in source code, developers have sought one codebase for all types of apps on all platforms, with Microsoft's latest attempt to further that effort being .NET MAUI.

  • Copilot AI Boosts Abound in New VS Code v1.96

    Microsoft improved on its new "Copilot Edit" functionality in the latest release of Visual Studio Code, v1.96, its open-source based code editor that has become the most popular in the world according to many surveys.

  • AdaBoost Regression Using C#

    Dr. James McCaffrey from Microsoft Research presents a complete end-to-end demonstration of the AdaBoost.R2 algorithm for regression problems (where the goal is to predict a single numeric value). The implementation follows the original source research paper closely, so you can use it as a guide for customization for specific scenarios.

  • Versioning and Documenting ASP.NET Core Services

    Building an API with ASP.NET Core is only half the job. If your API is going to live more than one release cycle, you're going to need to version it. If you have other people building clients for it, you're going to need to document it.

Subscribe on YouTube