VSCode on Arch with arm64 CPU

December 22, 2019
vscode code arm64 arch manjaro

I was recently setting up my Pinebook Pro as my new travel laptop. This laptop uses a combination of 64-bit CPUs implementing the v8-A instruction set. The Laptop now runs Manjaro, an Arch distro to make things a bit more complicated. With VSCode being my current IDE of choice and GoLand not available for arm64, I had to find an easy solution to get Code working.

There is an existing build of VSCode for arm64 with rmp and dep packages build on the latest version of VSCode. There is even an AUR (Arch User Repository) package for it: code-headmelted-bin unfortunately it’s rather dated. But a look at the PKGBUILD (be aware it countains a couple of issues and links to an outdated version) reveales the rather easy process (abbreviated) to get the dep package installed on Arch:

depends=(libnotify gnupg libxkbfile libsecret gtk3 libxss nss)
optdepends=("trash-cli: For moving items to trash")
_url=https://github.com/headmelted/codebuilds/releases/download/20-Feb-19
source_aarch64=("$_url/code-oss_1.32.0-1550644676_arm64.deb")
md5sums_aarch64=('82d1333c290d92597e649f6b71b3ba2a')

package() {
  msg2 "Extracting the data.tar.xz..."
  bsdtar -xf data.tar.xz -C "$pkgdir/"

  cd "$pkgdir"
  mkdir -p usr/bin
  ln -s /usr/share/code-oss/bin/code-oss usr/bin
}

Which basically boils down to:

With those steps you are ready to go and use VSCode on your arm64 CPU. This article was in fact written on my Pinebook Pro running Manjaro Linux inside VSCode version 1.42.0. Happy coding!