binbun

mcp
Security Audit
Warn
Health Warn
  • License — License: Apache-2.0
  • Description — Repository has a description
  • Active repo — Last push 0 days ago
  • Low visibility — Only 6 GitHub stars
Code Pass
  • Code scan — Scanned 12 files during light audit, no dangerous patterns found
Permissions Pass
  • Permissions — No dangerous permissions requested

No AI report is available for this listing yet.

SUMMARY

An open-source interactive disassembler and decompiler, built as reusable libraries

README.md

binbun

binbun logo

license
CI
PyPI
crates.io

An open-source disassembler and decompiler for x86 and AArch64, built as reusable libraries for Rust, Python, C and C++.

  • Disassemble x86 and AArch64 from ELF, PE and Mach-O; decompile x86-64 and AArch64 to C.
  • Trace each line of C to its instructions; why shows the evidence for a type or name.
  • Run verify to see where a function's decompiled form and its machine code disagree.
  • Share an end-to-end encrypted project, discuss code at an address and undo your own edits.
  • Bring your own agent: in your window or headlessly, through Python or over MCP.

Download · Docs · Python API · Discussions

A shared binbun session on bash's get_directory_stack, seen by its host ana: the function list, the disassembly and the decompiled C, where collaborators kit and sam each have a cursor on a line in their own colour and kit has renamed v6 to words; in the title bar, kit's and sam's avatars; on the right, the session's chat, where the three discuss the function

[!WARNING]
binbun is in preview. Expect breaking changes to its APIs, project files and output.

Install

Download the app for macOS, Windows or Linux from binbun.org, or on Linux and macOS:

curl -fsSL https://binbun.org/install.sh | sh

As libraries:

pip install binbun          # Python: the whole engine
cargo add binbun            # Rust: the engine
cargo add binbun-session    # Rust: the engine with background analysis, projects and undoable edits
cargo add binbun-disasm     # Rust: the disassemblers, x86 and AArch64

For C and C++, libbinbun (the decoders, so far) and its headers are in every release.

Agents

binbun lets you bring your own harness: it includes no model and needs no AI account. An agent can:

  • work headless with the Python package, the same API as your scripts;
  • work in your window (binbun.connect(agent="Codex")) as a participant with its own avatar and cursor, each of its edits its own undo step;
  • use binbun as tools through binbun mcp, if its harness only calls tools;
  • check its claims: verify tests a function's C against its machine code, and why says why each variable has its type and name;
  • propose rather than edit: a suggestion with its rationale and evidence, for someone to accept or dismiss, or a thread at the address it is about.

Setup for each harness is in Agents, or in the app under File › Connect an Agent….

Benchmarks

Decompilation against Ghidra and angr

DecompileBench's compile test on stripped Debian bash and glibc's libc, each tool given a copy it cannot find the debug file for: the share of functions whose C compiles unmodified with the tool's own declarations, the share whose parameter count matches the debug information, and the wall-clock time to decompile the whole file, startup included. Details, the other prototype and structure scores, and where binbun loses: bench/results/decompile.md.

Decompilation: compiles as written, parameter count right, whole-file time

AArch64 decoding

A linear sweep of Debian arm64 libc, libstdc++, libcrypto and bash. Details: bench/results/README.md.

AArch64 decoder throughput

x86-64 decoding

A linear sweep of libc and libcrypto. binbun's decoder gives XED's full answer (instruction form, implicit operands, XED's error rules), more than the others compute. Details: bench/results/README.md.

x86-64 decoder throughput

Documentation

Building from source

binbun builds with the Rust toolchain pinned in rust-toolchain.toml. The app is built on GPUI and needs its platform libraries on Linux:

# Debian, Ubuntu
sudo apt install build-essential pkg-config libfontconfig-dev libxcb1-dev libxkbcommon-dev libxkbcommon-x11-dev
# Fedora
sudo dnf install gcc pkgconf-pkg-config fontconfig-devel libxcb-devel libxkbcommon-devel libxkbcommon-x11-devel
# Arch
sudo pacman -S base-devel fontconfig libxcb libxkbcommon libxkbcommon-x11
git clone https://github.com/dmaivel/binbun && cd binbun
(cd gui && cargo build --release)    # the app and every command: gui/target/release/binbun
cargo build --release -p binbun-cli  # the commands without the app: target/release/binbun
maturin build --release              # the Python package: target/wheels

The app's build downloads the pinned source of libghostty-vt, its terminal emulator (on macOS, its prebuilt library), and the Zig it builds with (scripts/zig.sh, into gui/target/zig, the first time), each checked against its SHA-256; set GHOSTTY_SOURCE_DIR to build from a copy you have. On Windows, set ZIG first: export ZIG=$(scripts/zig.sh) in Git Bash. Its notices are in gui/LIBGHOSTTY.

How to test a change, the oracles and the benchmarks are in docs/. To contribute, see CONTRIBUTING.md; to report a security problem privately, SECURITY.md.

License

MIT or Apache-2.0, at your option (LICENSE-MIT, LICENSE-APACHE). third_party/xed and the files generated from it are Apache-2.0; third_party/aarchmrs and the files generated from it are BSD-3-Clause (Arm).

Reviews (0)

No results found