Perry Compiles TypeScript directly to executables using SWC and LLVM
Recorded: May 30, 2026, 4:03 a.m.
| Original | Summarized |
Perry — TypeScript → NativePerryShowcaseBlogRoadmapPublishDocsGitHubENEnglishDeutschEspañolFrançaisItaliano日本語한국어PortuguêsไทยTürkçeTiếng ViệtIndonesia中文v0.5.306 — generational GC + lazy JSON tape default, faster than Node and Bun on most benchmarksOne Codebase. Every Platform.Native Performance.Perry compiles TypeScript to native GUI and CLI apps on macOS, iPadOS, iOS, Android, Linux, Windows, watchOS, tvOS, WebAssembly, and the Web. No runtime. No Electron. Just native binaries.Get StartedView on GitHubterminal$ perry compile main.tsCompiling main.ts...✓ Compiled executable: main (2.3 MB)$ ./mainHello, World!10Targets25+Native UI widgets0 msStartup timeApp StoreReadyShipping in productionReal apps, compiled from TypeScript with Perry.View all showcase projectsMangoNative MongoDB GUI. ~7 MB binary, <1s cold start.HoneNative code editor with built-in terminal, Git, LSP, sync.dB MeterReal-time decibel meter with 60 fps live waveform.{ }PryFast native JSON viewer — tree, search, keyboard shortcuts.Why Perry?Everything you need to compile TypeScript to native applicationsNo Runtime RequiredProduces standalone native executables. No Node.js, no V8, no runtime dependencies. Just a single binary that runs anywhere.Fast CompilationDirect TypeScript to native code compilation using SWC for parsing and LLVM for optimized code generation. No intermediate JavaScript.Small BinariesOutput binaries are typically 2-5MB. With optional V8 runtime for JS npm packages, 15-20MB. Ship less, deploy faster.Deterministic BuildsSame input, same binary. Reproducible across machines, across CI runs, across teams. No mystery rebuilds.Comprehensive Standard LibraryBuilt-in native implementations of fs, path, crypto, os, Buffer, child_process, and more. Use familiar Node.js APIs.Optional V8 RuntimeNeed to use a pure JavaScript npm package? Enable the V8 runtime flag for full npm ecosystem compatibility.25+ Native UI WidgetsButtons, text fields, text areas, tables, canvas, scroll views, QR codes, secure fields, splash screens, and more — all compiling to real platform widgets via AppKit, GTK4, Win32, UIKit, and JNI.Compile-Time Plugin SystemModules compose at build time — no runtime plugin overhead, no IPC boundaries. Your dependencies become direct native function calls in the final binary.True Multi-ThreadingReal OS threads with parallelMap, parallelFilter, and spawn. Compile-time safety rejects mutable captures — no SharedArrayBuffer, no workers, just threads.Compile-Time i18nAutomatic string extraction, CLDR plural rules for 30+ locales, compile-time validation. Translations baked into the binary with near-zero runtime lookup.Native on Every PlatformPerry compiles your TypeScript to native UI frameworks, WebAssembly, and JavaScript — not web views, not Electron. Real native widgets on every platform, plus the web.macOSAppKitStableiOSUIKitStableiPadOSUIKitStableAndroidViewsStableLinuxGTK4StableWindowsWin32StablewatchOSSwiftUIStabletvOSSwiftUIStableWASMWebAssemblyStableWebJavaScriptStableFrom Code to App StorePerry doesn't just compile your app — it gets it into your users' hands.perry compileCompile & signperry publishPackage & submitStores & DownloadsApp Store, Play Store, directperry verifyTest every platformperry compileCompile & signperry publishPackage & submitStores & DownloadsApp Store, Play Store, directperry verifyTest every platformBuild & SignCross-platform builds from one command. Code signing for macOS, iOS, Android, and Windows handled for you. No wrestling with Xcode provisioning profiles or Android keystores.DistributePush to the App Store, Play Store, or ship direct downloads. Perry Publish handles packaging, notarization, and submission.VerifyPowered by Geisterhand. Automated UI testing across all 6 platforms. Know your app works everywhere before your users tell you it doesn't.Free for open-source projects. Plans for teams → /publishFramework ComparisonThe only framework that checks every boxTypeScript compiled to native code. Real platform widgets. No runtime overhead.FrameworkLanguageNative CodeNative WidgetsRuntime OverheadPerry★AOT compiled to native binaryTypeScriptNoneReact NativeJIT / interpreted at runtimeJS / TypeScriptHermes / V8 + BridgeFlutterAOT compiled, custom rendererDartDart VM + Skia engineKMP + ComposeJVM on Android, native on iOSKotlinPartialKotlin runtime + SkiaSwift for AndroidNative binary, no shared UISwiftNo shared UISwift runtime on Android.NET MAUIPartial AOT via MonoC#Partial.NET / Mono runtimeNativeScriptJS runtime, native widget accessJS / TypeScriptV8 / JavaScriptCoreIonicWeb app in native wrapperJS / TypeScriptWebView + CapacitorNative compiledReal platform widgetsZero runtime overheadWrite TypeScript, Ship NativeUse familiar TypeScript syntax and APIs. Perry handles the rest.Hello WorldFile SystemHTTP ClientClasses & GenericsAsync/Awaithello.ts// hello.tsconst greeting = "Hello, World!";console.log(greeting); // Compiles to ~2MB native executable// No runtime needed!$ perry build hello.tsNative binaryPerformance ComparisonNative compilation delivers unmatched efficiencyMetricPerryNode.jsBunBinary Size2-5 MB~80 MB~90 MBStartup Time~1 ms~30 ms~10 msRuntime DependenciesNoneNode.jsBunMemory OverheadMinimalV8 + GCJSC + GCBenchmark Results: Up to 18x FasterPerry v0.5.279 vs Node.js v25 — RUNS=11 median, Apple M1 Max (lower is better)accumulate18x34ms vs 617msobject create11x1ms vs 11msjson roundtrip5.3x75ms vs 394msloop overhead4.5x12ms vs 54msmath intensive3.6x14ms vs 51msarray read3.3x4ms vs 13msfibonacci3.2x318ms vs 1022msarray write2.3x4ms vs 9msloop data dependent1.4x235ms vs 322msnested loops1.0x18ms vs 18msBinary SizeLower is betterPerry5 MBNode.js80 MBBun90 MBGet StartedInstall Perry and start compiling TypeScript to native executables1InstallationHomebrew (macOS)APT (Debian/Ubuntu)Windows (winget)From Sourceterminal$ brew tap PerryTS/perry$ brew install perryRequires Homebrew. Supports macOS arm64 and x86_64.2UsageCompile a fileperry compile main.tsCompiles main.ts to a native executableCustom outputperry compile main.ts -o myappSpecify the output executable nameWith V8 runtimeperry compile main.ts --enable-js-runtimeEnable V8 for JavaScript npm package compatibilityCheck compatibilityperry check ./srcValidate TypeScript code for native compilationFeature SupportComprehensive TypeScript and Node.js API coverageCore LanguageNumbers64-bit floating point (f64)StringsUTF-8, all common methodsBooleanstrue/false, logical operatorsArraysTyped and mixed-type arraysObjectsObject literals and field accessBigInt256-bit integer supportEnumsNumeric and string enumsFunctionsFunction DeclarationNamed functionsArrow Functions() => {} syntaxDefault ParametersParameters with defaultsRest Parameters...args syntaxClosuresIncluding mutable capturesHigher-Order FunctionsFunctions as arguments/returnsAsync/AwaitAsync function supportClassesClass DeclarationBasic class syntaxConstructorsWith parametersPrivate Fields (#)ES2022 #privateField syntaxStatic Methods/FieldsClass-level membersGetters/Settersget/set accessorsInheritanceextends keywordSuper Callssuper() constructor callsType SystemType AnnotationsExplicit type declarationsType InferenceAutomatic type detectionGenericsMonomorphization (like Rust)InterfacesInterface declarationsUnion Typesstring | number supportType Guardstypeof operatorType Aliasestype X = ... declarationsStandard LibraryfsreadFileSync, writeFileSync, existsSync, etc.pathjoin, dirname, basename, extname, resolvecryptorandomBytes, randomUUID, sha256, md5osplatform, arch, hostname, memory infoBufferfrom, alloc, toString, slice, copychild_processexecSync, spawnSyncJSON/Math/DateFull implementationsFull SupportPartial30+ Native npm PackagesPopular npm packages reimplemented in native Rust. No npm install, no node_modules, just fast native code.Databasemysql2pgmongodbbetter-sqlite3ioredisSecuritybcryptargon2jsonwebtokencryptoHTTPhttphttpsaxiosnode-fetchwsnodemailerData ProcessingcheeriosharpzliblodashDate & Timedayjsmomentdate-fnsnode-cronUtilitiesuuidnanoidslugifyvalidatordotenvrate-limiter-flexibleJust import and use - Perry automatically uses the native implementationHow It WorksFrom TypeScript source to native executable in secondsTypeScript.ts filesSWCParserFast parsingHIRTransformMonomorphizationLLVMCodegenMachine codeExecutable2-5 MB binaryWant to know how the compiler works under the hood? Compiler internalsPerryTypeScript → Native. Compile TypeScript directly to standalone executables on macOS, iOS, Android, Linux, and Windows. No runtime, no Electron.Stay in the loopRelease notes and engineering posts. No spam.SubscribeResourcesGetting StartedShowcaseBlogCompareRoadmapPerry PublishEnterpriseDocumentationGeisterhandGitHubCommunityIssuesDiscussionsContributingBuilt with Rust, SWC, and LLVM — and yes, this website is served by a Perry-compiled binaryImpressumDatenschutzGitHub |
Perry is a framework designed to compile TypeScript directly into standalone native executables across a vast array of operating systems and web environments, effectively eliminating the need for a runtime environment such as Node.js or Electron. This approach results in true native applications shipped as single binaries, offering superior performance and minimal dependency overhead. Perry targets broad platform compatibility, compiling code for macOS, iPadOS, iOS, Android, Linux, Windows, watchOS, tvOS, WebAssembly, and the Web, providing real native widgets on every target platform. The underlying mechanism of Perry involves a fast compilation process utilizing SWC for parsing and LLVM for optimized code generation, which transforms TypeScript source files directly into machine code. This process ensures deterministic builds, meaning the resulting binary is reproducible across all machines and continuous integration environments. A core advantage is the elimination of runtime overhead, as the resulting executables are self-contained binaries, typically in the range of two to five megabytes, and feature minimal memory usage compared to environments relying on JavaScript runtimes and garbage collection. Perry provides a comprehensive set of features that bridge the gap between high-level TypeScript development and native system interaction. It includes built-in native implementations for fundamental system operations such as file system access, path manipulation, cryptography, operating system calls, and buffer management, allowing developers to utilize familiar Node.js APIs directly within the native context. Furthermore, Perry incorporates compile-time systems for advanced features: it supports dynamic thread management using parallel operations, rejects mutable captures to ensure compile-time safety, and handles internationalization by performing automatic string extraction and plural rule validation for numerous locales, baking translations directly into the binary. For graphical applications, Perry offers access to over twenty-five native UI widgets, compiled down to native platform widgets via specific APIs like AppKit, GTK4, UIKit, and Win32. This native UI capability, combined with a compile-time plugin system, allows modules to be composed at build time, transforming dependencies into direct native function calls rather than incurring runtime plugin or inter-process communication overhead. The framework also supports compile-time Internationalization (i18n) and type annotation inference, incorporating strong type systems and generics, allowing for explicit type declarations and powerful type guards in the code. The ecosystem support is also crucial; Perry reimplements popular npm packages in native code, removing the requirement for separate npm installations or node_modules directories. This feature provides access to a large repository of utility libraries covering data processing, time management, and security, such as implementations for MongoDB, Redis, HTTP clients, and various cryptographic functions. This integration allows developers to use familiar TypeScript syntax and APIs while compiling results directly to native code, enabling a workflow from source to app store submission, including automated build and signing procedures. Perry is further supported by automated UI testing via Geisterhand, which verifies application functionality across all supported platforms. |