Solar2D support for new Apple M1 Macs

Since Apple has recently begun to sell the new MacBook Pros with the M1 chip, I’m wondering if there’s any plans for Solar2D supporting this new architecture in the future? For the most part, the apps still plays well thanks to Rosetta 2, however it seems that the API crashes. I don’t personally own an M1 Mac, so I can’t test this directly on my end, but maybe someone who does could test the API on their end? I’ll provide more details after getting some more info from some of my users who are experiencing this issue.

I’m also wondering if system.getInfo(" architectureInfo ") will return the correct value for this new architecture. If Solar2D could detect if the user is indeed running on an M1, I could find an alternate workaround for these unstable APIs until a more supporting build is released. Thanks!

1 Like

In the logs for Solar2d’s recent builds, I think vlad did mention that support had been added for Apple silicon. He definitely seems to be working on it but I think it’s something that will be refined and optimised over some time.

The specific api crash will probably be a minor fix for him if you can report it to vlad directly on GitHub

I have been using my new MacBook Pro m1 with simulator for months now and everything thing works well

1 Like

Thanks for the reply! I’ll file a bug report after getting some more details about it.

In the meantime, do you know what system.getInfo(" architectureInfo ") would return on this architecture? The docs mention only 4 possible return values for macOS. However I’m wondering if m1 Macs would nonetheless return something else, and something like the following would detect if a user is running on these new computers:

if system.getInfo("platform") == "macos" and (system.getInfo( "architectureInfo" ) ~= "i386" and system.getInfo( "architectureInfo" ) ~= "x86_64" and system.getInfo( "architectureInfo" ) ~= "ppc" and system.getInfo( "architectureInfo" ) ~= "ppc64") then
    -- User is running an m1 Mac

Hey Scott, from what I can tell, the simulators work fine with m1, it’s only after building the app for macOS and running it that you run into some issues with certain APIs.

If possible, could you test out the API and check if everything works smoothly on your end, as well as checking what system.getInfo(" architectureInfo ") returns? I’ll be testing these on my end, but it may be some time before I can get my hands on one

1 Like