Perry Compiles TypeScript Straight to Native Binaries via SWC and LLVM
Perry is a new toolchain that takes TypeScript source and produces standalone native executables without Node.js, V8, or Electron in the picture. It parses with SWC and generates code through LLVM, skipping any intermediate JavaScript step. The resulting binaries land around 2-5MB, or 15-20MB if you opt into a bundled V8 runtime to pull in pure-JS npm packages. Benchmarks on an M1 Max claim up to 18x speedups over Node.js v25.
The project targets a broad matrix of platforms — macOS, iOS, iPadOS, Android, Linux, Windows, watchOS, tvOS, plus WebAssembly and the browser — and maps UI primitives onto each platform’s real widget toolkit (AppKit, UIKit, GTK4, Win32, JNI, SwiftUI). It ships native reimplementations of common Node APIs like fs, path, crypto, os, Buffer, and child_process, alongside rewrites of around 30 popular npm packages in Rust. A compile-time plugin system turns dependencies into direct function calls, and the threading model uses real OS threads while rejecting mutable captures at compile time.
Beyond compilation, Perry bundles code signing, notarization, and store submission for macOS, iOS, Android, and Windows, with automated cross-platform UI testing via a companion tool called Geisterhand. It’s free for open source, with paid tiers for team publishing. The pitch is essentially Deno or Bun’s ergonomic story crossed with a Rust- or Go-style single-binary output, aimed squarely at developers who want TypeScript syntax without shipping a JavaScript runtime.
Read the full article
Continue reading at Hacker News →This is an AI-generated summary. Read the original for the full story.