docs: update README.md and README_CN.md with AArch64 backend status, crate layout, and stability tiers
Robustone 是由华中科技大学开源原子俱乐部用 Rust 编写的实验性反汇编引擎。受 Capstone 项目启发,它探索如何利用 Rust 强大的安全保证来提供与 Capstone 兼容的体验,同时拥有更清洁的代码库和现代化的工具链。
Robustone 将与 Capstone 的兼容目标拆分为三层:
cstool
arch+mode
当前仓库状态:
docs/support-matrix.md
riscv32
riscv64
aarch64
x32
x64
loongarch64
git
robustone/ # 顶层 crate(同时提供库和二进制入口) robustone-core/ # 架构相关的解码与格式化核心 robustone-cli/ # CLI 参数解析、输入校验与展示逻辑 robustone-arm/ # AArch64 spec-driven 解码后端 docs/ # 支持矩阵和项目文档 xtask/ # 基于 TableGen 的架构 spec 代码生成管线 tests/ # golden/property/differential 测试资源 fuzz/ # 解码器与 JSON 格式化的 fuzz 目标 Makefile # build/check/run/test 入口 test/ architectures/ # 各架构的一致性测试配置和测试集 run_tests.py # 一致性测试主入口 third_party/ capstone/ # 原始 Capstone 项目的可选检出(测试使用) Cargo.toml # Workspace 清单
克隆仓库(包括子模块,如果有的话)并安装上述工具链要求。捆绑的 Makefile 为常见工作流程提供了快捷方式:
Makefile
make build
make check
rustfmt
clippy
black
pylint
make format
make run
cargo run
make test
make test-quick
make help
test 目标在首次使用时会将 Capstone 下载到 third_party/capstone,通过 test/scripts/build_cstool.sh 构建比较工具,运行 python3 test/run_tests.py --all,最后执行 cargo test --workspace --all-features。
test
third_party/capstone
test/scripts/build_cstool.sh
python3 test/run_tests.py --all
cargo test --workspace --all-features
当前已实现的 RISC-V 后端尽量镜像经典 cstool 的使用方式。例如,要解码一条 RISC-V 指令并显示详细信息:
make run -- riscv32 93001000 -d
十六进制输入遵循 cstool 约定,按内存中的原始字节顺序解释。
或者,您可以使用 RUN_ARGS 变量。这样可以防止 make 错误解析 -d 等标志:
RUN_ARGS
make
-d
make run RUN_ARGS="riscv32 93001000 -d"
如果需要查看当前 CLI 暴露的完整参数面,请运行:
cargo run --manifest-path robustone/Cargo.toml -- --help
如果需要直接查看共享能力注册表导出的支持面,请运行:
cargo run --manifest-path robustone/Cargo.toml -- --capabilities cargo run --manifest-path robustone/Cargo.toml -- --json --capabilities
如果需要从共享解码 IR 导出结构化 JSON,请运行:
cargo run --manifest-path robustone/Cargo.toml -- --json riscv32 93001000
如需解码 AArch64 指令,可通过 spec-driven 后端:
cargo run --manifest-path robustone/Cargo.toml -- --json aarch64 d503201f
从仓库根目录运行完整的回归测试套件:
此命令会:
其他常用验证命令:
python3 test/run_tests.py --list python3 test/run_tests.py --arch riscv32 --limit 20 --verbose cargo test --workspace --all-features cargo run --manifest-path robustone/Cargo.toml -- --json riscv32 93001000
以上命令已于 2026-05-29 在本地验证通过。
.github/workflows/ci.yml
tests/differential/known-differences.toml
docs/isa-checklist.md
docs/benchmark-baselines.md
docs/release-checklist.md
docs/versioning-policy.md
test/README.md
我们欢迎贡献。请阅读 CONTRIBUTING_CN.md 了解以下内容:
Rewrite Capstone in Rust
版权所有:中国计算机学会技术支持:开源发展技术委员会 京ICP备13000930号-9 京公网安备 11010802047560号
Robustone
Robustone 是由华中科技大学开源原子俱乐部用 Rust 编写的实验性反汇编引擎。受 Capstone 项目启发,它探索如何利用 Rust 强大的安全保证来提供与 Capstone 兼容的体验,同时拥有更清洁的代码库和现代化的工具链。
兼容性边界
Robustone 将与 Capstone 的兼容目标拆分为三层:
cstool接近的命令行体验,包括arch+mode语法、原始十六进制输入和细节输出选项。当前仓库状态:
docs/support-matrix.mdriscv32、riscv64— 已通过一致性测试,有模糊测试覆盖,适合受控的内部使用。aarch64、x32、x64、loongarch64—x32、x64的解码覆盖有限;loongarch64依赖语料库精确字匹配,尚未推广到任意的有效编码。aarch64后端为 spec-driven,覆盖基础整数、分支、存取、标量浮点、向量(SIMD/SVE/SME)、加密和系统指令;尚未实现 detail 输出。系统要求
git和基本构建工具(用于获取 Capstone 参考实现)。项目结构
快速开始
克隆仓库(包括子模块,如果有的话)并安装上述工具链要求。捆绑的
Makefile为常见工作流程提供了快捷方式:make buildmake checkrustfmt、clippy、black、pylint)。make formatmake runcargo run相同的参数)。make testmake test-quickmake helptest目标在首次使用时会将 Capstone 下载到third_party/capstone,通过test/scripts/build_cstool.sh构建比较工具,运行python3 test/run_tests.py --all,最后执行cargo test --workspace --all-features。运行 CLI
当前已实现的 RISC-V 后端尽量镜像经典
cstool的使用方式。例如,要解码一条 RISC-V 指令并显示详细信息:十六进制输入遵循
cstool约定,按内存中的原始字节顺序解释。或者,您可以使用
RUN_ARGS变量。这样可以防止make错误解析-d等标志:如果需要查看当前 CLI 暴露的完整参数面,请运行:
如果需要直接查看共享能力注册表导出的支持面,请运行:
如果需要从共享解码 IR 导出结构化 JSON,请运行:
如需解码 AArch64 指令,可通过 spec-driven 后端:
测试
从仓库根目录运行完整的回归测试套件:
此命令会:
third_party/capstone下可用(如有必要会克隆仓库)。test/scripts/build_cstool.sh构建 Capstone 的cstool辅助工具。python3 test/run_tests.py --all。cargo test --workspace --all-features检查 Rust workspace 测试。其他常用验证命令:
以上命令已于 2026-05-29 在本地验证通过。
CI 与项目文档
.github/workflows/ci.yml(执行make check、cargo test --workspace --all-features、make test,并提供定时 fuzz smoke)docs/support-matrix.mdtests/differential/known-differences.tomldocs/isa-checklist.mddocs/benchmark-baselines.mddocs/release-checklist.mddocs/versioning-policy.mdtest/README.md贡献
我们欢迎贡献。请阅读 CONTRIBUTING_CN.md 了解以下内容: