# Perry

> Perry is a native TypeScript compiler that compiles TypeScript source code directly to native executables. No JavaScript runtime — your TypeScript compiles to a real binary via LLVM.

## Key Facts

- Compiles TypeScript → native machine code (not JavaScript)
- Uses SWC for parsing, LLVM for code generation
- 6 platform targets: macOS (AppKit), iOS (UIKit), Android (JNI), Windows (Win32), Linux (GTK4), Web (DOM)
- Native UI module (`perry/ui`) with declarative widget API
- 50+ npm packages compiled natively (fastify, mysql2, redis, bcrypt, lodash, etc.)
- NaN-boxing runtime for efficient 64-bit tagged values
- Mark-sweep garbage collection
- Plugin system via shared libraries (.dylib/.so)
- iOS WidgetKit support via SwiftUI codegen

## Installation

```bash
git clone https://github.com/skelpo/perry.git
cd perry && cargo build --release
```

## Usage

```bash
perry hello.ts -o hello && ./hello       # Compile and run
perry app.ts -o app --target web         # Web target (HTML output)
perry app.ts -o app --target ios-simulator  # iOS cross-compilation
perry check src/                          # Validate without compiling
perry doctor                              # Check environment
perry update                              # Self-update
```

## Documentation

Full documentation: see the `docs/` directory (mdBook format), or build with `mdbook serve docs`.

## Links

- Source: https://github.com/skelpo/perry
- Docs source: docs/src/ (mdBook markdown)
