Project Announcement
Perry is a new toolchain that takes TypeScript source and emits standalone native executables for multiple desktop and mobile platforms. The release notes on Hacker News describe version 0.5.306, which adds a generational garbage collector and a lazy JSON tape representation. The compiler claims faster startup and lower memory use than Node or Bun on several synthetic benchmarks. It produces binaries between 2 MB and 5 MB without an embedded JavaScript engine, or 15-20 MB when the optional V8 runtime is enabled for npm package compatibility.
Compilation Pipeline
Perry parses TypeScript with SWC, skips any intermediate JavaScript emission, and feeds the lowered representation directly into LLVM for code generation and optimization. The resulting binary contains no V8 or JavaScript runtime unless the developer explicitly requests it. Standard library modules such as fs, path, crypto, child_process and Buffer are reimplemented in native code rather than delegated to a host environment. The build system records every module at compile time, so the final executable contains only the functions that are actually reachable.
Because the entire dependency graph is resolved before LLVM runs, the output is deterministic: the same source tree produces identical binaries on different machines. Developers who need a pure-JavaScript package can still enable the V8 flag; the package then runs inside a small embedded isolate while the rest of the program stays native. The flag adds roughly 13 MB to the binary size and introduces the usual V8 memory overhead.
Platform Targets and Native Widgets
The same TypeScript codebase can target macOS via AppKit, iOS and iPadOS via UIKit, Android via JNI views, Linux via GTK4, and Windows via Win32. WatchOS and tvOS builds use SwiftUI bindings. WebAssembly and plain JavaScript outputs are also produced from the identical source. The UI layer exposes roughly 25 native widgets—buttons, tables, canvas, secure text fields, scroll views—that map directly to the host toolkit instead of rendering inside a web view.
Threading support uses OS-level threads with compile-time checks that reject mutable variable capture across threads. The compiler provides parallelMap and parallelFilter helpers that schedule work on multiple cores without SharedArrayBuffer or worker messaging. Internationalization strings are extracted at build time, plural rules for 30 locales are baked into the binary, and lookup cost is described as near zero.
Trade-offs for Existing Codebases
Porting an existing Node project requires replacing any native addons and verifying that the reimplemented standard library covers the APIs actually used. Pure-JavaScript packages that rely on V8 internals will need the optional runtime flag and will lose the smallest-binary advantage. The deterministic build property helps with reproducible CI pipelines, but it also means any change in LLVM version or SWC flags produces a different hash even if behavior is identical.
For teams already shipping Electron or Tauri applications, the main benefit is the removal of the Chromium footprint and the guarantee of native widgets on every listed platform. The cost is the need to audit dependencies and the current lack of a large published ecosystem of Perry-specific packages. Early users report that CLI tools and small desktop utilities fit comfortably in the 2-5 MB range, while applications that pull in many npm modules quickly move into the larger V8-enabled tier.
FAQ
Does Perry require a separate runtime on the target machine? No. The default output is a single executable with no external dependencies unless the V8 flag is turned on.
Can I still use existing npm packages? Only if you enable the optional V8 runtime; otherwise the compiler expects packages to be written in TypeScript that it can lower to native code.
How large are the produced binaries compared with Electron? Typical native builds fall between 2 MB and 5 MB. Electron applications usually exceed 100 MB because they bundle a full Chromium instance.
---
📖 Related articles
- Agentic Coding: Una Trappola per lo Sviluppo Software?
- Lean-ctx: Ottimizzatore Ibrido Riduce Consumo Token LLM del 89-99%
- Rust rivoluziona Claude Code: Avvio 2.5x più rapido e volume ridotto del 97%
Need a consultation?
I help companies and startups build software, automate workflows, and integrate AI. Let's talk.
Get in touch