HubLensTypeScriptPerryTS/perry
// archived 2026-04-22
46

// summary

Perry is a native TypeScript compiler built with Rust that transforms code into standalone, high-performance executables. By utilizing LLVM for code generation, it eliminates the need for Node.js, Electron, or browser runtimes. The project supports cross-platform development for desktop, mobile, and web, offering native UI components and multi-threading capabilities.

// technical analysis

Perry is a native TypeScript compiler built in Rust that leverages SWC for parsing and LLVM for code generation to produce standalone, high-performance native executables. By eliminating the need for Node.js, Electron, or browser engines, it solves the problem of heavy runtime dependencies and performance overhead in cross-platform development. The project prioritizes native execution speed through advanced optimizations like scalar replacement of non-escaping objects and integer-modulo fast paths, effectively bridging the performance gap between high-level TypeScript and systems languages like C++ and Rust.

// key highlights

01
Compiles TypeScript directly into small, standalone native binaries with no external runtime dependencies.
02
Achieves superior performance over Node.js and Bun by using LLVM to perform aggressive optimizations like escape analysis and object field register allocation.
03
Provides a declarative, SwiftUI-like native UI system that maps to platform-specific widgets on nine different targets including iOS, Android, and desktop.
04
Enables safe, data-parallel multi-threading with compile-time enforcement to prevent shared mutable state and data races.
05
Supports zero-overhead internationalization by baking locale strings and CLDR plural rules directly into the binary at compile time.
06
Offers a cloud-based publishing service via perry-hub to handle cross-compilation and signing for various mobile and desktop platforms.

// use cases

01
Compiling TypeScript into small, standalone native binaries with no runtime dependencies.
02
Building cross-platform native applications for desktop, mobile, and web using a single codebase.
03
Developing high-performance native UI applications with a declarative, SwiftUI-like framework.

// getting started

To begin, install Perry via npm using 'npm install @perryts/perry' or use 'npx @perryts/perry' for a zero-install approach. Initialize a project with 'perry init my-project', then use 'perry compile src/main.ts -o myapp' to build your code into a native executable. You can verify your environment setup at any time by running 'perry doctor'.