macOS - x86 to ARM - Developer point of view

Apple announced new macOS 11 Big Sur at WWDC 2020 on 22nd June 2020. With all new graphics, design and icon changes announcement there was a big announcement of new architecture support for macOS that is ARM which Apple named as Apple Silicon. Apple showed many demos of macOS running on Apple's ARM processor with software's which uses full potential of CPUs but as developer who always developed on x86 platform till date there are many questions on my mind related to this big decision (Note: macOS Big Sur will be available for x86 platform with new x86 based Macs on way).

Some History

First of all, they are not doing this for first time. They have already done it previously where they moved from PowerPC architecture to Intel x86 architecture, also they provided Rosetta which allowed most of the application written for PowerPC to run on Intel x86 based systems. Rosetta came installed with MacOS X Tiger and similarly they are giving Rosetta 2 which comes pre-installed in macOS 11 Big Sur with added feature apart from JIT which is translation during install time.

If you think Apple is doing it first, that is, doing JIT from x86 to ARM, then you are wrong. Microsoft did same thing for Windows when it came to ARM processors. In Microsoft it is not forced so people choose to stay with x86 but here it will be forced within few years that everyone will be using ARM based Macs. IBM has been doing this emulation thing to support their enterprise products and it doesn't hamper any performance. There are many other examples that it has been done in past and has been done very efficiently.

Some technicalities

In today's computer most of the task are GPU heavy and not so CPU intensive until you are running some machine learning or high traffic servers or databases than you should be fine as at end of the day CPU hands out tasks to GPU and takes result to display them and as I said previously it's not first time they are doing this or someone in industry doing this JIT for different architecture.

Also, they don't have think about OS change or anything, there underlying system is same that is macOS. I like to think is like 2 parallel worlds using same function call and underlying system decides where it is running and what to call.

It will work out pretty great

Now why do I believe it will not affect most of us?

They are making the chip, OS and translation layer so they can optimize it very well. They know everything from in-and-out of whole system. They are working with brew and other software vendors to support ARM. They also showed Autodesk Maya running on Rosetta 2 which on demo looks pretty great that same power without re-compiling apps.

If you are thinking how my server and development environment will work out like IDE, docker system, compilers and interpreters. Let's start with IDEs, my guess we will not need ARM specific IDEs because if Rosetta can handle Maya than IDEs should be child's play for it. I use VSCode, IntelliJ, PyCharm, Android Studio, Sublime Text, most of them will work out pretty well according to my understanding also I think once they release ARM based systems respective developers will release ARM based solutions for their product.

Second comes interpreter and compilers, so after hearing new from WWDC I started ARM based machine on AWS to test out my most used softwares which are Python, Node.js, Rust, Golang, C, C++, and used few already working somewhat medium size projects with some dependencies to like ksctl in Golang to compile to ARM and all of them worked out pretty well. I only faced issue with upx binary compressor which is available in Ubuntu repo was old and was not compressing ARM binary very well so downloaded new version and it worked out. I also work in frontend using React Native, Nativescript, Ionic and Flutter, don't know how they will work out but I think those will be available specially flutter binary for macOS ARM.

Last comes environments, I use docker for most of my development to deployment, even during development for things like databases, messaging queues, Elasticsearch etc. I use docker, because I don't want to pollute my system. When I looked from ARM support for them in docker hub most of them support ARM while some of them don't but being docker you can create your own using same Dockerfile from docker hub.

Future

ARM is not popular desktop and server market, but this move from large companies who knows benefits of ARM and can optimize this architecture to squeeze power from. This move from Apple will help ARM coming to other markets and platforms. Even AWS has ARM based EC2 instances available. I never used ARM on my EC2 account but when I heard about Apple is serious about moving to ARM I had an urge to try it out. This shows big companies influence when and what will be used by majority of people. This move by Apple can also motivate other companies to make their own product using ARM which will bring ARM to mainstream.

Hope for the best.

Happy Coding! Happy Learning!

No Comments Yet