The Electron staff just lately released the 11th iteration of the favored cross-platform native desktop software framework. Electron 11 introduces help for the brand new Apple silicon {hardware} (Darwin arm64). Electron 11 additionally updates the variations of Chromium, Node, and its JavaScript engine.
The Electron staff introduced help for running Electron apps on the new Apple Silicon hardware:
With the discharge of Electron 11.0.0-beta.1, the Electron staff is now transport builds of Electron that run on the brand new Apple Silicon {hardware} that Apple plans on transport later this 12 months. You possibly can seize the newest beta with
npm set up electron@beta
or obtain it straight from our releases website.
Electron 11 can have two new builds — darwin-arm64
and mas-arm64
, that are the Apple Silicon equivalents of the earlier Electron construct for Intel Macs {hardware}. Builders must publish two variations of their Electron software — one concentrating on x64 architectures (Intel Mac), the opposite one for arm64 architectures (Apple Silicon). For that function, builders could use the electron-packager
, electron-rebuild
, and electron-forge
packages, which already help concentrating on the arm64 structure. Electron packager helps builders to customise and bundle an Electron app with OS-specific bundles (e.g., .app
, .exe
). Electron Forge assists builders in creating, publishing, and putting in trendy Electron functions.
The Electron staff encourages builders to ship a local arm64 construct of their Electron software quite than utilizing Rosetta 2 to run x64 Intel functions on arm64 Apple silicon {hardware}. The discharge notice defined the efficiency influence of utilizing Rosetta:
- Your app’s efficiency shall be considerably degraded. Electron / V8 makes use of JIT compilation for JavaScript, and resulting from how Rosetta works, you’ll successfully be operating JIT twice (as soon as in V8 and as soon as in Rosetta).
- You lose the good thing about new know-how in Apple Silicon, such because the elevated reminiscence web page dimension.
- Did we point out that the efficiency shall be considerably degraded?
Electron 11 moreover makes use of Chromium 87.0.4280.47, the JavaScript runtime Node v12.18.3, and the JavaScript engine V8 v8.7. The discharge contains quite a few bug fixes and efficiency enhancements. The discharge additionally 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 structure. The transition could require two years to finish. The {hardware} structure transition is the third within the historical past of Apple (from Motorola 68000 to PowerPC to Intel x86 to arm64). In November 2020, Apple introduced its first Macs based on Apple silicon processors. Builders could favor to compile native arm64 apps quite than counting on Rosetta 2 emulation for efficiency and help functions. Apple discontinued the unique Rosetta (PowerPC emulation on Intel) after solely three OS generations.
Electron is an open-source framework for creating native functions with net applied sciences like JavaScript, HTML, and CSS. Electron was first developed by GitHub in 2013 to allow JavaScript builders to construct desktop apps that will run on Home windows, Mac, and Linux computer systems. Final 12 months, Electron joined the OpenJS foundation.