Javascript Meteor

Meteor 2.5.1 with Native Mac M1 support3 min read

Mac M1 support, how to upgrade your app, and a breaking change in accounts-passwordless package

Mac M1 support

Our new release of Meteor provides native support to Mac M1 chips (new Macs running Apple’s ARM chip).

Before Meteor 2.5.1, you had to use Rosetta to run Meteor in Mac M1 machines, which is no longer the case.

You can jump to accounts-passwordless part if you don’t use M1 chips.

How to upgrade your app

First, we recommend upgrading your app to Meteor 2.5.1 using your current setup (Rosetta or your Mac with Intel).

meteor update

After that, you can start using this new version.

If you uninstall your Meteor first and then install 2.5.1 using the ARM architecture (M1) before upgrading your app, you may get some problems as the version of your app will be 2.5 and 2.5 doesn’t support M1.So when you run meteor update, Meteor is going to complain that ARM is not supported yet as Meteor always uses the version of your app to run commands against your app.

How to upgrade your global installation

Let’s first remove the previous installation. If you installed Meteor using curl, you could remove it by running:

rm -rf ~/.meteor
sudo rm /usr/local/bin/meteor

If you installed Meteor using npm, you could remove it by running:

meteor-installer uninstall

And now you can install Meteor as usual:

npm install -g meteor

Remember to use a regular terminal without Rosetta.

Performance improvements with M1

We have seen feedback from different communities about performance improvements by running on M1 chips, and we also checked if we had gains in Meteor. The answer is a big yes, and we have impressive improvements in Meteor performance when running on M1.

It is important to notice that we also changed the Fibers implementation to run on ARM architecture.

In the original repository (node-fibers), every arm architecture was built using the CORO_PTHREAD co-routine implementation, which creates threads for co-routines using the pthread POSIX library. This implementation is slow and also not ready for usage.

We then forked the library and changed the build process to use the CORO_UCONTEXT implementation, which implements actual co-routines instead of heavy threads. You can read more about it here and also in our fork commit here.

Now let’s see a few time comparisons in a new project created with meteor create, we ran it with METEOR_PROFILE=1 to get the times.

As you can see, M1 saves at least 47% of the time in all the actions. We expect to see more impact in larger apps.

Upgrade your app to Meteor 2.5.1, compare the times running on M1, and mention @meteorjs on Twitter to share your numbers.

Accounts Passwordless Package

The community saw a problem caused by our new package accounts-passwordless where the method Meteor.loginWithToken from accounts-base was overwritten by a new method with the same name on accounts-passwordless.

To fix this problem, we had to introduce a breaking change on accounts-passwordless renaming the login method to Meteor.passwordlessLoginWithToken.

Start using Meteor 2.5.1

This release doesn’t add many things, but we did this on purpose to keep our focus for this version on M1 chips.

Even if you are not using M1 chips and the accounts-passwordless package, you can upgrade to 2.5.1 to be up-to-date with the latest Meteor.

To update your app, run meteor update as usual.

Thank you to all the contributors involved in this release. Your feedback and help are always important.

Meteor 2.5.1 with Native Mac M1 support was originally published in Meteor Blog on Medium, where people are continuing the conversation by highlighting and responding to this story.

Pin It on Pinterest

Generated by Feedzy