PageSourceSearch

https://www.electronjs.org/assets/js/e4afe5d9.0686fcd6.js

js electronjs.org collected 2026-09-24 07:03:50 UTC 8,765 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunkelectronjs=self.webpackChunkelectronjs||[]).push([["22695"],{26770(e,t,n){n.r(t),n.d(t,{assets:()=>s,contentTitle:()=>l,default:()=>h,frontMatter:()=>a,metadata:()=>r,toc:()=>d});var r=n(22074),o=n(74848),i=n(28453);let a={title:"Apple Silicon Support",date:new Date("2020-10-15T00:00:00.000Z"),authors:"MarshallOfSound",slug:"apple-silicon",tags:["features"]},l,s={authorsImageUrls:[void 0]},d=[{value:"How does it work?",id:"how-does-it-work",level:2},{value:"What do I need to do?",id:"what-do-i-need-to-do",level:2},{value:"Potential Issues",id:"potential-issues",level:2},{value:"Native Modules",id:"native-modules",level:3},{value:"How do I test it?",id:"how-do-i-test-it",level:2},{value:"What about Rosetta 2?",id:"what-about-rosetta-2",level:2}];function c(e){let t={a:"a",code:"code",del:"del",em:"em",h2:"h2",h3:"h3",hr:"hr",li:"li",p:"p",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",ul:"ul",...(0,i.R)(),...e.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(t.p,{children:"With Apple Silicon hardware being released later this year, what does the path look like for you to get your Electron app running on the new hardware?"}),"\n",(0,o.jsx)(t.hr,{}),"\n",(0,o.jsxs)(t.p,{children:["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 ",(0,o.jsx)(t.code,{children:"npm install electron@beta"})," or download it directly from our ",(0,o.jsx)(t.a,{href:"https://releases.electronjs.org/release?channel=stable",children:"releases website"}),"."]}),"\n",(0,o.jsx)(t.h2,{id:"how-does-it-work",children:"How does it work?"}),"\n",(0,o.jsxs)(t.p,{children:["As of Electron 11, we will be shipping separate versions of Electron for Intel Macs and Apple Silicon Macs. Prior to this change, we were already shipping two artifacts, ",(0,o.jsx)(t.code,{children:"darwin-x64"})," and ",(0,o.jsx)(t.code,{children:"mas-x64"}),", with the latter being for Mac App Store compatibility usage. We are now shipping another two artifacts, ",(0,o.jsx)(t.code,{children:"darwin-arm64"})," and ",(0,o.jsx)(t.code,{children:"mas-arm64"}),", which are the Apple Silicon equivalents of the aforementioned artifacts."]}),"\n",(0,o.jsx)(t.h2,{id:"what-do-i-need-to-do",children:"What do I need to do?"}),"\n",(0,o.jsxs)(t.p,{children:["You will need to ship two versions of your app: one for x64 (Intel Mac) and one for arm64 (Apple Silicon). The good news is that ",(0,o.jsx)(t.a,{href:"https://github.com/electron/electron-packager/",children:(0,o.jsx)(t.code,{children:"electron-packager"})}),", ",(0,o.jsx)(t.a,{href:"https://github.com/electron/electron-rebuild/",children:(0,o.jsx)(t.code,{children:"electron-rebuild"})})," and ",(0,o.jsx)(t.a,{href:"https://github.com/electron-userland/electron-forge/",children:(0,o.jsx)(t.code,{children:"electron-forge"})})," already support targeting the ",(0,o.jsx)(t.code,{children:"arm64"})," architecture. As long as you're running the latest versions of those packages, your app should work flawlessly once you update the target architecture to ",(0,o.jsx)(t.code,{children:"arm64"}),"."]}),"\n",(0,o.jsx)(t.p,{children:(0,o.jsxs)(t.del,{children:['In the future, we will release a package that allows you to "merge" your ',(0,o.jsx)(t.code,{children:"arm64"})," and ",(0,o.jsx)(t.code,{children:"x64"})," apps into a single universal binary, but it's worth noting that this binary would be ",(0,o.jsx)(t.em,{children:"huge"})," and probably isn't ideal for shipping to users."]})}),"\n",(0,o.jsxs)(t.p,{children:["Update: This package is now available at ",(0,o.jsx)(t.a,{href:"https://github.com/electron/universal",children:(0,o.jsx)(t.code,{children:"@electron/universal"})}),". You can use it to merge two packaged x64 and arm64 apps into a single binary."]}),"\n",(0,o.jsx)(t.h2,{id:"potential-issues",children:"Potential Issues"}),"\n",(0,o.jsx)(t.h3,{id:"native-modules",children:"Native Modules"}),"\n",(0,o.jsx)(t.p,{children:"As you are targeting a new architecture, you'll need to update several dependencies which may cause build issues. The minimum version of certain dependencies are included below for your reference."}),"\n",(0,o.jsxs)(t.table,{children:[(0,o.jsx)(t.thead,{children:(0,o.jsxs)(t.tr,{children:[(0,o.jsx)(t.th,{children:"Dependency"}),(0,o.jsx)(t.th,{children:"Version Requirement"})]})}),(0,o.jsxs)(t.tbody,{children:[(0,o.jsxs)(t.tr,{children:[(0,o.jsx)(t.td,{children:"Xcode"}),(0,o.jsx)(t.td,{children:(0,o.jsx)(t.code,{children:">=12.2.0"})})]}),(0,o.jsxs)(t.tr,{children:[(0,o.jsx)(t.td,{children:(0,o.jsx)(t.code,{children:"node-gyp"})}),(0,o.jsx)(t.td,{children:(0,o.jsx)(t.code,{children:">=7.1.0"})})]}),(0,o.jsxs)(t.tr,{children:[(0,o.jsx)(t.td,{children:(0,o.jsx)(t.code,{children:"electron-rebuild"})}),(0,o.jsx)(t.td,{children:(0,o.jsx)(t.code,{children:">=1.12.0"})})]}),(0,o.jsxs)(t.tr,{children:[(0,o.jsx)(t.td,{children:(0,o.jsx)(t.code,{children:"electron-packager"})}),(0,o.jsx)(t.td,{children:(0,o.jsx)(t.code,{children:">=15.1.0"})})]})]})]}),"\n",(0,o.jsx)(t.p,{children:"As a result of these dependency version requirements, you may have to fix/update certain 
1native modules. One thing of note is that the Xcode upgrade will introduce a new version of the macOS SDK, which may cause build failures for your native modules."}),"\n",(0,o.jsx)(t.h2,{id:"how-do-i-test-it",children:"How do I test it?"}),"\n",(0,o.jsxs)(t.p,{children:["Currently, Apple Silicon applications only run on Apple Silicon hardware, which isn't commercially available at the time of writing this blog post. If you have a ",(0,o.jsx)(t.a,{href:"https://developer.apple.com/programs/universal/",children:"Developer Transition Kit"}),", you can test your application on that. Otherwise, you'll have to wait for the release of production Apple Silicon hardware to test if your application works."]}),"\n",(0,o.jsx)(t.h2,{id:"what-about-rosetta-2",children:"What about Rosetta 2?"}),"\n",(0,o.jsxs)(t.p,{children:["Rosetta 2 is Apple's latest iteration of their ",(0,o.jsx)(t.a,{href:"https://en.wikipedia.org/wiki/Rosetta_(software)",children:"Rosetta"})," technology, which allows you to run x64 Intel applications on their new arm64 Apple Silicon hardware. Although we believe that x64 Electron apps will run under Rosetta 2, there are some important things to note (and reasons why you should ship a native arm64 binary)."]}),"\n",(0,o.jsxs)(t.ul,{children:["\n",(0,o.jsxs)(t.li,{children:["Your app's performance will be significantly degraded. Electron / V8 uses ",(0,o.jsx)(t.a,{href:"https://en.wikipedia.org/wiki/Just-in-time_compilation",children:"JIT"})," compilation for JavaScript, and due to how Rosetta works, you will effectively be running JIT twice (once in V8 and once in Rosetta)."]}),"\n",(0,o.jsx)(t.li,{children:"You lose the benefit of new technology in Apple Silicon, such as the increased memory page size."}),"\n",(0,o.jsxs)(t.li,{children:["Did we mention that the performance will be ",(0,o.jsx)(t.strong,{children:"significantly"})," degraded?"]}),"\n"]})]})}function h(e={}){let{wrapper:t}={...(0,i.R)(),...e.components};return t?(0,o.jsx)(t,{...e,children:(0,o.jsx)(c,{...e})}):c(e)}},28453(e,t,n){n.d(t,{R:()=>a,x:()=>l});var r=n(96540);let o={},i=r.createContext(o);function a(e){let t=r.useContext(i);return r.useMemo(function(){return"function"==typeof e?e(t):{...t,...e}},[t,e])}function l(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(o):e.components||o:a(e.components),r.createElement(i.Provider,{value:t},e.children)}},22074(e){e.exports=JSON.parse('{"permalink":"/blog/apple-silicon","source":"@site/blog/apple-silicon.md","title":"Apple Silicon Support","description":"With Apple Silicon hardware being released later this year, what does the path look like for you to get your Electron app running on the new hardware?","date":"2020-10-15T00:00:00.000Z","tags":[{"inline":false,"label":"Features","permalink":"/blog/tags/features","description":"Showcasing new features in Electron core"}],"readingTime":2.98,"hasTruncateMarker":false,"authors":[{"name":"MarshallOfSound","url":"https://github.com/MarshallOfSound","imageURL":"https://github.com/MarshallOfSound.png?size=96","key":"MarshallOfSound","page":null}],"frontMatter":{"title":"Apple Silicon Support","date":"2020-10-15T00:00:00.000Z","authors":"MarshallOfSound","slug":"apple-silicon","tags":["features"]},"unlisted":false,"prevItem":{"title":"Electron 11.0.0","permalink":"/blog/electron-11-0"},"nextItem":{"title":"Community Discord Server and Hacktoberfest","permalink":"/blog/discord-hacktoberfest-2020"}}')}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.