Apple Silicon is the next big thing in the Apple world, and the Cupertino-based tech giant itself keeps bragging about the performance of its own custom ARM chip on every single occasion.
And truth be told, the official numbers do sound interesting.
The company says the M1 chip can deliver up to 3.5 faster CPU performance than the previous generation Macs, which is something totally impressive, especially because the older Apple computers were already pretty fast.
“M1 is the first personal computer chip built using cutting-edge 5-nanometer process technology and is packed with an astounding 16 billion transistors, the most Apple has ever put into a chip. It features the world’s fastest CPU core in low-power silicon, the world’s best CPU performance per watt, the world’s fastest integrated graphics in a personal computer, and breakthrough machine learning performance with the Apple Neural Engine,” Apple said.
Apr 16, 2021 The steady updates to the Firefox web browser, which recently saw the addition of native Apple Silicon support, is about to remove a feature.From Firefox 90, users will no longer be able to use. The M1-powered MacBook Air and Pro models have shown they consume battery very efficiently, saving power a lot more than the Intel-based MacBook models do. The new Microsoft 365 apps and Firefox add to the list of apps that come with native support for Apple’s new M1-powered MacBook Air and MacBook Pro models.
- Hey all, I just got a new Mac with Apple's M1 chip and wanted to know if others are also experiencing this. Firefox will just not load webpages at all after a short while of use; it.
- Firefox 84 now offers native support for Apple M1 silicon. 10:16 am December 16, 2020 By Julian Horsey. Firefox launches over 2.5 times faster and web apps are now twice as responsive, per the.
“As a result, M1 delivers up to 3.5x faster CPU performance, up to 6x faster GPU performance, and up to 15x faster machine learning, all while enabling battery life up to 2x longer than previous-generation Macs. With its profound increase in performance and efficiency, M1 delivers the biggest leap ever for the Mac.”
Needless to say, to benefit from the full potential of Apple Silicon users must run apps that are already optimized for the Apple chip. And this means the devs around the world are now working around the clock to prepare their software for the M1 processor.
Firefox is one of the world’s leading browsers, and naturally, it just had to run on Apple Silicon too. Version 84 is the one adding support for the M1 chip, so make sure you update to the latest version to benefit from the native experience.
But here’s what you must do in order to correctly install Firefox on Apple Silicon.
If you’re already running an older version of the browser, you can update to build 84 using the built-in update system, but then it’s mandatory to close the app and restart it to complete the browser update and switch to the Apple Silicon-optimized experience.
“If you’re on a Mac computer with Apple Silicon, you will need to fully exit and restart Firefox after upgrading to Firefox 84+ in order for Firefox to run on the new architecture, which has faster performance and better battery life,” Mozilla explains.
How to check if you’re running the Apple Silicon build of Firefox
If you’re not sure if Firefox has already received the Apple Silicon update, it’s pretty easy to tell if this happened or not right from within the browser.
First and foremost, make sure the browser is already on version 84. After this, you can open the app, and in the address bar, type the following code:
about:support
Look for an entry called:Rosetta Translated
If its current setting is false, then you are running the Apple Silicon version of the browser. If this flag is set to true, then it means you’re still using the Rosetta emulation and you need to update to Firefox 84 and restart the browser to complete the switch.Needless to say, all future versions of Firefox would support Apple Silicon, so the steps above apply to all updates after Firefox 84.
In the meantime, Apple is working around the clock with developers to bring their apps to Apple Silicon, and new such updates are released every once in a while. For what it’s worth, the main alternatives to Firefox, including Google Chrome and Microsoft Edge, already come with Apple Silicon support, as both Google and Microsoft rolled out this important update in the testing channels
(“This Week in Glean” is a series of blog posts that the Glean Team at Mozilla is using to try to communicate better about our work. They could be release notes, documentation, hopes, dreams, or whatever: so long as it is inspired by Glean.) All “This Week in Glean” blog posts are listed in the TWiG index (and on the Mozilla Data blog).
Back in February I got an M1 MacBook. That’s Apple’s new ARM-based hardware.
I got it with the explicit task to ensure that we are able to develop and build Glean on it. We maintain a Swift language binding, targeting iOS, and that one is used in Firefox iOS. Eventually these iOS developers will also have M1-based machines and want to test their code, thus Glean needs to work.
Here’s what we need to get to work:
- Compile the Rust portions of Glean natively on an M1 machine
- Build & test the Kotlin & Swift language bindings on an M1 machine, even if non-native (e.g. Rosetta 2 emulation for x86_64)
- Build & test the Swift language bindings natively and in the iPhone simulator on an M1 machine
- Stretch goal: Get iOS projects using Glean running as well
Rust on an M1
Work on getting Rust compiled on M1 hardware started last year in June already, with the availability of the first developer kits. See Rust issue 73908 for all the work and details. First and foremost this required a new target: aarch64-apple-darwin
. This landed in August and was promoted to Tier 21 with the December release of Rust 1.49.0.
By the time I got my MacBook compiling Rust code on it was as easy as on an Intel MacBook. Developers on Intel MacBooks can cross-compile just as easily:
Glean Python & Kotlin on an M1
Glean Python just … worked. We use cffi
to load the native library into Python. It gained aarch64
2 macOS support in v14.4.1. My colleague glandium later contributed support code so we build release wheels for that target too. So it’s both possible to develop & test Glean Python, as well as use it as a dependency without having a full Rust development environment around.
Glean Android is not that straight forward. Some of our transitive dependencies are based on years-old pre-built binaries of SQLite and of course there’s not much support behind updating those Java libraries. It’s possible. A friend managed to compile and run that library on an M1. But for Glean development we simply recommend relying on Rosetta 2 (the x86_64 compatibility layer) for now. It’s as easy as:
At least if you have Java set up correctly… The default Android emulator isn’t usable on M1 hardware yet, but Google is working on a compatible one: Android M1 emulator preview. It’s usable enough for some testing, but for that part I most often switch back to my Linux Desktop (that has the additional CPU power on top).
Glean iOS on an M1
Now we’re getting to the interesting part: Native iOS development on an M1. Obviously for Apple this is a priority: Their new machines should become the main machine people do iOS development on. Thus Xcode gained aarch64
support in version 12 long before the hardware was available. That caused quite some issues with existing tooling, such as the dependency manager Carthage. Here’s the issue:
- When compiling for iOS hardware you would pick a target named
aarch64-apple-ios
, because … iPhones and iPads are ARM-based since forever. - When compiling for the iOS simulator you would pick a target named
x86_64-apple-ios
, because conveniently the simulator uses the host’s CPU (that’s what makes it fast)
Firefox M1 Download
So when the compiler saw x86_64
and iOS
it knew “Ah, simulator target” and when it saw aarch64
and ios
it knew “Ah, hardware”. And everyone went with this, Xcode happily built both targets and, if asked to, was able to bundle them into one package.
With the introduction of Apple Silicion3 the iOS simulator run on these machines would also be aarch64
4, and also contain ios
, but not be for the iOS hardware.
Now Xcode and the compiler will get confused what to put where when building on M1 hardware for both iOS hardware and the host architecture.
So the compiler toolchain gained knowledge of a new thing: arm64-apple-ios14.0-simulator
, explicitly marking the simulator target. The compiler knows from where to pick the libraries and other SDK files when using that target. You still can’t put code compiled for arm64-apple-ios
and arm64-apple-ios14.0-simulator
into the same universal binary5, because you can have each architecture only once (the arm64
part in there). That’s what Carthage and others stumbled over.
Again Apple prepared for that and for a long time they have wanted you to use XCFramework bundles6. Carthage just didn’t used to support that. The 0.37.0 release fixed that.
That still leaves Rust behind, as it doesn’t know the new -simulator
target. But as always the Rust community is ahead of the game and deg4uss3r started adding a new target in Rust PR #81966. He got half way there when I jumped in to push it over the finish line. How these targets work and how LLVM picks the right things to put into the compiled artifacts is severly underdocumented, so I had to go the trial-and-error route in combination with looking at LLVM source code to find the missing pieces. Turns out: the 14.0
in arm64-apple-ios14.0-simulator
is actually important.
With the last missing piece in place, the new Rust target landed in February and is available in Nightly. Contrary to the main aarch64-apple-darwin
or aarch64-apple-ios
target, the simulator target is not Tier 2 yet and thus no prebuilt support is available. rustup target add aarch64-apple-darwin
does not Vue phpstorm. work right now. I am now in discussions to promote it to Tier 2, but it’s currently blocked by the RFC: Target Tier Policy.
Firefox M1 Apple Download
It works on nightly however and in combination with another cargo capability I’m able to build libraries for the M1 iOS simulator:
For now Glean iOS development on an M1 is possible, but requires Nightly. Goal achieved, I can actually work with this!
In a future blog post I want to explain in more detail how to teach Xcode about all the different targets it should build native code for.
Firefox For Mac Download
All The Other Projects
This was marked a stretch goal for a reason. This involves all the other teams with Rust code and the iOS teams too. We’re not there yet and there’s currently no explicit priority to make development of Firefox iOS on M1 hardware possible. But when it comes to it, Glean will be ready for it and the team can assist others to get it over the finish line.
Chrome Apple M1
Want to hear more about Glean and our cross-platform Rust development? Come to next week’s Rust Linz meetup, where I will be talking about this.
Footnotes:
- See Platform Support for what the Tiers means.↩︎
- The other name for that target.↩︎
- “Apple Silicon” is yet another name for what is essentially the same as “M1” or “macOS aarch64”↩︎
- Or
arm64
for that matter. Yes, yet another name for the same thing.↩︎ - “Universal Binaries” have existed for a long time now and allow for one binary to include the compiled artifacts for multiple targets. It’s how there’s only one Firefox for Mac download which runs natively on either Mac platform.↩︎
- Yup, the main documentation they link to is a WWDC 2019 talk recording video.↩︎