What do we need to do for NativeAOT? Current status for .NET 11 NativeAOT. To investigate next: - [ ] Re-test `dotnet publish`; this was reported to fail while `dotnet build` worked during the original preview implementation - [ ] Re-test the current `dotnet new maui` template with NativeAOT List of TODOs: - [x] `dotnet new android && dotnet publish -p:PublishAot=true` - https://github.com/dotnet/android/pull/9760 - [x] `dotnet new maui` runs - https://github.com/dotnet/android/pull/9747 - [x] Parse Android system properties such as `debug.mono.log`, including disabling `lref/gref` logging - https://github.com/dotnet/android/pull/9824 - [x] Provide a printf-style alternative to `monodroid_log()` for NativeAOT - https://github.com/dotnet/android/pull/12140 - Follow-up migrations: https://github.com/dotnet/android/pull/12148, https://github.com/dotnet/android/pull/12150, https://github.com/dotnet/android/pull/12210, https://github.com/dotnet/android/pull/12211, https://github.com/dotnet/android/pull/12218 - [x] MSBuild warning for non-Mono runtimes that says they are experimental - https://github.com/dotnet/android/pull/9834 - [x] Default `$(PublishAotUsingRuntimePack)=true` - https://github.com/dotnet/android/pull/9815 - [x] Get Mono.Android-Tests running on NativeAOT - https://github.com/dotnet/android/pull/9846 - Remaining exclusions are tracked by https://github.com/dotnet/android/issues/10079 - [ ] Finish runtime/startup behavior that differs from Mono - [x] System.Threading.Tasks synchronization context: https://github.com/dotnet/android/pull/9883 - [x] NativeAOT coverage for timezone and Android uncaught-exception handling: https://github.com/dotnet/android/pull/10644 - [ ] `AppDomain.CurrentDomain.UnhandledException` is still explicitly skipped under NativeAOT - [x] Address all NativeAOT trimming and AOT warnings - https://github.com/dotnet/android/issues/10794 - [ ] Remove the `TrimmerRootAssembly` NativeAOT size deoptimization - https://github.com/dotnet/android/issues/10672 - [x] Avoid dynamically linking `libc++_shared.so`; NativeAOT currently links `libc++_static.a` - [ ] Remove the NativeAOT `libc++` dependency entirely - https://github.com/dotnet/android/issues/12139 - [x] Warn when code calls `JNINativeWrapper.CreateDelegate(...)` - The API is annotated with `[RequiresDynamicCode]`, producing an AOT warning for callers - Framework usages were removed by https://github.com/dotnet/android/pull/9741 - [ ] Decide whether NativeAOT should support FastDeploy/incremental deployment; it is currently explicitly unsupported by the test suite - [ ] Enable `$(VerifyReferenceAotCompatibility)` - https://github.com/dotnet/runtime/pull/118180
What do we need to do for NativeAOT?
Current status for .NET 11 NativeAOT.
To investigate next:
dotnet publish; this was reported to fail whiledotnet buildworked during the original preview implementationdotnet new mauitemplate with NativeAOTList of TODOs:
dotnet new android && dotnet publish -p:PublishAot=trueMicrosoft.Android.Runtime.NativeAOT.dll#9760dotnet new mauirunsdebug.mono.log, including disablinglref/grefloggingmonodroid_log()for NativeAOT$(PublishAotUsingRuntimePack)=true$(PublishAotUsingRuntimePack)=true#9815SynchronizationContext#9883AppDomain.CurrentDomain.UnhandledExceptionis still explicitly skipped under NativeAOTTrimmerRootAssemblyNativeAOT size deoptimizationlibc++_shared.so; NativeAOT currently linkslibc++_static.alibc++dependency entirelyJNINativeWrapper.CreateDelegate(...)[RequiresDynamicCode], producing an AOT warning for callersJNINativeWrapper.CreateDelegate. #9741$(VerifyReferenceAotCompatibility)