-
-
Notifications
You must be signed in to change notification settings - Fork 736
Support Apple Silicon Natively #624
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
Conversation
The 'osx-arm64' RID is only supported on .net versions greater than 6.0. https://docs.microsoft.com/en-us/dotnet/core/rid-catalog
Updates the GetTargetPlatformInformationResult() function to add 'osx-arm64' target. Updates the 'default' case to automatically detect M1 mac.
Add notes about osx-arm64.
Ensure that dotnet 6 is installed when compiling for MacOS ARM.
Checks to see if the dotnet 6 or greater is running.
|
This looks good. I think it helps us later down the road as well. I'd like to eventually have electronize support both 5 and 6 that we we aren't always forcing the users forward before they are ready. |
|
This will be an amazing addition! Does this not lay the groundwork for supporting RIDs win-arm64 and linux-x64? |
Linux arm and x64 is already supported. However, make sure you set the electron arch to arm64 as it will default to x64. Windows arm is not supported but can be targeted manually. The changes in this PR could certainly be used to support ARM for all Operating Systems, but i'm just targeting MacOS for now as I can test it. |
|
.NET6 support #636 |
|
As a side note.. even intel based macos target will run on silicone with rosetta installed, tested on my m1 air
|
It's a bit faster when run native, even when run with the basic hello world app it seems to be noticeable. I haven't timed it though. I also noted this on the PR comment.
|
|
I think we should switch to .NET 6 before, because otherwise it would feel "weird". I will look into this PR here and then we come back to this, ok? #636 |
|
Thats fine with me @robertmuehsig. |
While the current version works well with Rosetta 2, it is beneficial to be able to compile natively for ARM/Apple Silicon.
One issue that I would like input on is the switch from dotnet 5 to 6 for the CLI tools. Dotnet 6 is the minimum version to be able to target
osx-arm64and switching the CLI tools to 6 allows for the tools to be compiled and run natively on arm. The changes that I made should still work fine with dotnet 5 and be able to compile forosx-arm64as long as dotnet 6 is also installed. It may also make more sense for this upgrade to be a separate pull request and upgrade all of the projects together to dotnet 6.