Robustone is an experimental disassembly engine written in Rust by the HUST Open Atom Club. Inspired by the Capstone project, it explores how Rust's strong safety guarantees can be used to deliver a Capstone-compatible experience with a cleaner codebase and modern tooling.
- Rust 1.75 or newer (edition 2021).
- Python 3.8 or newer for parity tests.
gitand basic build tools for fetching the Capstone reference implementation.
robustone/ # Metadata crate including both library and binary
robustone-core/ # Architecture-specific decoding and formatting (Rust port of Capstone)
robustone-cli/ # Command-line parsing, input validation, and presentation logic
test/
riscv32/ # Python scripts and fixtures for RISC-V parity checks
third_party/
capstone/ # Optional checkout of the original Capstone project (used by tests)
Cargo.toml # Workspace manifest
Clone the repository (including the submodules, if any) and install the toolchain requirements above. The bundled Makefile offers shortcuts for common workflows:
| Target | Description |
|---|---|
make build |
Compile the crate in debug mode. |
make check |
Run cargo check for fast type verification. |
make format |
Format the Rust codebase with rustfmt. |
make run |
Launch the CLI in debug mode (accepts the same arguments as cargo run). |
make test |
Build Capstone (if missing), run parity tests, and execute the Rust unit tests. |
The test target downloads Capstone into third_party/capstone on first use, builds the comparison tool, runs test/riscv32/test_vs_cstool.py, and finally executes cargo test.
The CLI mirrors the classic cstool UX. For example, to decode a RISC-V instruction with detailed output:
make run -- riscv32 13000513 -dThe command also accepts arguments without the explicit -- separator:
make run riscv32 13000513 -dInternally the target forwards any trailing words to the binary (or you can pass them via RUN_ARGS="...").
Run the full regression suite from the repository root:
make testThis command:
- Ensures Capstone is available under
third_party/capstone(clones the repository if necessary). - Builds Capstone's
cstoolhelper usingtest/build_cstool.sh. - Executes the Python parity harness
test/riscv32/test_vs_cstool.pyand compares Robustone output with Capstone across the curated instruction list. - Runs
cargo testfor Rust unit coverage.
If you only need to validate the Python comparison script, run it directly:
python3 test/riscv32/test_vs_cstool.py