• #Apple
  • #know-how

Set Up Development on Apple Silicon MacBook Pro

The information in this post may be obsolete when you are reading it.

After days of waiting, I finally got my customized MacBook Pro with Apple M1 chip.

Package Manager

You need Homebrew or MacPorts to install system level packages. I think Sam's post summarized a good way to maintain both ARM-based Homebrew (experimental) and Intel-based Homebrew (running with Rosetta 2). Most importantly, don't forget to add them to your PATH and restart your shell sessions. Using a wrong version of Homebrew may cause errors.

Editor (or IDE)

I prefer Visual Studio Code. For now, only the insider preview of Visual Studio Code has a ARM version and its name is exploratory version.

Node.js Projects

The first project I want to develop on this laptop is my blog. My blog uses Gatsby and relies on sharp — a image conversion and compression package. Because there is no Apple Silicon on their CI platform, they don't provide any prebuilt binaries. I just build myself according to comments this issue.

brew install pkg-config glib zlib
brew install jpeg libtiff libheif libspng giflib libexif libjpeg-turbo libpng webp
PKG_CONFIG_PATH=/opt/homebrew/Cellar/zlib/1.2.11/lib/pkgconfig ./configure
make
sudo make install

After completed this, I can finally develop my blog.

Sign off commits with GPG keys

I just follow every steps in this tutorial. Important: you should install pinentry-mac with Intel-based Homebrew.

© 2000-2021 Copyright Luyu Cheng. All Rights Reserved.

Built with Gatsby, React, Node.js, and many other open source tools.