Tech

Perry enables direct TypeScript compilation to native executables using SWC and LLVM

Geisterhand’s Perry v0.5.279 compiles TypeScript into standalone native applications for macOS, iOS, Android, Linux, and Windows, bypassing traditional JavaScript runtimes.

Author
Owen Mercer
Markets and Finance Editor
Published
Draft
Source: Hacker News · original
Tech
No image available
New tool eliminates Node.js and Electron runtimes, producing small binaries with sub-second startup times

A new development tool named Perry is enabling developers to compile TypeScript directly into standalone native executables, removing the dependency on runtimes such as Node.js, V8, or Electron. Developed by Geisterhand, the compiler utilises SWC for parsing and LLVM for code generation to produce binaries that typically range between 2MB and 5MB. The tool supports deployment across macOS, iOS, Android, Linux, Windows, watchOS, tvOS, WebAssembly, and the Web, offering sub-second cold start times for both graphical user interface and command-line applications.

The architecture of Perry avoids intermediate JavaScript translation, instead compiling TypeScript into real platform widgets via AppKit, GTK4, Win32, UIKit, and JNI. This approach contrasts with traditional Electron-based applications that rely on web views. The compiler includes built-in native implementations of common Node.js APIs, including fs, path, crypto, os, Buffer, and child_process. For projects requiring compatibility with the broader JavaScript npm ecosystem, an optional V8 runtime flag is available, though this increases the resulting binary size to between 15MB and 20MB.

Perry v0.5.279 introduces automated cross-platform UI testing and streamlined publishing capabilities for app stores. The Perry Publish module handles code signing, packaging, notarisation, and submission for macOS, iOS, Android, and Windows, aiming to simplify the distribution process by removing the need for developers to manage Xcode provisioning profiles or Android keystores manually. The tool is free for open-source projects, with commercial plans available for teams.

Performance benchmarks cited in the release compare Perry v0.5.279 against Node.js v25 on an Apple M1 Max processor, with metrics recorded over 11 runs. The source material highlights that the compiler produces reproducible binaries across different machines, continuous integration runs, and teams, ensuring consistent output without the variability often associated with JavaScript dependency trees.

The tool supports real operating system threads with parallel processing functions such as parallelMap and parallelFilter, while compile-time safety features reject mutable captures to prevent issues associated with SharedArrayBuffer. Additional features include automatic string extraction with CLDR plural rules for over 30 locales, translations baked directly into the binary, and comprehensive TypeScript and Node.js API coverage. Popular npm packages have been reimplemented in native Rust to eliminate the need for node_modules directories.

Continue reading

More from Tech

Read next: Apple to roll out manual EQ controls for AirPods in iOS 27 update
Read next: Apple rolls out visionOS 27, integrating AI-driven Siri into Vision Pro headset
Read next: Apple Overhauls Siri with Google Gemini Partnership and Standalone App at WWDC 2026