一个全自动的 V8 反汇编器 (v8dasm) 构建系统,支持多平台、多版本编译,并自动发布到 GitHub Releases。
-
克隆仓库
git clone <your-repo-url> cd AutoView8
-
配置要编译的 V8 版本
{ "versions": [ { "v8_version": "10.2.154.26", "node_version": "v18.x", "build_args": "v8_enable_pointer_compression=false" } ] } -
提交并推送
git add configs/v8-versions.json git commit -m "Update V8 versions to build" git push origin main -
自动完成! 🎉
- GitHub Actions 自动检测配置变化
- 并行编译所有平台 (Linux, macOS Intel, macOS ARM, Windows)
- 自动创建 GitHub Release
- 上传所有平台的二进制文件
-
下载编译产物
- 访问仓库的 Releases 页面
- 下载对应平台和版本的压缩包
- 解压即可使用
AutoView8/
├── .github/workflows/
│ └── build-v8dasm.yml # GitHub Actions 工作流
├── configs/
│ └── v8-versions.json # 版本配置文件 (修改这里!)
├── scripts/v8dasm-builders/
│ ├── build-linux.sh # Linux 编译脚本
│ ├── build-macos-intel.sh # macOS Intel 编译脚本
│ ├── build-macos-arm.sh # macOS ARM 编译脚本
│ └── build-windows.cmd # Windows 编译脚本
├── view8-jsc-decode/
│ └── Disassembler/
│ ├── v8dasm.cpp # 反汇编器源码
│ └── v8.patch # V8 补丁
├── view8.py # View8 反编译器主程序
├── Parser/ # V8 缓存解析器
├── Translate/ # 字节码翻译器
├── Simplify/ # 代码简化器
├── BUILD.md # 本地编译指南
└── README.md # 本文件
- ✅ Linux x64
- ✅ macOS Intel (x86_64)
- ✅ macOS Apple Silicon (ARM64)
- ✅ Windows x64
- 9.4.146.24 - Node.js v16.x
- 10.2.154.26 - Node.js v18.x
- 11.3.244.8 - Node.js v20.x
- 从 Releases 下载对应版本的 v8dasm
- 解压并使用:
# 反汇编 JSC 文件
./v8dasm-10.2.154.26 input.jsc > output.txt
# 配合 View8 完整反编译
python view8.py input.jsc output.js --path ./v8dasm-10.2.154.26参考 本地编译指南 进行本地编译。
编辑 configs/v8-versions.json,添加新版本:
{
"versions": [
{
"v8_version": "12.4.254.14",
"node_version": "v22.x",
"build_args": "v8_enable_pointer_compression=false"
}
]
}提交后自动触发编译!
-
Node.js 版本对应表
node -p process.versions.v8
-
在线查询
-
Electron 版本
GitHub Actions 在以下情况自动运行:
-
推送到 main 分支 且修改了以下文件:
configs/v8-versions.json⭐ 最常用view8-jsc-decode/Disassembler/**scripts/v8dasm-builders/**.github/workflows/build-v8dasm.yml
-
Pull Request 到 main 分支
-
手动触发
- 访问 Actions 页面
- 选择 "Build V8 Disassembler" 工作流
- 点击 "Run workflow"
- 可选择指定单个版本编译
- 无需手动操作,修改配置文件即可
- 自动检测版本变化
- 自动创建 Release
- 4 个平台同时编译
- 预计 60-90 分钟完成全部
- Depot Tools 缓存
- V8 源码缓存
- 增量构建节省 50-70% 时间
- 编译产物自动以版本号命名
- 例如:
v8dasm-10.2.154.26 - 便于管理多个版本
- 支持 GitHub Actions 自动编译
- 支持本地手动编译
- 脚本自动检测运行环境
- 访问仓库的 Actions 标签页
- 查看最新的工作流运行
- 点击查看各平台的详细日志
准备构建矩阵
↓
┌────────────────────┬────────────────────┬────────────────────┬────────────────────┐
│ Linux x64 │ macOS Intel │ macOS ARM64 │ Windows x64 │
│ (ubuntu-20.04) │ (macos-12) │ (macos-14) │ (windows-2022) │
└────────────────────┴────────────────────┴────────────────────┴────────────────────┘
↓
创建 GitHub Release
↓
上传所有平台的 ZIP 压缩包
在 configs/v8-versions.json 中修改 build_args:
{
"v8_version": "10.8.168.25",
"node_version": "Electron v22.x",
"build_args": "v8_enable_pointer_compression=true v8_enable_sandbox=true"
}常用参数:
v8_enable_pointer_compression=false- 禁用指针压缩 (Node.js)v8_enable_pointer_compression=true- 启用指针压缩 (Electron)v8_enable_sandbox=true- 启用沙箱 (Electron)
手动触发工作流时,输入版本号:
- 访问 Actions 页面
- 选择 "Build V8 Disassembler"
- 点击 "Run workflow"
- 输入 V8 版本号(如
10.2.154.26) - 点击 "Run workflow"
# 基本用法
python view8.py input.jsc output.js
# 指定 v8dasm 路径
python view8.py input.jsc output.js --path ./v8dasm-10.2.154.26
# 查看帮助
python view8.py --help详细文档请参考 View8 说明。
-
检查日志
- 访问 Actions 页面查看详细日志
- 重点关注红色错误信息
-
补丁应用失败
- 可能是 V8 版本不兼容
- 查看 补丁兼容性
-
内存不足
- GitHub Actions 有 7GB 内存限制
- 考虑本地编译
参考 本地编译指南 的"常见问题"部分。
本项目基于 MIT 许可证。详见 LICENSE 文件。
欢迎提交 Issue 和 Pull Request!
- Fork 本仓库
- 创建功能分支 (
git checkout -b feature/AmazingFeature) - 提交更改 (
git commit -m 'Add some AmazingFeature') - 推送到分支 (
git push origin feature/AmazingFeature) - 创建 Pull Request
最后更新: 2026-01-30 版本: 1.0.0