Homepage    |    GitHub    |    API    |    FAQ

Running joplin on Apple silicon

I have an Apple Transition Development Kit - a mac mini with an arm processor.

I thought I'd try the various tools I use that are open source.

I found that rebuilding Joplin for this fails, not on Joplin but in Electron. I might look at that, but I have a few dependencies that need working on.

Anyone else on this journey?

Hi @scrumit thanks for your journey!
I want to ask, how far have you come by now?

I've read that Electron 11.0.0 supports M1 hardware now, so does this help you with your work an native joplin support on Apple silicon?

Pretty sure there was a thread of someone who successfully compiled for raspberry pi 400, which is an arm chip. Perhaps that thread (and his build tweaks) would apply here too

1 Like

Compiling for Arm helps, but it's the dependency on Electron. I raised the issue 3859 in the Joplin github repo.

I just tried the latest build 1.5.4. and Electron still crashes:

Thread 0 Crashed:: CrRendererMain Dispatch queue: com.apple.main-thread
0 com.github.Electron.framework 0x000000010a6b790c v8::internal::SetupIsolateDelegate::SetupHeap(v8::internal::Heap*) + 1337916

Ah ok! I see your issue #3859.
What i don't understand, is it the problem with draw.io (electron) or with electron in general?

However: i really think its wonderful, that you keep working on joplin for apple silicon:)

I'm tracking a number of open source projects, because I want to use them. I think Joplin is using a binary of Electron and that might not be translated to Arm.

I haven't tried with a stand alone Electron.

Who could help with the binary translation?

Intel binary should be translated to arm code on loading. As I said I wonder if electron is somehow not being translated.

I currently build an Electron app that I ship as a universal binary for x64 and arm64 macOS builds. I see that Joplin uses Electron Builder which supports creating universal binaries if the Electron app is v11+.

Config for builder:

"mac": {
   "target": {
     "target": "'default",
      "arch": "universal"
}

Electron:
"electron": "^12.0.1"
Builder version:
"electron-builder": "22.10.5"

This pulls both the x64 and arm64 binaries for Electron and bundles in a DMG

1 Like

To be honest, I was quite happy that we were finally done with this universal binary crap. They probably wouldn't work on Mojave. But right now we are still using Electron 10, so we'd have to wait until we move to Electron 11.

Is there a way to create both in parallel and get 2 separate DMGs?

Yup. Just do as with Windows just set 2 targets each with the separate arch.

{
  target: 'dmg',
  arch: 'arm64'
},
{
  target: 'dmg',
  arch: 'x64'
}

Would need testing and what not, but it's doable for sure.

1 Like

awesome, thanks for the info.

1 Like

BTW, loving Joplin. Great app! :grinning:

Wonderful, now I try building on the Apple silicon and a raspberry Pi.