-
Notifications
You must be signed in to change notification settings - Fork 515
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support NativeAOT as a runtime variant for iOS platforms #17339
Comments
The bridge will be responsible for properly initialising the NativeAOT runtime, invoking any managed code initialisation e.g.: xamarin-macios/src/ObjCRuntime/Runtime.cs Line 232 in 608765e
See this comment for more information: dotnet/runtime#77957 (comment) |
Why is this bridge better than just injecting static constructor into the app with default bootstrapper? Injecting static constructor into the app looks more composable. |
…eAOT. This contributes towards xamarin#17339.
Thanks for the suggestion, but at the moment there seem to be some limitations around it. If you are referring to the @rolfbjarne also gave an explanation on why it is required Xamarin to act as a native hosting application here: dotnet/runtime#77957 (comment) Finally, the requirement for:
is written in more general terms, as mono and coreCLR runtimes have their dedicated bridges, so supporting NativeAOT would use the same logic without changing current implementation much. Afaik, injecting static constructor does not allow the method to have parameters, so if we would want to use it for initializing Xamarin's ObjCRuntime, we would have to change the code to PInvoke into the native to get the required parameters. It is not my call and I could be wrong, but this sounds like more work (especially making sure that the change does not break what is already supported). |
…eAOT. This contributes towards xamarin#17339.
…eAOT. This contributes towards xamarin#17339.
…eAOT. This contributes towards xamarin#17339.
…eAOT. This contributes towards xamarin#17339.
…eAOT. This contributes towards xamarin#17339.
…eAOT. This contributes towards xamarin#17339.
…eAOT. This contributes towards xamarin#17339.
…eAOT. This contributes towards xamarin#17339.
…eAOT. This contributes towards xamarin#17339.
…eAOT. This contributes towards xamarin#17339.
…eAOT. This contributes towards xamarin#17339.
…eAOT. This contributes towards xamarin#17339.
…eAOT. This contributes towards xamarin#17339.
…eAOT. This contributes towards xamarin#17339.
…eAOT. This contributes towards xamarin#17339.
…eAOT. This contributes towards xamarin#17339.
…eAOT. This contributes towards xamarin#17339.
…eAOT. This contributes towards xamarin#17339.
…eAOT. This contributes towards xamarin#17339.
…eAOT. This contributes towards xamarin#17339.
…eAOT. This contributes towards xamarin#17339.
…eAOT. This contributes towards xamarin#17339.
…eAOT. This contributes towards xamarin#17339.
Add support for using NativeAOT on all our platforms. This contains numerous changes in a lot of places to add support for NativeAOT: * build logic * runtime * managed code * tests And it all pretty much consists of special-casing NativeAOT everywhere we need to. Note: NativeAOT doesn't work on macOS yet, because a dotnet/runtime fix is required, and thus the corresponding test variations for monotouch-test have been commented out. This PR is best reviewed commit-by-commit. This contributes towards #17339.
Closing this issue as all subtasks have been completed for the .NET8 timeframe. |
Description
To enable Supporting NativeAOT on iOS platforms as an experimental feature in .NET8 it is required to adjust Xamarin runtime, build system and SDK accordingly.
Tasks
The following list of tasks give a top-level overview of work that is required to enable this feature:
.NET 8
-dead_strip
to the native linker #18552.NET 9
UPDATE: .NET9 tasks are moved to the top-level tracking issue:
PS The list of tasks is not complete. Feel free to extend it, change it and add more context.
The text was updated successfully, but these errors were encountered: