Apple’s laptops have been making quite the splash since the end of 2020 and have made a massive comeback as a professional tool one year later with the M1 Pro and Max designs. Most of the reviews I have seen focus on the editing and rendering capabilities of these new MacBooks. A few reviewers throw a compile test in the mix, but compiling Chromium or any other huge project is only a part of the equation. Developers don’t just compile code; they also use tools and IDEs to develop their software.
Being new to the M1 world, I wanted to recap my experiences so far briefly. I use Java professionally, and I also have a C++ application based on the Qt framework that I wrote an eon ago and still use productively. Being a former C++ professional, I am about native performance, and I like native software. Therefore, I intended to utilize as many Apple Silicon-native tools as possible. Luckily, one year after its release to the desktop world, the most popular applications have caught up. Let me go through my tool suite one by one.
General Purpose Code Editor
This application should not be a surprise to anyone, and I think I can move on quickly. Microsoft’s Visual Studio Code has quickly established itself as everybody’s darling since its inception. Although it is based on Electron, it is fast and a joy to work with. As far as Electron goes, it runs natively on M1 Macs.
Java is definitely the last thing you might think about when discussing “native” applications. Be that as it may, it is actually a decent language in which you can be very productive. Now, I do not want to discuss the pros and cons of Java. I just thought a little stab at “native” was warranted. Moving on…
It is essential to choose the correct JDK to get an M1-native Java SDK. I went with Adoptium first because it is the successor to AdoptOpenJDK, which I use on Windows. To my surprise, when I started the installation procedure, macOS asked me to install Rosetta first. I politely declined, quickly searched the interwebs, and found that Oracle provides Apple Silicon ARM versions.
The next step is an IDE, and I do not use VS Code for that. Although it is very capable, I am also very used to how Jetbrains’ IntelliJ IDEA works. Since I want to be productive, I am not interested in learning Visual Studio Code for Java. Unfortunately, the download page does not correctly detect the M1 platform and defaults to the Intel version. You must select the correct download yourself.
When you have downloaded the correct file, you will get a native IDE experience.
I also installed Apache Maven, and since it is a Java application, it runs on the native Java that I have installed. So far, so good.
Writing M1-native C++ should not be a problem with Apple’s Xcode – at least, I would assume so. The Qt framework is more important to me because I have used it in the past for work, and I have also developed a little utility to track the time spent on tasks at work. Starting with version 6.2, Qt fully supports Apple Silicon (scroll to section “new Platforms”), which made me hopeful. Is was surprised, though, when the installer prompted macOS to throw Rosetta in my face. I first tried to see if I downloaded the wrong version, but I could not find any other. Begrudgingly I went ahead and finally installed Rosetta because I now was even more curious how this “M1 support” looked. The installation works just like I outlined in this blog post for Linux Mint. When selecting the Qt libraries to install, I naturally went with the “macOS” versions.
As you can see, the options are limited. Activity Monitor also shows how Rosetta is used to running the installer utility. The same is true for Qt Creator, which made me a bit nervous.
My application compiled out of the box, and it was quick, too. It is but a small utility, so I did not expect a long compilation anyway. Interestingly enough, my application also runs out of the box, and, alas, it is Apple Silicon native.
Unfortunately, not everything is working, but I have never developed this application on any Apple operating system. I have tailored it to work with Windows, and it should also work on Linux for the most part. Be that as it may, the bundled Qt libraries seem to be native for M1 Macs even though the IDE itself isn’t yet.
I have only had my MacBook Air for about a week now, and other than installing applications and performing a short functional test, I am yet to do any “serious” hobby work. So far, I am happy with the results. Of course, I’d like the whole Qt suite to be Apple native. More important to me is that I can say that my application is native for M1 Macs – whenever I get around to optimizing it 😅.
I am also interested in trying out Microsoft’s Visual Studio for Mac, .NET 6, and the MAUI SDK for cross-platform development. It goes against my need for native compilation, but using C# also increases productivity compared to C++. It has been a while for me since I last did any noteworthy C++ development, and I am quite a bit rusty. For now, I am content, and I have everything running that I need.