Menu

1 / 2

Porting my Electron app to Rust: 675 MB to 91 MB

DEV Community: rust·Mohak Bajaj·7 days ago
#fXlnNR44
#devtorust#devto#dev#electron#vault
Long article (1214 words) — no AI summary yet.
Reading 0:00
15s threshold

Jot is a capture app for the Mac. Select text anywhere, press Shift twice, and it becomes a Markdown file in ~/Documents/Jot . Hold fn to dictate. Up to 1.1.4, Jot was an Electron app. Jot 2.0 is the same app in Rust, on Rune , a GPU UI framework.

Both builds are universal, for Apple silicon and Intel. The Electron 1.1.4 app is 675 MB on disk. The Rust 2.0 app is 91 MB. The download went from a 302 MB dmg to a 44 MB one. 2.0 uses the same vault, settings file, Keychain items, license and bundle id, so 1.1.4 users update in place.

Why leave Electron

Size was the obvious reason. Most of the 675 MB is Chromium, for an app that shows a list of notes. The less obvious reason was the shape of the code. An Electron app has a main process, a preload script and a renderer, and every feature crosses IPC. Jot's native work already lived outside Node: a Swift helper for Apple's speech API, another for Apple Intelligence cleanup, and a separate process for local speech models.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.