Learning resource
tiny-dec
Zhuo Zhang's small educational decompiler for 32-bit RISC-V (RV32I) ELF files, written in Python to teach how decompilation works rather than to compete with production decompilers. Its 19 deliberately separate stages run from ELF loading, decoding and p-code lifting through SSA, stack, type, variable and range recovery to control-flow structuring and C output, and the CLI can stop at any stage to print that stage's intermediate result. The README also offers a Claude Code plugin whose AI tutor walks learners through the stages with quizzes and exercises.
Requirements & limits
- Reviewed at commit 4f5f1e0 (2026-05-27), the repository's only commit; the package is version 0.1.0, and the repository's test and lint workflows passed on that commit. The README calls it a teaching tool, not a production decompiler: it handles RV32I only, and unresolved expressions stay in the output as raw<...> rather than being guessed. A live demo site at tiny-dec.zzhang.xyz shows the stages.
- Input is an RV32I ELF file. The repository commits 13 C test programs and 39 RV32I builds of them (-O0 and -O2, PIE and non-PIE) under tests/fixtures, so no outside binaries are needed. Rebuilding them or compiling one's own C code needs clang, lld and LLVM with RISC-V support, installed locally or through the included Docker development image.
- Requires Python 3.12+ and Poetry, and the loader leaves ELF parsing to pwntools; the README lists Ubuntu/Debian system packages, and a devcontainer is included. The AI tutor needs Claude Code and installs as a plugin from the repository's marketplace manifest; its skill files hold one lesson guide per pipeline stage.
- MIT license (Copyright 2026 Zhuo Zhang). The 500-test count and the example outputs are the author's. This collection did not install or run the decompiler, try the tutor or judge output quality. The tutor is an AI teaching aid, not an REA integration, and the repository does not mention REA.
About this entry
- Type
- Learning resource
- Category
- Learning resources
- Relationship
- Learning resource
- Targets
- Binary
Sources reviewed
The description was reviewed against primary sources. This does not establish runtime testing, security auditing or verified compatibility.
Primary sources
- README.md GitHub · ZhangZhuoSJTU/tiny-dec · Revision 4f5f1e0
- pyproject.toml GitHub · ZhangZhuoSJTU/tiny-dec · Revision 4f5f1e0
- LICENSE GitHub · ZhangZhuoSJTU/tiny-dec · Revision 4f5f1e0
- DEVELOPMENT_NOTES.md GitHub · ZhangZhuoSJTU/tiny-dec · Revision 4f5f1e0
- .github/workflows/ci.yml GitHub · ZhangZhuoSJTU/tiny-dec · Revision 4f5f1e0
- .claude-plugin/plugin.json GitHub · ZhangZhuoSJTU/tiny-dec · Revision 4f5f1e0
- skills/teach-decompilation GitHub · ZhangZhuoSJTU/tiny-dec · Revision 4f5f1e0
- tests/fixtures GitHub · ZhangZhuoSJTU/tiny-dec · Revision 4f5f1e0
- https://tiny-dec.zzhang.xyz/
More in References and learning
- Reverse Engineering Reading List · Learning resource
- Decomp Academy · Learning resource
- OWASP Firmware Security Testing Methodology (FSTM) · Learning resource
- Installation and client setup · Documentation
- CLI and Evidence · Documentation
- MCP contracts and generated catalog · Documentation