Electron, the framework for developing cross-platform desktop applications with HTML, CSS and JavaScript, is available in version 11.0. Being based on Chromium for the frontend part and node.js for the backend part, Electron integrates in this new version support for the latest versions of the web stack namely Chrome 87, Node 12.18.3 as well as version 8.7 of the JavaScript engine V8. In addition to web stack upgrades, the big news in this latest release of Electron is support for the new ARM processor architecture on which Apple’s newly released Mac computers are based.
For those who haven’t followed the whole story, you should know that in the 1990s, Apple, which used Motorola’s microprocessors for its computers, decided to migrate to IBM’s PowerPCs for performance reasons. Over the years, the battle for processors intensified and in 2005, Steve Jobs announced the switch from Apple computers to Intel processors (x86 architecture). Apple has given itself one year to complete its transition. In 2006, the firm at the apple had resolutely turned its back on IBM’s PowerPC processors by releasing new computers including the first Mac Pro fully equipped with Intel chips and the Mac OS X system rewritten to adapt to this new architecture. .
While Intel processors were touted from the start as having a performance-per-watt ratio five times greater than PowerPCs, it should be noted that over the years, the American founder has failed to maintain its strengths. The repeated bugs discovered in the operation of Intel chips, relatively insignificant performance for new generations of processors, the energy efficiency of processors pointed out, the shift to a better burn process always expected, shortages of some Intel processors , etc., are all faults that have prompted Apple to reconsider its partnership with Intel and to consider migrating its devices to its ARM chips which already equip iPhone and iPad devices. Apple introduced its new devices last week, and since the start of this week, users have started receiving their first devices (MacBook mini, MacBook Air and MacBook pro) equipped with the new M1 chip (ARM64).
As with the switch from the RISC POWER architecture to x86, the switch to Apple’s SoC (system on chip) is not painless. X64 applications must be recompiled for ARM64. And for those who can’t yet, Apple has designed the Rosetta 2 tool that emulates x64 applications to make them work on Apple’s ARM64 platform. For developers who have already compiled their Electron apps to x64, although it is possible to run them on Apple devices with M1 chip using the Rosetta 2 tool, the Electron team strongly advises against doing so, because :
- The performance of your application will be significantly degraded. Electron / V8 uses JIT compilation for JavaScript, and because of how Rosetta works you will run JIT twice (once in V8 and once in Rosetta);
- you will lose the benefit of Apple’s new SoC technology, such as increasing memory page size.
To get around these problems, Electron announces full compatibility of its latest framework with Macs equipped with the M1 chip. Developers can therefore use Electron 11 to recompile their x86-64 applications for ARM64 to take advantage of all the benefits of Apple’s new architecture. And to avoid confusion, the Electron team says that starting with version 11.0, it will release separate versions of Electron for Intel (x64) devices and Electron for M1 (ARM64) devices. The company also explains that it is possible that it will release a package that would merge ARM64 and x64 applications into a single binary, but that binary would be huge and might not be of interest to users.
- Adding a V8 crash message and location information to crashReport settings;
- adding a quick tip to the console to help debug the renderer;
- the addition of a new system context menu event to help prevent and override the system context menu;
- adding webContents.forcefullyCrashRenderer () to forcefully terminate a render process to help recover a stuck renderer;
- the addition of the app.getApplicationInfoForProtocol () API which returns detailed information about the application that manages a certain protocol
- the addition of the app.createThumbnailFromPath () API which returns a preview image of a file based on its file path and maximum thumbnail size;
- and many other improvements.