Reputation: 319
There isn't any information about the macOS platform. Has AOT supported it, or is there a plan?
Upvotes: 3
Views: 1879
Reputation: 3214
As of .NET 8, AOT compiled binaries for macOS are supported for both arm64 and x64 architectures. Source: https://learn.microsoft.com/en-us/dotnet/core/deploying/native-aot/?tabs=net8plus%2CmacOS#platformarchitecture-restrictions
Do some project setup first.
Example invocation:
dotnet publish -r osx-arm64 -c Release
Upvotes: 0
Reputation: 142413
At the moment the official docs state Native AOT support only on Windows and Linux for .NET 7:
The following table shows supported compilation targets when targeting .NET 7.
Platform | Supported architecture |
---|---|
Windows | x64, Arm64 |
Linux | x64, Arm64 |
But based on the issues/discussions in the github repo (for example this, this and especially this one) the working is going on for future releases to support Native AOT on macOS.
Upvotes: 0
Reputation: 10128
At time of writing, the only supported targets according to MS docs are Windows and Linux - see https://learn.microsoft.com/en-us/dotnet/core/deploying/native-aot/#platformarchitecture-restrictions
This doesn't answer your question about whether there are plans to support it on MacOS - maybe someone else has that info.
Upvotes: 5