บล็อก

ข่าว บทเรียน และการวิเคราะห์เชิงลึกเกี่ยวกับการสร้างแอปเนทีฟด้วย Perry

GCperformanceLLVMdebuggingarchitecture

สร้าง GC สำหรับคอมไพเลอร์ TypeScript แบบเนทีฟ: การตัดสินใจ เรื่องเหนือความคาดหมาย และสถานะปัจจุบัน

Perry คอมไพล์ TypeScript เป็นโค้ดเนทีฟด้วย LLVM ซึ่งหมายความว่าต้องมีตัวเก็บขยะจริง บทความนี้เล่าถึงการตัดสินใจของเรา บั๊กที่ไม่ทิ้งหลักฐาน CI gate ที่ไม่มีทางล้มเหลว และตัวเลขล่าสุดเมื่อเทียบกับ Node และคู่แข่ง AOT ที่ใช้ reference counting

compilerGCdebuggingNode.js paritymilestone

Compiling Claude Code: One Minified Bundle, 160 Compiler Fixes

We pointed Perry at the 13 MB minified cli.js that npm ships for Claude Code and tried to turn it into a native binary. A month later it launches, logs in, streams a real API response, and paints what you type — and 160 pull requests had landed in Perry, from a no-op MessageChannel to a missing GC write barrier on RegExp headers.

watchOSApp StoreiOShow-to

Shipping a Watch-Only App to the App Store (When Nothing Else Will)

Every documented way to upload a standalone watchOS app to the App Store fails — altool, iTMSTransporter, xcodebuild, even Xcode 26's Organizer all refuse the watchOS platform. Here's the undocumented workaround that works and keeps arm64_32 for older watches: an ITSWatchOnlyContainer iOS stub, uploaded with iTMSTransporter.

npmtest262Windowswidgetsmilestone

npm package จริงคอมไพล์ได้แล้ว: axios, zod, express — กับการกวาด conformance

ราว 270 release จาก v0.5.875 ถึง v0.5.1146 ไม่ได้เกี่ยวกับ benchmark ตัวเดียว — แต่เกี่ยวกับการทำให้ npm package จริงคอมไพล์และรันได้ axios, zod v4, express, fastify และ hono ทำงานได้แล้ว ความเทียบเท่า test262 กระโดดขึ้น (String 60→79%, Array 61→72%) Windows กลายเป็น Fluent ด้วย Mica และ DatePicker + drag & drop ลงจอดบนทุกแพลตฟอร์ม

GCperformancebenchmarkscommunity

สิ่งที่ benchmark ของ aya_koto สอนเราเกี่ยวกับ GC ของ Perry

ผู้อ่านคนหนึ่ง benchmark Perry บน AtCoder ABC451D และวัดได้ว่าช้ากว่า Bun 3.85× ในระหว่างนั้น regression แบบเงียบได้ขยายช่องว่างขึ้นเป็น 6.59× การแก้ไม่ได้อยู่ในจุดที่เราคาด trade-off ของ GC ที่จงใจไว้ซึ่งมันเปิดเผยออกมานั้นเป็นเรื่องจริง และ Perry v0.5.875 ตอนนี้เสมอกับ Bun บน bench เดียวกัน: 425 ms vs 431 ms

updaterdevtoolsrefactorcommunitymilestone

อัปเดตอัตโนมัติ, inspector แบบ live และคอมไพเลอร์ที่ลดตัวเองลงครึ่งหนึ่ง

Perry v0.5.306 → v0.5.359 ใน 4 วัน — 53 patch release ปิด issue ราว 30 รายการ และของใหญ่ 3 อย่างลงจอด: perry/updater สำหรับ auto-update บน desktop, inspector แบบ live ที่ localhost:7676 และการ refactor คอมไพเลอร์ที่ลดไฟล์ใหญ่ที่สุด 4 ไฟล์ลง 33–91%

GCJSONperformancebenchmarksmilestone

Generational GC, Lazy JSON และเบนช์มาร์กที่ทนต่อการตรวจสอบ

Perry v0.5.174 → v0.5.306 ภายในสามวัน พร้อมงาน GC และ JSON ที่ลงควบคู่กัน Generational GC กลายเป็นค่าเริ่มต้น Small String Optimization กลายเป็นค่าเริ่มต้น JSON pipeline ได้ lazy tape ที่ลงตัวที่ค่ากลาง 75 ms บน validate-and-roundtrip — ดีที่สุดในกลุ่ม dynamic typing หน้าเบนช์มาร์กเขียนใหม่ด้วยค่ากลาง RUNS=11 + p95 + σ เพิ่ม simdjson และ AssemblyScript+json-as เป็นเพียร์ และทุกจุดอ่อนของ Perry ถูกเปิดเผยอย่างตรงไปตรงมา

npmdeveloper-experienceperformancewatch-modemilestone

การกระจายผ่าน npm, perry dev, และชนะทุกเบนช์มาร์ก

Perry v0.5.80 → v0.5.174 ภายในหกวัน @perryts/perry ส่งขึ้น npm สำหรับทั้งเจ็ดแพลตฟอร์มที่รองรับ perry dev เพิ่ม watch-mode auto-recompile บนโครง in-memory AST cache และ on-disk per-module object cache json_roundtrip ปิดช่องว่างสุดท้าย — Perry ตอนนี้ชนะทุกเบนช์มาร์กเทียบกับทั้ง Node.js และ Bun

performancellvmJSONGCservermilestone

ปรับแต่งทุกอย่าง: หนึ่งสัปดาห์, 68 รุ่น, และ JSON เร็วขึ้น 547 เท่า

Perry v0.5.13 → v0.5.80 ภายในเจ็ดวัน JSON.parse ปิดช่องว่าง 547 เท่ากับ Node mimalloc มาเป็น allocator หลัก มี inline cache, shape transition, typed Buffer slot, i32-native bitwise ops, scalar replacement และ native event loop ที่ทำให้เซิร์ฟเวอร์ Fastify และ WebSocket ทำงานต่อเนื่อง

compilersllvmcraneliftperformancemilestone

จาก Cranelift สู่ LLVM: Perry เร็วขึ้น 24 เท่าได้อย่างไร

การย้าย backend ของ Perry จาก Cranelift ไปยัง LLVM เสร็จสมบูรณ์แล้ว การเปลี่ยนครั้งแรกทำให้เบนช์มาร์กช้าลง 70 เท่า — จากนั้นการปรับแต่ง 6 รายการทำให้ Perry ชนะ Node.js 14/15 รายการ โดยเร็วกว่าสูงสุด 24.6 เท่า

tvOScross-compilationbillingWindowsmilestone

tvOS, คอมไพล์ข้าม iOS จาก Linux และ Perry Login

Perry v0.4.24: tvOS เป็นเป้าหมายการคอมไพล์ลำดับที่ 10, คอมไพล์ข้าม iOS และ macOS จาก Linux ผ่าน ld64.lld, perry login พร้อมการเรียกเก็บเงินตามการใช้งาน, ปรับปรุง UI บน Windows, การรับรอง macOS และ 120 commit ใน 5 วัน

threadingi18nwatchOScompilermilestone

Multi-Threading แท้จริง, i18n ตอนคอมไพล์ และ watchOS

Perry v0.4.0: เธรด OS จริงพร้อมความปลอดภัยตอนคอมไพล์, ระบบ i18n แบบไม่ยุ่งยากสำหรับกว่า 30 ภาษา, watchOS เป็นเป้าหมายการคอมไพล์ลำดับที่ 9, API เสียงและกล้อง และ pipeline คอมไพล์แบบขนาน

compilercross-compilationinfrastructuremilestone

คอมไพล์ข้ามแพลตฟอร์มไป Windows, Game Loop บน iOS และความเท่าเทียมของการทดสอบ 100%

103 commit ในหนึ่งสัปดาห์: คอมไพล์ข้ามแพลตฟอร์มไป Windows จาก Linux ผ่าน lld-link, รองรับ game loop บน iOS, การรายงานข้อผิดพลาด, pipeline การ build Hub สองขั้นตอน และคอมไพเลอร์ self-hosting ทำได้ 68/68 ความเท่าเทียมของการทดสอบแบบ deterministic

distributiondocumentationWidgetKitmilestone

Pipeline ครบวงจร: เอกสาร, การกระจาย และ WidgetKit

82 commit ในหนึ่งสัปดาห์: เว็บไซต์เอกสาร 49 หน้า, การเผยแพร่อัตโนมัติบน App Store และ Play Store, แพ็กเกจ Homebrew และ APT, ส่วนขยาย WidgetKit เนทีฟจาก TypeScript, วิดเจ็ตใหม่, โมดูล http/https และคอมไพเลอร์ LLVM แบบ self-hosting

ecosystemperry/uidatabasesinfrastructuremilestone

จากคอมไพเลอร์สู่ระบบนิเวศ: React, ฐานข้อมูล และ Cloud Build

Perry เติบโตจากคอมไพเลอร์เป็นระบบนิเวศที่สมบูรณ์ perry/ui เป็นแกนหลัก, ORM ที่เข้ากันได้กับ Prisma สำหรับ MySQL/PostgreSQL/SQLite, push notification สากล, build แบบกระจายพร้อมการเผยแพร่บน App Store และเลเยอร์ความเข้ากันได้กับ React — ทั้งหมดในหนึ่งสัปดาห์

UIcross-platformreleasemilestone

ทั้ง 6 แพลตฟอร์ม ฟีเจอร์ครบถ้วนเท่าเทียมกัน

วิดเจ็ต UI เนทีฟกว่า 20 ตัว, วิดเจ็ต Canvas, Table view, การแจ้งเตือนระบบ, การเข้าถึง keychain, รองรับหลายหน้าต่าง และฟีเจอร์ครบถ้วนเท่าเทียมกันบน macOS, iOS, iPadOS, Android, Linux และ Windows — ทั้งหมดจากโค้ดเบส TypeScript เดียว

architectureperformancecompiler

ระบบปลั๊กอินคือภาษีด้านประสิทธิภาพ

สถาปัตยกรรมปลั๊กอินแลกประสิทธิภาพกับความสามารถในการขยาย แต่ถ้าความสามารถในการขยายเกิดขึ้นตอนคอมไพล์แทนที่จะเป็นตอนรันไทม์ล่ะ? การประกอบตอนคอมไพล์ให้คุณทั้งสองอย่าง — ไม่มี overhead ยืดหยุ่นเต็มที่

compilerframeworksprogress

คอมไพล์ Hono, tRPC และ Strapi เป็นไบนารีเนทีฟ

ตอนนี้ Perry คอมไพล์เฟรมเวิร์ก TypeScript สำคัญสามตัว — Hono, tRPC และ Strapi — เป็นไฟล์ปฏิบัติการ ARM64 เนทีฟ คอมไพล์ได้ในไม่ถึงวินาที สร้างไบนารีขนาดไม่ถึง 2 MB และทำงานได้โดยไม่มีข้อผิดพลาด

tutorialshowcasePry

สร้าง Pry: โปรแกรมดู JSON เนทีฟใน TypeScript

A walkthrough of building Pry, a native JSON viewer compiled from TypeScript to machine code with the Perry runtime and GC linked in and no webview.

architectureUIcross-platform

UI เนทีฟข้ามแพลตฟอร์มจาก TypeScript

How Perry maps one TypeScript codebase to platform widgets across its documented targets, including the platform-specific limitations and prerequisites.

announcementcompilerTypeScript

แนะนำ Perry

Perry compiles supported TypeScript to standalone native executables with its runtime and GC linked in, without requiring an external Node.js installation or JavaScript engine.