기술 사실과 측정 주의사항은 번역 간 불일치를 막기 위해 영어를 기준으로 관리합니다.

Get Started with Perry

From zero to a running native executable in three steps. Native output does not need Node.js or an external JavaScript engine on the target machine; Perry's runtime and GC are linked into it.

시작하기

Perry를 설치하고 TypeScript를 네이티브 실행 파일로 컴파일하세요

1설치

terminal
$ npm install -g @perryts/perry

Recommended cross-platform install. Native targets still require the relevant platform SDK and linker; run perry doctor after installation.

2사용법

Verify the toolchain
perry doctor

Checks the compiler, linker, SDK, and target setup

파일 컴파일
perry compile main.ts

main.ts를 네이티브 실행 파일로 컴파일합니다

사용자 지정 출력
perry compile main.ts -o myapp

출력 실행 파일 이름 지정

V8 런타임 포함
perry compile main.ts --enable-js-runtime

JavaScript npm 패키지 호환성을 위해 V8 활성화

호환성 확인
perry check ./src

네이티브 컴파일을 위한 TypeScript 코드 유효성 검사

Your first binary, step by step

Once Perry is installed, compiling TypeScript to a native executable is a single command. Write a file:

hello.ts
const name = process.argv[2] ?? "World";
console.log(`Hello, ${name}!`);

Compile it and run the result — the output is a self-contained machine-code binary, not a bundled script:

terminal

$ perry compile hello.ts

✓ Compiled executable: hello

$ ./hello Perry

Hello, Perry!

The published runtime-only hello-world measurement is about 3.2 ms on the documented Apple M-series test host. Real startup depends on the target, linked features, I/O, and hardware. Read more about how Perry compiles TypeScript to a binary or what happens inside the TypeScript native compiler.

Where to go next