ZhangZhuoSJTU

A tiny educational decompiler that helps people understand how decompilation works.

78
3
100% credibility
Found Apr 25, 2026 at 78 stars -- GitGems finds repos before they trend. Get early access to the next one.
Sign Up Free
AI Analysis
Python
AI Summary

Tiny-dec is an educational tool that decompiles simple RISC-V machine code binaries into readable C source code via 19 inspectable analysis stages.

How It Works

1
🕵️‍♂️ Discover tiny-dec

You stumble upon this fun teaching tool while curious about how machine code turns back into readable programs.

2
💻 Set it up on your computer

Follow simple steps to get the tool ready, like downloading helpers and preparing examples.

3
📥 Pick a tiny program to explore

Grab one of the included sample programs that were written in C and compiled to machine code.

4
Watch it recreate the C code

Feed the machine code file to the tool and see it output clean, readable C source with loops, structs, and functions recovered.

5
🔍 Dive into the magic steps

Pause at any of the 19 clear stages to inspect how it simplifies, analyzes, and rebuilds the code.

🎉 Unlock decompilation secrets

You now grasp how professional tools reverse-engineer binaries, ready to tackle your own!

Sign up to see the full architecture

4 more

Sign Up Free

Star Growth

See how this repo grew from 78 to 78 stars Sign Up Free
Repurpose This Repo

Repurpose is a Pro feature

Generate ready-to-use prompts for X threads, LinkedIn posts, blog posts, YouTube scripts, and more -- with full repo context baked in.

Unlock Repurpose
AI-Generated Review

What is tiny-dec?

tiny-dec is a compact Python decompiler that converts RV32I ELF binaries into readable C code, like a reverse github tiny c compiler. Users feed it a binary via CLI (`tiny-dec decompile binary.elf --func main`), getting structured output with recovered loops, structs, switches, and prototypes—or pause at any of 19 stages like SSA or dataflow for inspection. It sidesteps ELF parsing complexity to spotlight pure decompilation, using fixtures from 13 C programs at O0/O2 levels.

Why is it gaining traction?

Unlike heavyweight tools like Ghidra, it prioritizes transparency: every stage outputs deterministic text for debugging, with 500 passing tests ensuring reliability. The hook is hands-on learning—stop at "calls" to see ABI snapshots or "structuring" for if/while recovery—echoing minimalism in projects like github tiny tapeout or tiny educational aids.

Who should use this?

Binary analysis students tracing pipeline steps; reverse engineers prototyping RV32I tools; educators crafting tiny decisions-style wheels or templates around decomp concepts, skipping prod decompilers for clarity.

Verdict

Strong pick for education (MIT-licensed, rebuildable fixtures), but 78 stars and 1.0% credibility signal early maturity—pair with angr for real work. Ideal if you're building tiny decks on decompilation.

(178 words)

Sign up to read the full AI review Sign Up Free

Similar repos coming soon.