返回对比页
TypeScript 运行时

Perry vs Deno

Deno compile produces a standalone executable by bundling a slimmed-down Deno runtime with the program. Perry compiles supported code through LLVM and does not include a JavaScript engine by default, while statically linking its own runtime and GC.

技术事实和测量说明以英文为准,以避免不同翻译之间出现偏差。

什么是 Deno?

Deno is a JavaScript and TypeScript runtime with built-in tooling and a permissions model. Its official compile documentation describes a standalone executable that contains the program and a slimmed-down Deno runtime.

什么是 Perry?

Perry parses TypeScript and JavaScript with SWC and compiles supported code ahead of time through LLVM. Native builds do not require an external Node.js installation or JavaScript engine, but they do statically link the Perry runtime and garbage collector. Perry is pre-1.0, implements a practical language and Node.js subset, and offers an optional embedded V8 fallback for code that needs engine semantics.

并排对比

特性PerryDeno
Execution modelLLVM ahead-of-time machine codeV8 through the bundled Deno runtime
Standalone executableTarget-specific native binaryProgram plus slimmed-down Deno runtime
Runtime modelPerry runtime + GC statically linked; no JS engine by defaultDeno runtime and V8 embedded
PermissionsOperating-system process permissionsRuntime permission flags and policy
Native UI and mobilePerry UI targets desktop, mobile, wearable, TV, and Web/WASMRuntime/CLI/server focus
CompatibilityPractical subset; optional V8 fallbackV8 plus Deno, web, and Node compatibility layers

Perry 胜出之处

  • +Native-widget UI targets
  • +No JavaScript engine in native output by default
  • +Mobile, wearable, TV, and Web/WASM target model
  • +Small outputs are possible for narrowly linked applications

Deno 胜出之处

  • +Mature runtime and tooling
  • +Granular runtime permissions
  • +Broad dynamic JavaScript and package compatibility
  • +Built-in formatter, linter, test runner, and related tools

何时选择 Perry

Choose Perry for validated native applications where its targets, UI model, and AOT tradeoffs fit the product.

何时选择 Deno

Choose Deno for runtime-centric server, CLI, or scripting work where its permissions model, tooling, and V8 compatibility are more important.

结论

Both can ship one file, but one file does not mean the same architecture. Compare your actual application rather than extrapolating from hello world or a microbenchmark.

资料来源

试用 Perry

今天就把你的 TypeScript 编译为原生代码。

开始使用