منصوبے کے بارے میں
Perry TypeScript اور JavaScript کے لیے ایک ahead-of-time کمپائلر ہے، جو Rust میں نافذ کیا گیا ہے۔ یہ پارسنگ کے لیے SWC اور code generation کے لیے LLVM استعمال کرتا ہے، جس سے JavaScript engine بھیجنے کے بجائے standalone machine-code binaries تیار ہوتی ہیں۔ README اسے Node.js، Bun اور Electron کے مقابلے میں پیش کرتا ہے، جس میں runtime install کی ضرورت نہ ہونے، چھوٹی binaries (hello world تقریباً 330 KB) اور فوری cold starts پر زور دیا گیا ہے۔
Targets میں macOS، Windows، Linux، iOS، iPadOS، visionOS، tvOS، watchOS، Android، Wear OS، نیز web اور WebAssembly output شامل ہیں۔ ایک SwiftUI-like UI API native platform widgets (AppKit، UIKit، Android Views، Win32، GTK4) میں compile ہوتی ہے نہ کہ WebView میں، اور project میں home-screen widget support کا ذکر ہے۔
README میں دعویٰ کیا گیا ہے کہ Node کے اپنے test suite میں 53 node:* modules میں تقریباً 97% pass rate ہے، جس میں fs، http/http2، net/tls، crypto، stream، child_process، worker_threads، fetch اور web globals کے implementations شامل ہیں، نیز Fastify، Express، mysql2، pg، ioredis، ws، bcrypt اور jsonwebtoken جیسے تقریباً 50 npm packages کے ساتھ مطابقت ہے۔ Plain JavaScript بھی supported ہے۔
Concurrency کو parallelMap، parallelFilter اور spawn کے ذریعے حقیقی OS threads پر expose کیا گیا ہے؛ compiler shared mutable state کو مسترد کرتا ہے تاکہ data races compile time پر fail ہوں۔ Standard library میں databases، WebSockets، containers، i18n، keychain، notifications، auto-update اور ایک TUI framework شامل ہیں۔
Performance figures کھلے benchmark harnesses (Apple M1 Max، repeated runs کے medians) سے شائع کیے گئے ہیں، جن میں image convolution، recursive Fibonacci، JSON pipelines، object allocation اور array writes شامل ہیں، اور Node.js، Bun اور Rust سے موازنہ کیا گیا ہے۔ README میں واضح طور پر ان workloads کا ذکر ہے جہاں V8 کا JIT اب بھی جیتتا ہے اور نتائج کو دوبارہ پیدا کرنے کے لیے harness اور methodology کے لنکس دیے گئے ہیں۔
Installation npm (@perryts/perry)، Homebrew، winget، APT، Scoop، install script یا source builds کے ذریعے دستیاب ہے۔ عام استعمال `perry init`، `perry run`، اور `perry compile src/main.ts -o myapp` ہے، جس میں setup verification کے لیے `perry doctor` شامل ہے۔ Telemetry opt-in ہے اور config یا environment variables کے ذریعے غیر فعال کیا جا سکتا ہے۔
Perry کے ساتھ بنائے گئے projects میں Bloom Engine (ایک native TypeScript game engine)، Mango (ایک native MongoDB GUI)، Hone (ایک AI-powered code editor) اور dB Meter (ایک sound level meter) شامل ہیں۔ Project MIT licensed ہے اور Discord community اور public issue tracker کے ساتھ کھلے طور پر تیار کیا گیا ہے۔
Comments
0 Rating appears after 10 ratings
Sign in to join the discussion.