BT

Facilitating the Spread of Knowledge and Innovation in Professional Software Development

Write for InfoQ

Topics

Choose your language

InfoQ Homepage News New Electron Release Supports New Apple Silicon Chips

New Electron Release Supports New Apple Silicon Chips

This item in japanese

The Electron team recently released the 11th iteration of the popular cross-platform native desktop application framework. Electron 11 introduces support for the new Apple silicon hardware (Darwin arm64). Electron 11 also updates the versions of Chromium, Node, and its JavaScript engine.

The Electron team announced support for running Electron apps on the new Apple Silicon hardware:

With the release of Electron 11.0.0-beta.1, the Electron team is now shipping builds of Electron that run on the new Apple Silicon hardware that Apple plans on shipping later this year. You can grab the latest beta with npm install electron@beta or download it directly from our releases website.

Electron 11 will have two new builds — darwin-arm64 and mas-arm64, which are the Apple Silicon equivalents of the previous Electron build for Intel Macs hardware. Developers will have to publish two versions of their Electron application — one targeting x64 architectures (Intel Mac), the other one for arm64 architectures (Apple Silicon). For that purpose, developers may use the electron-packager, electron-rebuild, and electron-forge packages, which already support targeting the arm64 architecture. Electron packager helps developers to customize and package an Electron app with OS-specific bundles (e.g., .app, .exe). Electron Forge assists developers in creating, publishing, and installing modern Electron applications.

The Electron team encourages developers to ship a native arm64 build of their Electron application rather than using Rosetta 2 to run x64 Intel applications on arm64 Apple silicon hardware. The release note explained the performance impact of using Rosetta:

  • Your app’s performance will be significantly degraded. Electron / V8 uses JIT compilation for JavaScript, and due to how Rosetta works, you will effectively be running JIT twice (once in V8 and once in Rosetta).
  • You lose the benefit of new technology in Apple Silicon, such as the increased memory page size.
  • Did we mention that the performance will be significantly degraded?

Electron 11 additionally uses Chromium 87.0.4280.47, the JavaScript runtime Node v12.18.3, and the JavaScript engine V8 v8.7. The release includes numerous bug fixes and performance improvements. The release also removes a few experimental APIs.

In June 2020, Apple announced its transition from Intel’s x86-64 to in-house chips that use the arm64 architecture. The transition may require two years to complete. The hardware architecture transition is the third in the history of Apple (from Motorola 68000 to PowerPC to Intel x86 to arm64). In November 2020, Apple announced its first Macs based on Apple silicon processors. Developers may prefer to compile native arm64 apps rather than relying on Rosetta 2 emulation for performance and support purposes. Apple discontinued the original Rosetta (PowerPC emulation on Intel) after only three OS generations.

Electron is an open-source framework for creating native applications with web technologies like JavaScript, HTML, and CSS. Electron was first developed by GitHub in 2013 to enable JavaScript developers to build desktop apps that would run on Windows, Mac, and Linux computers. Last year, Electron joined the OpenJS foundation.

Rate this Article

Adoption
Style

BT