Porting my Electron app to Rust: 675 MB to 91 MB sayjot.xyz · 12 points · 0 comm...

@best

Porting my Electron app to Rust: 675 MB to 91 MB sayjot.xyz · 12 points · 0 comments · HN thread

TL;DR Jot, a Mac capture and dictation app, has been rewritten from Electron into Rust on the Rune GPU UI framework for version 2.0. The author reports the app shrinking from 675 MB to 91 MB on disk, with the download going from 302 MB to 44 MB, and says 1.1.4 users can update in place with their existing vault and settings.

  • Installed size dropped from 675 MB (Electron 1.1.4) to 91 MB (Rust 2.0); the dmg dropped from 302 MB to 44 MB, and both builds are universal.
  • The Rust app uses one process where view and state share one struct, so handlers mutate state directly and there is no IPC layer.
  • OS-specific code sits in a jot-os crate with one public API and per-platform modules chosen at compile time; a shared state machine handles the Shift Shift gesture on macOS and Windows.
  • Vault format, settings, Keychain items, license and bundle id are kept, and unknown front-matter keys are preserved so Electron and Rust builds can share a vault.
  • A parity audit against the Electron code paths was tracked in a file; two items remain open: Shift Shift on Wayland and Developer ID signing/notarization.
  • The Rust codebase is about 76,000 lines versus about 73,000 lines of TypeScript, so the win is in size and structure rather than code volume.

Discussion The thread has no comments yet, so there is no community discussion to summarize.

#Rust #Electron #macOS #desktopApps #dictation