Skip to content

【开源自荐】Lexe:将 Node.js 应用打包成 10MB 的可执行文件 #6597

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
Ray-D-Song opened this issue Apr 14, 2025 · 0 comments
Labels

Comments

@Ray-D-Song
Copy link

Ray-D-Song commented Apr 14, 2025

https://github.com/Ray-D-Song/lexe

Lexe 是一个基于 AWS 轻量级 JavaScript 运行时 LLRT 的工具。
它允许您将 Node.js 应用程序(支持主要 Node.js API)打包成一个单一、轻量级(仅 8-10MB)的可执行文件。

和其他类似工具的产物体积比较:
Image

特性:

  • 极小的二进制文件大小:Lexe 可以将 Node.js 应用程序打包成单个可执行文件,大小仅为 8~10MB,远小于传统 Node.js 运行时。
  • 更快的冷启动时间:由于没有 JIT 编译器的开销,Lexe 可以显著减少冷启动时间,适合轻量级服务和CLI工具。
  • 跨平台支持:支持多种平台,包括 Linux、macOS 和 Windows,以及 x64 和 ARM64 架构。

缺陷:

  • 一部分 Node.js API 缺失
  • 和 nexe、pkg 一样,不包含JS源代码的打包功能,需要自己使用 esbuild、ncc 之类的工具将项目打包为单个js文件
@ruanyf ruanyf added the weekly label Apr 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants